hi,
need some help here…
if my default context has:
[default]
exten => 1102,1,Dial(SIP/1102)
exten => 1103,1,Dial(SIP/1103)
exten => 1989,1,Dial(SIP/1989@EX-UM-1)
exten => s-NOANSWER,1,SIPAddHeader(Diversion: tel:${ARG1};reason=user-busy;screen=no;privacy=off)
When someone calls 1102 and it does not answer or is busy, I need the call to be sent to 1989 with the diversion header.
How do i setup my extensions.conf to do this?
The sip.conf is all setup and working fine.
can’t anyone help me build this dialplan?
I tried :
exten => 1989,1,Dial(SIP/1989@EX-UM-1)
exten => 1102,1,Dial(SIP/1102)
exten => 1102,n,GotoIf($["${DIALSTATUS}" = “CHANUNAVAIL”]?lbl_Untitled_0:)
exten => 1102,n,GotoIf($["${DIALSTATUS}" = “NOANSWER”]?lbl_Untitled_0:)
exten => 1102,n,GotoIf($["${DIALSTATUS}" = “BUSY”]?lbl_Untitled_0:)
exten => 1102,n(lbl_Untitled_0),Transfer(SIP/1989@EX-UM-1)
exten => 1102,n,SIPAddHeader(Diversion: tel:${ARG1};reason=user-busy;screen=no;privacy=off)
Here is what the CLI shows when calling 1102… and 1102 cancels.
-- Executing [1102@default:1] Dial("SIP/1103-0000005f", "SIP/1102") in new stack
-- Called 1102
-- SIP/1102-00000060 is ringing
-- SIP/1102-00000060 is ringing
-- SIP/1102-00000060 is ringing
-- Got SIP response 486 "Busy Here" back from 10.98.5.162
-- SIP/1102-00000060 is busy
== Everyone is busy/congested at this time (1:1/0/0)
-- Executing [1102@default:2] GotoIf("SIP/1103-0000005f", "0?lbl_Untitled_0:") in new stack
-- Executing [1102@default:3] GotoIf("SIP/1103-0000005f", "0?lbl_Untitled_0:") in new stack
-- Executing [1102@default:4] GotoIf("SIP/1103-0000005f", "1?lbl_Untitled_0:") in new stack
-- Goto (default,1102,5)
-- Executing [1102@default:5] Transfer("SIP/1103-0000005f", "SIP/1989@EX-UM-1") in new stack
-- Executing [1102@default:6] SIPAddHeader("SIP/1103-0000005f", "Diversion: <tel:>;reason=user-busy;screen=no;privacy=off") in new stack
== Auto fallthrough, channel 'SIP/1103-0000005f' status is 'BUSY'