Re: [asterisk-users] Ringing for incoming call

2010-01-14 Thread Andrew Thomas
exten = did,1,Answer
exten = did,n,Playtones(ring)
exten = did,n,Wait(10)
exten = did,n,StopPlaytones()
exten = did,n,BackGround(sound file)

did = the DID number as presented and note the '1' before Answer.

This works for me.

exten = 820055,1,Answer()
exten = 820055,n,PlayTones(ring)
exten = 820055,n,Wait(5)
exten = 820055,n,StopPlayTones()
exten = 820055,n,[do something interesting from now on]

That's my DID (820055) being answered first and then waiting for 5
seconds.  I use it for fax detect this way.


-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Bob
Smither
Sent: 18 December 2009 23:11
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Ringing for incoming call

Dear All,

I am using Asterisk 1.4 on CentOS 5.  I have an incoming DID provided by
Vitelity.  When the number is called it goes to my Asterisk box.  The
protocol is SIP.  This all works just fine if I answer the call and
begin a playback.

I want to let the number ring for a few seconds before it is answered,
and would like the caller to hear it ringing.  I have tried:

...
exten = s,n,Answer
exten = s,n,Playtones(ring)
exten = s,n,Wait(10)
exten = s,n,StopPlaytones()
exten = s,n,BackGround(sound file)
...

also

...
exten = s,n,Answer
exten = s,n,Ringing()
exten = s,n,Wait(10)
exten = s,n,BackGround(sound file)
...

I have also tried moving the Answer app to right before the BackGround
app.

In all cases when I call the number I never hear it ringing.  After the
10 second delay, the BackGround app does run.  Connecting to the CLI
does not give me any useful information - for example the Ringing app is
shown to run, but the caller does not hear it.

Any suggestions?

Many thanks!

-- 
Bob Smither smit...@c-c-i.com


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Ringing for incoming call

2009-12-19 Thread covici
I have a strange suggestion -- have one extension answer the call and
dial the extension you want -- then it should ring before dialing the
second one.

Bob Smither smit...@c-c-i.com wrote:

 
 On Fri, 2009-12-18 at 19:58 -0600, Steve Johnson wrote:
  Try putting the wait before the Answer.
  
  ...
  exten = s,n,Wait(10)
  exten = s,n,Answer
  ...
 
 Thanks Steve.  I tried that:
 
  On Fri, Dec 18, 2009 at 5:10 PM, Bob Smither smit...@c-c-i.com wrote:
   Dear All,
 
 snip
 
  
   ...
   exten = s,n,Answer
   exten = s,n,Ringing()
   exten = s,n,Wait(10)
   exten = s,n,BackGround(sound file)
   ...
  
   I have also tried moving the Answer app to right before the BackGround
   app.
 
 snip
 
 i.e., after the Wait, but still no joy.
 
 Anything else I need to look at?
 
 Thanks,
 -- 
 Bob Smither smit...@c-c-i.com
 
 
 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

 John Covici
 cov...@ccs.covici.com

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Ringing for incoming call

2009-12-19 Thread Bob Smither

On Fri, 2009-12-18 at 23:56 -0600, Steve Johnson wrote:
 If you try just this, what does the caller hear? It should be ringing
 for the first 20 sec, and then maybe the congestion tone afterwards.
 exten = s,1,Wait(20)
 exten = s,n,Hangup

Dialplan:

[cci]
exten = s,1,Wait(10)
exten = s,n,Hangup()

When the number is dialed, here is the CLI output:

Connected to Asterisk 1.4.21.1 currently running on k6-2 (pid = 6283)
Verbosity was 0 and is now 3
-- Executing [8772709...@inbound:1] Goto(SIP/smither-03390860,
cci|s|1) in new stack
-- Goto (cci,s,1)
-- Executing [...@cci:1] Wait(SIP/smither-03390860, 10) in new
stack
-- Executing [...@cci:2] Hangup(SIP/smither-03390860, ) in new
stack
  == Spawn extension (cci, s, 2) exited non-zero on
'SIP/smither-03390860'

The caller hears silence for 10 seconds.  When the Hangup is executed,
as reported on the CLI, the caller _then_ hears ringing (!?) which
continues until the caller hangs up.

Here is the entry in sip.conf (Asterisk registers with the provider):

[vitel-inbound-cci]
type=friend  
dtmfmode=auto
host=provider host
context=inbound 
username=user name
secret=my secret
allow=all
insecure=very
nat=yes

