Hi,
i had a working dialplan based on a DIAL command, if the extension (softphone) was not registered in Asterisk, i send a PUSH message to wake up the softphone, the plan below works great…
exten => 2,1,Set(DIALGROUP(mygroup,add)=PJSIP/6000)
same => n,Set(CURL_RESULT=${SHELL(SOME COMMAND)})
same => n,Wait(1)
same => n,Dial(${DIALGROUP(mygroup)},45)
same => n,Set(HANGUPCAUSEKEYS=${HANGUPCAUSE_KEYS()})
same => n,Set(HANGUP_CAUSE=${HANGUPCAUSE})
same => n,GotoIf($["${HANGUP_CAUSE}" == "1"]?retry)
same => n,GotoIf($["${HANGUP_CAUSE}" == "3"]?retry)
same => n(retry),NoOp(Contact was unreachble, retry dial)
same => n,Set(CURL_RESULT=${SHELL(SOME COMMAND)})
same => n,Wait(3)
same => n,Dial(${DIALGROUP(mygroup)},45)
same => n,NoOp(Dialing failed after second attempt. Hanging up…)
same => n,Hangup()
Now i’m working with a Conference, and using the Originate command to invite someone to the Conference… How can i do the same like i do above, seems the HANGUPCAUSE doesnt work with originate?
exten => 666,1,NoOp()
same => n,Progress()
same => n,Wait(1)
same => n,Originate(PJSIP/6000,exten,default,777,1,,aC(ulaw,alaw,h264)c(7000)n(Deurbel))
same => n,Hangup()
same => n,ConfBridge(1,myconferenceroom,default_user)
exten => 777,1,NoOp()
same => n,Progress()
same => n,Wait(1)
same => n,ConfBridge(1,myconferenceroom,admin_user)
Thnx in advance!!