Hi forum, I am writing here to ask for help in case someone has already gone through this, I have problems in a couple of points, I am trying to install/use the push library from https://github.com/balusreekanth/ios-asterisk-push , I have a couple of asterisk 16 and 18 , no (freepbx - issabel) , and many clients are external , most of them use the grandstream wave lite in IOS phone app , the repo scripts are based on chan_sip registry , I have modified them for PJSIP but I can't get them to work.
Point one
I debug the script when an extension registers and I see that it finds the values, but it does not insert them in the mysql db.
I share the logs:
https://pastebin.com/V3kPhYBY
the modification of the script:
https://pastebin.com/CBK7Liyy
Point two
trying to adapt the part of the dialplan in point 7 of the github guide trying to adapt the dialplan part in point 7 of the github guide https://github.com/hboetes/ios-asterisk-push
same => n,GoSubIf($["${pushneed}" = "${CALL_DESTINATION}"]?push,s,1(${CURRENT_DEVICE}))
[push]
exten => s,1,NoOP(SUB: Send push notification)
same => n,Set(MAX_TRIES=15)
same => n,Set(TRY=1)
;send args to push script
same => n,System(/var/lib/asterisk/pushscripts/push "${CALL_DESTINATION}" "${CALLERID(num)}" "${CALLERID(name)}" )
my dialplan
exten => _2XXX,1,NoOp(${CALLERID(name)})
exten => _2XXX,n,Noop(Protocolo TLS = ${CHANNEL(pjsip,secure)})
exten => _2XXX,n,Dial(${PJSIP_DIAL_CONTACTS(${EXTEN})},30,tT)
same=> n,Gosub(voicemail,s,1(${EXTEN}))
same=> n,Hangup
[voicemail]
exten => s,1,Goto(s-${DIALSTATUS},1)
exten => s-BUSY,1,Voicemail(${ARG1}@default,b)
same => n,Hangup
exten => s-CANCEL,1,Hangup
exten => s-CONGESTION,1,Congestion
same => n,Hangup
exten => _s-.,1,Voicemail(${ARG1}@default,u)
same => n,Hangup
injecting my dialplan
exten => _2XXX,1,NoOp(${CALLERID(name)})
exten => _2XXX,n,Noop(Protocolo TLS = ${CHANNEL(pjsip,secure)})
same=> n,GoSubIf($["${pushneed}" = "${EXTEN}) "]?push,s,1(${CURRENT_DEVICE}))
exten => _2XXX,n,Dial(${PJSIP_DIAL_CONTACTS(${EXTEN})},30,tT)
same=> n,Gosub(voicemail,s,1(${EXTEN}))
same=> n,Hangup
[push]
exten => s,1,NoOP(SUB: Send push notification)
same=> n,Set(MAX_TRIES=15)
same=> n,Set(TRY=1)
;send args to push script
same=> n,System(/var/lib/asterisk/pushscripts/push “${EXTEN}” “${CALLERID(num)}” “${CALLERID(name)}” )
[voicemail]
exten => s,1,Goto(s-${DIALSTATUS},1)
exten => s-BUSY,1,Voicemail(${ARG1}@default,b)
same => n,Hangup
exten => s-CANCEL,1,Hangup
exten => s-CONGESTION,1,Congestion
same => n,Hangup
exten => _s-.,1,Voicemail(${ARG1}@default,u)
same => n,Hangup
making a call, I see in 0 the variable
Executing [2001@llamadas-inter:2] NoOp(“PJSIP/2000-0000001d”, “Protocolo TLS = 0”) in new stack
– Executing [2001@llamadas-inter:3] GosubIf(“PJSIP/2000-0000001d”, “0?push,s,1()”) in new stack
Any ideas on how to improve this dialplan?
Note: I hope that someone can give me feedback on this, I find this library interesting so as not to depend on a third party.