Context in extensions.conf:

[inbound]
exten = 8772709688,1,Goto(cci,s,1)

The context [cci] is shown above.

I appreciate the help, as I am confused!

-- 
Bob Smither, PhD   Circuit Concepts, Inc.
=

There are only 10 kinds of people in the world
--Those who understand binary, and those who don't...

=
smit...@c-c-i.com  http://www.C-C-I.Com  281-331-2744(office)  -4616(fax)


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Ringing for incoming call

2009-12-19 Thread Bob Smither

On Sat, 2009-12-19 at 08:26 -0500, cov...@ccs.covici.com wrote:
 I have a strange suggestion -- have one extension answer the call and
 dial the extension you want -- then it should ring before dialing the
 second one.

Actually, that is pretty close to what I do on a *1.6 box and it works.
Here's what I tried on my *1.4 box (in extensions.conf):

[inbound]
exten = 8772709688,1,Dial(Local/s...@cci,15)
exten = 8772709688,n,Hangup()

[cci]
exten = s,1,Set(CallerContext=${CONTEXT}) ; capture context
; document time of call to console
exten = s,n,NoOp(Time is: ${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)})
; document caller id to console
exten = s,n,NoOp(CallerID is ${CALLERID(all)})
exten = s,n,Set(TIMEOUT(digit)=3)  ; Set Digit Timeout
exten = s,n,Set(TIMEOUT(response)=10)  ; Set Response Timeout
; create unique call id for this call
exten = s,n,Set(GLOBAL(cid)=${EPOCH})
;
;exten = s,n,Playtones(ring)
exten = s,n,Wait(10)
;exten = s,n,StopPlaytones()
exten = s,n,Answer()
exten = s,n(start),Wait(0.5)
exten = s,n,BackGround(cci/prompt00)
exten = s,n,WaitExten  ; Wait for an extension to be dialed.

I tried both with and without the Playtones(ring) / StopPlaytones()
lines.

Here is what I get from the CLI:

Connected to Asterisk 1.4.21.1 currently running on k6-2 (pid = 8998)
Verbosity was 0 and is now 3
-- Executing [8772709...@inbound:1] Dial(SIP/smither-173b4940,
Local/s...@cci|15) in new stack
-- Called s...@cci
-- Executing [...@cci:1] Set(Local/s...@cci-7c61,2,
CallerContext=cci) in new stack
-- Executing [...@cci:2] NoOp(Local/s...@cci-7c61,2, Time is:
2009-12-19 09:43:10) in new stack
-- Executing [...@cci:3] NoOp(Local/s...@cci-7c61,2, CallerID is
* *) in new stack
-- Executing [...@cci:4] Set(Local/s...@cci-7c61,2, TIMEOUT(digit)=3)
in new stack
-- Digit timeout set to 3
-- Executing [...@cci:5] Set(Local/s...@cci-7c61,2,
TIMEOUT(response)=10) in new stack
-- Response timeout set to 10
-- Executing [...@cci:6] Set(Local/s...@cci-7c61,2,
GLOBAL(cid)=1261237390) in new stack
  == Setting global variable 'cid' to '1261237390'
-- Executing [...@cci:7] PlayTones(Local/s...@cci-7c61,2, ring) in
new stack
-- Executing [...@cci:8] Wait(Local/s...@cci-7c61,2, 10) in new stack
-- Executing [...@cci:9] StopPlayTones(Local/s...@cci-7c61,2, ) in
new stack
-- Executing [...@cci:10] Answer(Local/s...@cci-7c61,2, ) in new
stack
-- Executing [...@cci:11] Wait(Local/s...@cci-7c61,2, 0.5) in new
stack
-- Local/s...@cci-7c61,1 answered SIP/smither-173b4940
-- Executing [...@cci:12] BackGround(Local/s...@cci-7c61,2,
cci/prompt00) in 
new stack
-- Local/s...@cci-7c61,2 Playing 'cci/prompt00' (language 'en')

This all looks as expected to me, but the caller hears nothing until the
BackGround statement is executed.  There still is no ringing back to the
caller.

Thanks!



___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Ringing for incoming call

2009-12-18 Thread Bob Smither
Dear All,

I am using Asterisk 1.4 on CentOS 5.  I have an incoming DID provided by
Vitelity.  When the number is called it goes to my Asterisk box.  The
protocol is SIP.  This all works just fine if I answer the call and
begin a playback.

I want to let the number ring for a few seconds before it is answered,
and would like the caller to hear it ringing.  I have tried:

