rossiv
Guru
- Joined
- Oct 26, 2008
- Messages
- 2,623
- Reaction score
- 139
I need some help with dialplan code. I am trying to have a way to dial a number, enter a password, and then play a message on certain phones that Asterisk makes auto-answer. I found some code to start off with online, and this is what I have now.
As this code stands, I only get one call placed and that is to Ext 215. At that point, Ext. 215 and the calling extension are bridged.
OR with this version
Whichever extension picks up first is the only one that plays the audio. This version uses a macro (hence the M) with the audio files listed there.
What do I need to change to my code to dial a set of extensions and play a set sound or sounds over all the extensions at one time over auto-answer? I know it has to be something with that pesky Dial statement.
Thanks!
Code:
exten => 999,1,BackGround(vm-pass)
exten => 999,n,Authenticate(########)
exten => 999,n,Set(phone=${SIPPEER(${CUT(DIAL,/,2)}:useragent)})
;exten => 999,n,Set(SIPURI=)
;exten => 999,n,Set(CALLERID(name)="Announcement")
;exten => 999,n,Set(CALLERID(number)=1111)
exten => 999,n,Set(ALERTINFO=Alert-Info: Ring Answer)
exten => 999,n,Set(CALLINFO=Call-Info: <sip:broadworks.net>\;answer-after=0)
exten => 999,n,SipAddHeader(Alert-Info: Ring Answer)
exten => 999,n,SipAddHeader(Call-Info: <sip:broadworks.net>\;answer-after=0)
exten => 999,n,Set(__SIP_URI_OPTIONS=intercom=true)
exten => 999,n,Set(SIPURI=intercom=true)
exten => 999,n,Set(DOPTIONS=A(beep))
exten => 999,n,Set(DTIME=5)
exten => 999,n,Set(ANSWERMACRO=)
exten => 999,n,Dial(SIP/215,5,A(beep))
exten => 999,n,Dial(SIP/213,5,A(beep))
exten => 999,n,Dial(SIP/201,5,A(beep))
exten => 999,n,BackGround(custom/Sound1)
exten => 999,n,BackGround(custom/Sound1)
exten => 999,n,BackGround(custom/Sound3)
OR with this version
Code:
exten => 999,1,BackGround(vm-pass)
exten => 999,n,Authenticate(########)
exten => 999,n,Set(phone=${SIPPEER(${CUT(DIAL,/,2)}:useragent)})
;exten => 999,n,Set(SIPURI=)
;exten => 999,n,Set(CALLERID(name)="Announcement")
;exten => 999,n,Set(CALLERID(number)=1111)
exten => 999,n,Set(ALERTINFO=Alert-Info: Ring Answer)
exten => 999,n,Set(CALLINFO=Call-Info: <sip:broadworks.net>\;answer-after=0)
exten => 999,n,SipAddHeader(Alert-Info: Ring Answer)
exten => 999,n,SipAddHeader(Call-Info: <sip:broadworks.net>\;answer-after=0)
exten => 999,n,Set(__SIP_URI_OPTIONS=intercom=true)
exten => 999,n,Set(SIPURI=intercom=true)
exten => 999,n,Set(DOPTIONS=A(beep))
exten => 999,n,Set(DTIME=5)
exten => 999,n,Set(ANSWERMACRO=)
exten => 999,n,Dial(SIP/215&SIP/213,5,M(notification-sounds))
What do I need to change to my code to dial a set of extensions and play a set sound or sounds over all the extensions at one time over auto-answer? I know it has to be something with that pesky Dial statement.
Thanks!