- Joined
- Jan 24, 2018
- Messages
- 3
- Reaction score
- 0
Good day guys! Please answer. Where i can find information of next trick.
How make to when abonent is calling to the numbe(any or specific).
1) 3cx send http request to external service like "somedomen.ru/?number=5009&title=Call to you Jon."
2) 3cx continue try to call when abonent is offline or count of trying not will be more then 5
Next is how i did it with Asterisk (dialplan + bash + curl)
<code>
exten => 5009,1,System(/etc/asterisk/ntf.sh "${name} (number ${CALLERID(num)})" ${EXTEN})
exten => 5009,n,Set(i=0)
exten => 5009,n(redail),Set(i=$[${i} + 1])
exten => 5009,n,Dial(PJSIP/5009,,m)
exten => 5009,n,ChanIsAvail(PJSIP/5009,,as)
exten => 5009,n,Wait(5)
exten => 5009,n,GotoIF($["${i}" = "5"]?skip)
exten => 5009,n,GotoIF($["${AVAILSTATUS}" = "5"]?redail)
exten => 5009,n(skip),Wait(1)
</code>
How make to when abonent is calling to the numbe(any or specific).
1) 3cx send http request to external service like "somedomen.ru/?number=5009&title=Call to you Jon."
2) 3cx continue try to call when abonent is offline or count of trying not will be more then 5
Next is how i did it with Asterisk (dialplan + bash + curl)
<code>
exten => 5009,1,System(/etc/asterisk/ntf.sh "${name} (number ${CALLERID(num)})" ${EXTEN})
exten => 5009,n,Set(i=0)
exten => 5009,n(redail),Set(i=$[${i} + 1])
exten => 5009,n,Dial(PJSIP/5009,,m)
exten => 5009,n,ChanIsAvail(PJSIP/5009,,as)
exten => 5009,n,Wait(5)
exten => 5009,n,GotoIF($["${i}" = "5"]?skip)
exten => 5009,n,GotoIF($["${AVAILSTATUS}" = "5"]?redail)
exten => 5009,n(skip),Wait(1)
</code>