...
exten = s,n,Answer
exten = s,n,Playtones(ring)
exten = s,n,Wait(10)
exten = s,n,StopPlaytones()
exten = s,n,BackGround(sound file)
...

also

...
exten = s,n,Answer
exten = s,n,Ringing()
exten = s,n,Wait(10)
exten = s,n,BackGround(sound file)
...

I have also tried moving the Answer app to right before the BackGround
app.

In all cases when I call the number I never hear it ringing.  After the
10 second delay, the BackGround app does run.  Connecting to the CLI
does not give me any useful information - for example the Ringing app is
shown to run, but the caller does not hear it.

Any suggestions?

Many thanks!

-- 
Bob Smither smit...@c-c-i.com


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Ringing for incoming call

2009-12-18 Thread Steve Johnson
Try putting the wait before the Answer.

...
exten = s,n,Wait(10)
exten = s,n,Answer
...

On Fri, Dec 18, 2009 at 5:10 PM, Bob Smither smit...@c-c-i.com wrote:
 Dear All,

 I am using Asterisk 1.4 on CentOS 5.  I have an incoming DID provided by
 Vitelity.  When the number is called it goes to my Asterisk box.  The
 protocol is SIP.  This all works just fine if I answer the call and
 begin a playback.

 I want to let the number ring for a few seconds before it is answered,
 and would like the caller to hear it ringing.  I have tried:

 ...
 exten = s,n,Answer
 exten = s,n,Playtones(ring)
 exten = s,n,Wait(10)
 exten = s,n,StopPlaytones()
 exten = s,n,BackGround(sound file)
 ...

 also

 ...
 exten = s,n,Answer
 exten = s,n,Ringing()
 exten = s,n,Wait(10)
 exten = s,n,BackGround(sound file)
 ...

 I have also tried moving the Answer app to right before the BackGround
 app.

 In all cases when I call the number I never hear it ringing.  After the
 10 second delay, the BackGround app does run.  Connecting to the CLI
 does not give me any useful information - for example the Ringing app is
 shown to run, but the caller does not hear it.

 Any suggestions?

 Many thanks!

 --
 Bob Smither smit...@c-c-i.com


 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Ringing for incoming call

2009-12-18 Thread Bob Smither

On Fri, 2009-12-18 at 19:58 -0600, Steve Johnson wrote:
 Try putting the wait before the Answer.
 
 ...
 exten = s,n,Wait(10)
 exten = s,n,Answer
 ...

Thanks Steve.  I tried that:

 On Fri, Dec 18, 2009 at 5:10 PM, Bob Smither smit...@c-c-i.com wrote:
  Dear All,

snip

 
  ...
  exten = s,n,Answer
  exten = s,n,Ringing()
  exten = s,n,Wait(10)
  exten = s,n,BackGround(sound file)
  ...
 
  I have also tried moving the Answer app to right before the BackGround
  app.

snip

i.e., after the Wait, but still no joy.

Anything else I need to look at?

Thanks,
-- 
Bob Smither smit...@c-c-i.com


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Ringing for incoming call

2009-12-18 Thread Steve Johnson
If you try just this, what does the caller hear? It should be ringing
for the first 20 sec, and then maybe the congestion tone afterwards.
exten = s,1,Wait(20)
exten = s,n,Hangup

You shouldn't need/use the Ringing() command at all, as the initial
ring before your system answers would be generated by the provider.

If wait ... answer doesn't work for you, you'll have to provide more
output from the CLI and tell us more about your configuration.


On Fri, Dec 18, 2009 at 10:29 PM, Bob Smither smit...@c-c-i.com wrote:

 On Fri, 2009-12-18 at 19:58 -0600, Steve Johnson wrote:
 Try putting the wait before the Answer.

 ...
 exten = s,n,Wait(10)
 exten = s,n,Answer
 ...

 Thanks Steve.  I tried that:

 On Fri, Dec 18, 2009 at 5:10 PM, Bob Smither smit...@c-c-i.com wrote:
  Dear All,

 snip

 
  ...
  exten = s,n,Answer
  exten = s,n,Ringing()
  exten = s,n,Wait(10)
  exten = s,n,BackGround(sound file)
  ...
 
  I have also tried moving the Answer app to right before the BackGround
  app.

 snip

 i.e., after the Wait, but still no joy.

 Anything else I need to look at?

 Thanks,
 --
 Bob Smither smit...@c-c-i.com


 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users