[asterisk-users] Ringing for incoming call
Bob Smither
Smither at C-C-I.com
Sat Dec 19 09:59:44 CST 2009
On Sat, 2009-12-19 at 08:26 -0500, covici at 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 at 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 [8772709688 at inbound:1] Dial("SIP/smither-173b4940",
"Local/s at cci|15") in new stack
-- Called s at cci
-- Executing [s at cci:1] Set("Local/s at cci-7c61,2",
"CallerContext=cci") in new stack
-- Executing [s at cci:2] NoOp("Local/s at cci-7c61,2", "Time is:
2009-12-19 09:43:10") in new stack
-- Executing [s at cci:3] NoOp("Local/s at cci-7c61,2", "CallerID is
"*****" <*****>") in new stack
-- Executing [s at cci:4] Set("Local/s at cci-7c61,2", "TIMEOUT(digit)=3")
in new stack
-- Digit timeout set to 3
-- Executing [s at cci:5] Set("Local/s at cci-7c61,2",
"TIMEOUT(response)=10") in new stack
-- Response timeout set to 10
-- Executing [s at cci:6] Set("Local/s at cci-7c61,2",
"GLOBAL(cid)=1261237390") in new stack
== Setting global variable 'cid' to '1261237390'
-- Executing [s at cci:7] PlayTones("Local/s at cci-7c61,2", "ring") in
new stack
-- Executing [s at cci:8] Wait("Local/s at cci-7c61,2", "10") in new stack
-- Executing [s at cci:9] StopPlayTones("Local/s at cci-7c61,2", "") in
new stack
-- Executing [s at cci:10] Answer("Local/s at cci-7c61,2", "") in new
stack
-- Executing [s at cci:11] Wait("Local/s at cci-7c61,2", "0.5") in new
stack
-- Local/s at cci-7c61,1 answered SIP/smither-173b4940
-- Executing [s at cci:12] BackGround("Local/s at cci-7c61,2",
"cci/prompt00") in
new stack
-- <Local/s at 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!
More information about the asterisk-users
mailing list