create new a way to php8 agi on issabel [closed] - asterisk

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 15 hours ago.
Improve this question
how can I create a way to my custom php8 agi file in issabel.
when I use asterisk -rvvvvvv and sip set debug on I recieved logs bellow:
Executing [xxxxxxx1#from-trunk:1] Set("SIP/GoTrunk-0000004f", "__FROM_DID=xxxxxxx1") in new stack
-- Executing [xxxxxxx1#from-trunk:2] Gosub("SIP/GoTrunk-0000004f", "app-blacklist-check,s,1()") in new stack
-- Executing [s#app-blacklist-check:1] GotoIf("SIP/GoTrunk-0000004f", "0?blacklisted") in new stack
-- Executing [s#app-blacklist-check:2] Set("SIP/GoTrunk-0000004f", "CALLED_BLACKLIST=1") in new stack
-- Executing [s#app-blacklist-check:3] Return("SIP/GoTrunk-0000004f", "") in new stack
-- Executing [xxxxxxx1#from-trunk:3] Set("SIP/GoTrunk-0000004f", "CDR(did)=xxxxxxx1") in new stack
-- Executing [xxxxxxx1#from-trunk:4] ExecIf("SIP/GoTrunk-0000004f", "0 ?Set(CALLERID(name)=xxxxxxx0)") in new stack
-- Executing [xxxxxxx1#from-trunk:5] Set("SIP/GoTrunk-0000004f", "CHANNEL(musicclass)=default") in new stack
-- Executing [xxxxxxx1#from-trunk:6] Set("SIP/GoTrunk-0000004f", "__MOHCLASS=default") in new stack
-- Executing [xxxxxxx1#from-trunk:7] Set("SIP/GoTrunk-0000004f", "__CALLINGPRES_SV=allowed_not_screened") in new stack
-- Executing [xxxxxxx1#from-trunk:8] Set("SIP/GoTrunk-0000004f", "CALLERPRES()=allowed_not_screened") in new stack
-- Executing [xxxxxxx1#from-trunk:9] Goto("SIP/GoTrunk-0000004f", "from-did-direct,xxxxxxx1,1") in new stack
-- Goto (from-did-direct,xxxxxxx1,1)
-- Executing [xxxxxxx1#from-did-direct:1] Set("SIP/GoTrunk-0000004f", "__RINGTIMER=15") in new stack
-- Executing [xxxxxxx1#from-did-direct:2] Macro("SIP/GoTrunk-0000004f", "exten-vm,novm,xxxxxxx1,0,0,1") in new stack
-- Executing [s#macro-exten-vm:1] Macro("SIP/GoTrunk-0000004f", "user-callerid,") in new stack
-- Executing [s#macro-user-callerid:1] Set("SIP/GoTrunk-0000004f", "TOUCH_MONITOR=1676825556.270") in new stack
-- Executing [s#macro-user-callerid:2] Set("SIP/GoTrunk-0000004f", "AMPUSER=xxxxxxx0") in new stack
-- Executing [s#macro-user-callerid:3] GotoIf("SIP/GoTrunk-0000004f", "0?report") in new stack
-- Executing [s#macro-user-callerid:4] ExecIf("SIP/GoTrunk-0000004f", "1?Set(REALCALLERIDNUM=xxxxxxx0)") in new stack
-- Executing [s#macro-user-callerid:5] Set("SIP/GoTrunk-0000004f", "AMPUSER=") in new stack
-- Executing [s#macro-user-callerid:6] GotoIf("SIP/GoTrunk-0000004f", "0?limit") in new stack
-- Executing [s#macro-user-callerid:7] Set("SIP/GoTrunk-0000004f", "AMPUSERCIDNAME=") in new stack
-- Executing [s#macro-user-callerid:8] GotoIf("SIP/GoTrunk-0000004f", "1?report") in new stack
-- Goto (macro-user-callerid,s,15)
-- Executing [s#macro-user-callerid:15] GotoIf("SIP/GoTrunk-0000004f", "0?continue") in new stack
-- Executing [s#macro-user-callerid:16] Set("SIP/GoTrunk-0000004f", "__TTL=64") in new stack
-- Executing [s#macro-user-callerid:17] GotoIf("SIP/GoTrunk-0000004f", "1?continue") in new stack
-- Goto (macro-user-callerid,s,28)
-- Executing [s#macro-user-callerid:28] Set("SIP/GoTrunk-0000004f", "CALLERID(number)=xxxxxxx0") in new stack
-- Executing [s#macro-user-callerid:29] Set("SIP/GoTrunk-0000004f", "CALLERID(name)=xxxxxxx0") in new stack
-- Executing [s#macro-user-callerid:30] Set("SIP/GoTrunk-0000004f", "CDR(cnum)=xxxxxxx0") in new stack
-- Executing [s#macro-user-callerid:31] Set("SIP/GoTrunk-0000004f", "CDR(cnam)=xxxxxxx0") in new stack
-- Executing [s#macro-user-callerid:32] Set("SIP/GoTrunk-0000004f", "CHANNEL(language)=fa") in new stack
-- Executing [s#macro-exten-vm:2] Set("SIP/GoTrunk-0000004f", "RingGroupMethod=none") in new stack
-- Executing [s#macro-exten-vm:3] Set("SIP/GoTrunk-0000004f", "__EXTTOCALL=xxxxxxx1") in new stack
-- Executing [s#macro-exten-vm:4] Set("SIP/GoTrunk-0000004f", "__PICKUPMARK=xxxxxxx1") in new stack
-- Executing [s#macro-exten-vm:5] Set("SIP/GoTrunk-0000004f", "RT=15") in new stack
-- Executing [s#macro-exten-vm:6] Gosub("SIP/GoTrunk-0000004f", "sub-record-check,s,1(exten,xxxxxxx1,)") in new stack
-- Executing [s#sub-record-check:1] Set("SIP/GoTrunk-0000004f", "REC_POLICY_MODE_SAVE=") in new stack
-- Executing [s#sub-record-check:2] GotoIf("SIP/GoTrunk-0000004f", "1?check") in new stack
-- Goto (sub-record-check,s,7)
-- Executing [s#sub-record-check:7] Set("SIP/GoTrunk-0000004f", "__MON_FMT=wav") in new stack
-- Executing [s#sub-record-check:8] GotoIf("SIP/GoTrunk-0000004f", "1?next") in new stack
-- Goto (sub-record-check,s,11)
-- Executing [s#sub-record-check:11] ExecIf("SIP/GoTrunk-0000004f", "0?Return()") in new stack
-- Executing [s#sub-record-check:12] ExecIf("SIP/GoTrunk-0000004f", "0?Set(__REC_POLICY_MODE=)") in new stack
-- Executing [s#sub-record-check:13] GotoIf("SIP/GoTrunk-0000004f", "0?exten,1") in new stack
-- Executing [s#sub-record-check:14] Set("SIP/GoTrunk-0000004f", "__REC_STATUS=INITIALIZED") in new stack
-- Executing [s#sub-record-check:15] Set("SIP/GoTrunk-0000004f", "NOW=1676825556") in new stack
-- Executing [s#sub-record-check:16] Set("SIP/GoTrunk-0000004f", "__DAY=19") in new stack
-- Executing [s#sub-record-check:17] Set("SIP/GoTrunk-0000004f", "__MONTH=02") in new stack
-- Executing [s#sub-record-check:18] Set("SIP/GoTrunk-0000004f", "__YEAR=2023") in new stack
-- Executing [s#sub-record-check:19] Set("SIP/GoTrunk-0000004f", "__TIMESTR=20230219-202236") in new stack
-- Executing [s#sub-record-check:20] Set("SIP/GoTrunk-0000004f", "__FROMEXTEN=xxxxxxx0") in new stack
-- Executing [s#sub-record-check:21] Set("SIP/GoTrunk-0000004f", "__CALLFILENAME=exten-xxxxxxx1-xxxxxxx0-20230219-202236-1676825556.270") in new stack
-- Executing [s#sub-record-check:22] Goto("SIP/GoTrunk-0000004f", "exten,1") in new stack
-- Goto (sub-record-check,exten,1)
-- Executing [exten#sub-record-check:1] GotoIf("SIP/GoTrunk-0000004f", "0?callee") in new stack
-- Executing [exten#sub-record-check:2] Set("SIP/GoTrunk-0000004f", "__REC_POLICY_MODE=dontcare") in new stack
-- Executing [exten#sub-record-check:3] GotoIf("SIP/GoTrunk-0000004f", "1?caller") in new stack
-- Goto (sub-record-check,exten,10)
-- Executing [exten#sub-record-check:10] Set("SIP/GoTrunk-0000004f", "__REC_POLICY_MODE=") in new stack
-- Executing [exten#sub-record-check:11] GosubIf("SIP/GoTrunk-0000004f", "0?record,1(exten,xxxxxxx1,xxxxxxx0)") in new stack
-- Executing [exten#sub-record-check:12] Return("SIP/GoTrunk-0000004f", "") in new stack
-- Executing [s#macro-exten-vm:7] Macro("SIP/GoTrunk-0000004f", "dial-one,15,tr,xxxxxxx1") in new stack
-- Executing [s#macro-dial-one:1] Set("SIP/GoTrunk-0000004f", "DEXTEN=xxxxxxx1") in new stack
-- Executing [s#macro-dial-one:2] Set("SIP/GoTrunk-0000004f", "DIALSTATUS_CW=") in new stack
-- Executing [s#macro-dial-one:3] GosubIf("SIP/GoTrunk-0000004f", "0?screen,1()") in new stack
-- Executing [s#macro-dial-one:4] GosubIf("SIP/GoTrunk-0000004f", "0?cf,1()") in new stack
-- Executing [s#macro-dial-one:5] GotoIf("SIP/GoTrunk-0000004f", "1?skip1") in new stack
-- Goto (macro-dial-one,s,8)
-- Executing [s#macro-dial-one:8] GotoIf("SIP/GoTrunk-0000004f", "0?nodial") in new stack
-- Executing [s#macro-dial-one:9] GotoIf("SIP/GoTrunk-0000004f", "0?continue") in new stack
-- Executing [s#macro-dial-one:10] Set("SIP/GoTrunk-0000004f", "EXTHASCW=ENABLED") in new stack
-- Executing [s#macro-dial-one:11] GotoIf("SIP/GoTrunk-0000004f", "0?next1:cwinusebusy") in new stack
-- Goto (macro-dial-one,s,23)
-- Executing [s#macro-dial-one:23] GotoIf("SIP/GoTrunk-0000004f", "1?next3:continue") in new stack
-- Goto (macro-dial-one,s,24)
-- Executing [s#macro-dial-one:24] ExecIf("SIP/GoTrunk-0000004f", "0?Set(DIALSTATUS_CW=BUSY)") in new stack
-- Executing [s#macro-dial-one:25] GotoIf("SIP/GoTrunk-0000004f", "0?nodial") in new stack
-- Executing [s#macro-dial-one:26] GosubIf("SIP/GoTrunk-0000004f", "1?dstring,1():dlocal,1()") in new stack
-- Executing [dstring#macro-dial-one:1] Set("SIP/GoTrunk-0000004f", "DSTRING=") in new stack
-- Executing [dstring#macro-dial-one:2] Set("SIP/GoTrunk-0000004f", "DEVICES=xxxxxxx1") in new stack
-- Executing [dstring#macro-dial-one:3] ExecIf("SIP/GoTrunk-0000004f", "0?Return()") in new stack
-- Executing [dstring#macro-dial-one:4] ExecIf("SIP/GoTrunk-0000004f", "0?Set(DEVICES=2198001)") in new stack
-- Executing [dstring#macro-dial-one:5] Set("SIP/GoTrunk-0000004f", "LOOPCNT=1") in new stack
-- Executing [dstring#macro-dial-one:6] Set("SIP/GoTrunk-0000004f", "ITER=1") in new stack
-- Executing [dstring#macro-dial-one:7] Set("SIP/GoTrunk-0000004f", "THISDIAL=SIP/xxxxxxx1") in new stack
-- Executing [dstring#macro-dial-one:8] GosubIf("SIP/GoTrunk-0000004f", "1?zap2dahdi,1()") in new stack
-- Executing [zap2dahdi#macro-dial-one:1] ExecIf("SIP/GoTrunk-0000004f", "0?Return()") in new stack
-- Executing [zap2dahdi#macro-dial-one:2] Set("SIP/GoTrunk-0000004f", "NEWDIAL=") in new stack
-- Executing [zap2dahdi#macro-dial-one:3] Set("SIP/GoTrunk-0000004f", "LOOPCNT2=1") in new stack
-- Executing [zap2dahdi#macro-dial-one:4] Set("SIP/GoTrunk-0000004f", "ITER2=1") in new stack
-- Executing [zap2dahdi#macro-dial-one:5] Set("SIP/GoTrunk-0000004f", "THISPART2=SIP/xxxxxxx1") in new stack
-- Executing [zap2dahdi#macro-dial-one:6] ExecIf("SIP/GoTrunk-0000004f", "0?Set(THISPART2=DAHDI/xxxxxxx1)") in new stack
-- Executing [zap2dahdi#macro-dial-one:7] Set("SIP/GoTrunk-0000004f", "NEWDIAL=SIP/xxxxxxx1&") in new stack
-- Executing [zap2dahdi#macro-dial-one:8] Set("SIP/GoTrunk-0000004f", "ITER2=2") in new stack
-- Executing [zap2dahdi#macro-dial-one:9] GotoIf("SIP/GoTrunk-0000004f", "0?begin2") in new stack
-- Executing [zap2dahdi#macro-dial-one:10] Set("SIP/GoTrunk-0000004f", "THISDIAL=SIP/xxxxxxx1") in new stack
-- Executing [zap2dahdi#macro-dial-one:11] Return("SIP/GoTrunk-0000004f", "") in new stack
-- Executing [dstring#macro-dial-one:9] Set("SIP/GoTrunk-0000004f", "DSTRING=SIP/xxxxxxx1&") in new stack
-- Executing [dstring#macro-dial-one:10] Set("SIP/GoTrunk-0000004f", "ITER=2") in new stack
-- Executing [dstring#macro-dial-one:11] GotoIf("SIP/GoTrunk-0000004f", "0?begin") in new stack
-- Executing [dstring#macro-dial-one:12] Set("SIP/GoTrunk-0000004f", "DSTRING=SIP/xxxxxxx1") in new stack
-- Executing [dstring#macro-dial-one:13] Return("SIP/GoTrunk-0000004f", "") in new stack
-- Executing [s#macro-dial-one:27] GotoIf("SIP/GoTrunk-0000004f", "0?nodial") in new stack
-- Executing [s#macro-dial-one:28] GotoIf("SIP/GoTrunk-0000004f", "0?skiptrace") in new stack
-- Executing [s#macro-dial-one:29] GosubIf("SIP/GoTrunk-0000004f", "1?ctset,1():ctclear,1()") in new stack
-- Executing [ctset#macro-dial-one:1] Set("SIP/GoTrunk-0000004f", "DB(CALLTRACE/xxxxxxx1)=xxxxxxx0") in new stack
-- Executing [ctset#macro-dial-one:2] Return("SIP/GoTrunk-0000004f", "") in new stack
-- Executing [s#macro-dial-one:30] Set("SIP/GoTrunk-0000004f", "D_OPTIONS=tr") in new stack
-- Executing [s#macro-dial-one:31] ExecIf("SIP/GoTrunk-0000004f", "0?SIPAddHeader(Alert-Info: )") in new stack
-- Executing [s#macro-dial-one:32] ExecIf("SIP/GoTrunk-0000004f", "0?SIPAddHeader()") in new stack
-- Executing [s#macro-dial-one:33] ExecIf("SIP/GoTrunk-0000004f", "1?Set(CHANNEL(musicclass)=default)") in new stack
-- Executing [s#macro-dial-one:34] GosubIf("SIP/GoTrunk-0000004f", "0?qwait,1()") in new stack
-- Executing [s#macro-dial-one:35] Set("SIP/GoTrunk-0000004f", "__CWIGNORE=") in new stack
-- Executing [s#macro-dial-one:36] Set("SIP/GoTrunk-0000004f", "__KEEPCID=TRUE") in new stack
-- Executing [s#macro-dial-one:37] GotoIf("SIP/GoTrunk-0000004f", "0?usegoto,1") in new stack
-- Executing [s#macro-dial-one:38] GotoIf("SIP/GoTrunk-0000004f", "1?godial") in new stack
-- Goto (macro-dial-one,s,43)
-- Executing [s#macro-dial-one:43] Dial("SIP/GoTrunk-0000004f", "SIP/xxxxxxx1,15,tr") in new stack
[2023-02-19 20:22:36] WARNING[27047][C-00000054]: app_dial.c:2591 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [s#macro-dial-one:44] ExecIf("SIP/GoTrunk-0000004f", "0?MacroExit()") in new stack
-- Executing [s#macro-dial-one:45] ExecIf("SIP/GoTrunk-0000004f", "0?Set(DIALSTATUS=)") in new stack
-- Executing [s#macro-dial-one:46] GosubIf("SIP/GoTrunk-0000004f", "0?s-CHANUNAVAIL,1()") in new stack
-- Executing [s#macro-dial-one:47] MacroExit("SIP/GoTrunk-0000004f", "") in new stack
-- Executing [s#macro-exten-vm:8] Set("SIP/GoTrunk-0000004f", "SV_DIALSTATUS=CHANUNAVAIL") in new stack
-- Executing [s#macro-exten-vm:9] GosubIf("SIP/GoTrunk-0000004f", "0?docfu,1()") in new stack
-- Executing [s#macro-exten-vm:10] GosubIf("SIP/GoTrunk-0000004f", "0?docfb,1()") in new stack
-- Executing [s#macro-exten-vm:11] Set("SIP/GoTrunk-0000004f", "DIALSTATUS=CHANUNAVAIL") in new stack
-- Executing [s#macro-exten-vm:12] ExecIf("SIP/GoTrunk-0000004f", "1?MacroExit()") in new stack
-- Executing [xxxxxxx1#from-did-direct:3] Set("SIP/GoTrunk-0000004f", "__PICKUPMARK=") in new stack
-- Executing [xxxxxxx1#from-did-direct:4] GotoIf("SIP/GoTrunk-0000004f", "1?mainivr,s,1") in new stack
-- Goto (mainivr,s,1)
-- Executing [s#mainivr:1] Macro("SIP/GoTrunk-0000004f", "hangupcall,") in new stack
-- Executing [s#macro-hangupcall:1] GotoIf("SIP/GoTrunk-0000004f", "1?endmixmoncheck") in new stack
-- Goto (macro-hangupcall,s,20)
-- Executing [s#macro-hangupcall:20] NoOp("SIP/GoTrunk-0000004f", "End of MIXMON check") in new stack
-- Executing [s#macro-hangupcall:21] GotoIf("SIP/GoTrunk-0000004f", "1?nomeetmemon") in new stack
-- Goto (macro-hangupcall,s,39)
-- Executing [s#macro-hangupcall:39] NoOp("SIP/GoTrunk-0000004f", "End of MEETME check") in new stack
-- Executing [s#macro-hangupcall:40] GotoIf("SIP/GoTrunk-0000004f", "1?noautomon") in new stack
-- Goto (macro-hangupcall,s,45)
-- Executing [s#macro-hangupcall:45] NoOp("SIP/GoTrunk-0000004f", "TOUCH_MONITOR_OUTPUT=") in new stack
-- Executing [s#macro-hangupcall:46] GotoIf("SIP/GoTrunk-0000004f", "1?noautomon2") in new stack
-- Goto (macro-hangupcall,s,52)
-- Executing [s#macro-hangupcall:52] NoOp("SIP/GoTrunk-0000004f", "MONITOR_FILENAME=") in new stack
-- Executing [s#macro-hangupcall:53] GotoIf("SIP/GoTrunk-0000004f", "1?noautomon3") in new stack
-- Goto (macro-hangupcall,s,59)
-- Executing [s#macro-hangupcall:59] NoOp("SIP/GoTrunk-0000004f", "MIXMONITOR_FILENAME=") in new stack
-- Executing [s#macro-hangupcall:60] GotoIf("SIP/GoTrunk-0000004f", "1?noautomon4") in new stack
-- Goto (macro-hangupcall,s,62)
-- Executing [s#macro-hangupcall:62] NoOp("SIP/GoTrunk-0000004f", "ONETOUCH_RECFILE=") in new stack
-- Executing [s#macro-hangupcall:63] NoOp("SIP/GoTrunk-0000004f", "CDR recordingfile set to: ") in new stack
-- Executing [s#macro-hangupcall:64] GotoIf("SIP/GoTrunk-0000004f", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,67)
-- Executing [s#macro-hangupcall:67] GotoIf("SIP/GoTrunk-0000004f", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,70)
-- Executing [s#macro-hangupcall:70] GotoIf("SIP/GoTrunk-0000004f", "1?theend") in new stack
-- Goto (macro-hangupcall,s,72)
-- Executing [s#macro-hangupcall:72] AGI("SIP/GoTrunk-0000004f", "hangup.agi") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/hangup.agi
-- <SIP/GoTrunk-0000004f>AGI Script hangup.agi completed, returning 0
-- Executing [s#macro-hangupcall:73] Hangup("SIP/GoTrunk-0000004f", "") in new stack
== Spawn extension (macro-hangupcall, s, 73) exited non-zero on 'SIP/GoTrunk-0000004f' in macro 'hangupcall'
== Spawn extension (mainivr, s, 1) exited non-zero on 'SIP/GoTrunk-0000004f'
-- Executing [h#mainivr:1] Macro("SIP/GoTrunk-0000004f", "hangupcall,") in new stack
-- Executing [s#macro-hangupcall:1] GotoIf("SIP/GoTrunk-0000004f", "1?endmixmoncheck") in new stack
-- Goto (macro-hangupcall,s,20)
-- Executing [s#macro-hangupcall:20] NoOp("SIP/GoTrunk-0000004f", "End of MIXMON check") in new stack
-- Executing [s#macro-hangupcall:21] GotoIf("SIP/GoTrunk-0000004f", "1?nomeetmemon") in new stack
-- Goto (macro-hangupcall,s,39)
-- Executing [s#macro-hangupcall:39] NoOp("SIP/GoTrunk-0000004f", "End of MEETME check") in new stack
-- Executing [s#macro-hangupcall:40] GotoIf("SIP/GoTrunk-0000004f", "1?noautomon") in new stack
-- Goto (macro-hangupcall,s,45)
-- Executing [s#macro-hangupcall:45] NoOp("SIP/GoTrunk-0000004f", "TOUCH_MONITOR_OUTPUT=") in new stack
-- Executing [s#macro-hangupcall:46] GotoIf("SIP/GoTrunk-0000004f", "1?noautomon2") in new stack
-- Goto (macro-hangupcall,s,52)
-- Executing [s#macro-hangupcall:52] NoOp("SIP/GoTrunk-0000004f", "MONITOR_FILENAME=") in new stack
-- Executing [s#macro-hangupcall:53] GotoIf("SIP/GoTrunk-0000004f", "1?noautomon3") in new stack
-- Goto (macro-hangupcall,s,59)
-- Executing [s#macro-hangupcall:59] NoOp("SIP/GoTrunk-0000004f", "MIXMONITOR_FILENAME=") in new stack
-- Executing [s#macro-hangupcall:60] GotoIf("SIP/GoTrunk-0000004f", "1?noautomon4") in new stack
-- Goto (macro-hangupcall,s,62)
-- Executing [s#macro-hangupcall:62] NoOp("SIP/GoTrunk-0000004f", "ONETOUCH_RECFILE=") in new stack
-- Executing [s#macro-hangupcall:63] NoOp("SIP/GoTrunk-0000004f", "CDR recordingfile set to: ") in new stack
-- Executing [s#macro-hangupcall:64] GotoIf("SIP/GoTrunk-0000004f", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,67)
-- Executing [s#macro-hangupcall:67] GotoIf("SIP/GoTrunk-0000004f", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,70)
-- Executing [s#macro-hangupcall:70] GotoIf("SIP/GoTrunk-0000004f", "1?theend") in new stack
-- Goto (macro-hangupcall,s,72)
-- Executing [s#macro-hangupcall:72] AGI("SIP/GoTrunk-0000004f", "hangup.agi") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/hangup.agi
-- <SIP/GoTrunk-0000004f>AGI Script hangup.agi completed, returning 0
-- Executing [s#macro-hangupcall:73] Hangup("SIP/GoTrunk-0000004f", "") in new stack
== Spawn extension (macro-hangupcall, s, 73) exited non-zero on 'SIP/GoTrunk-0000004f' in macro 'hangupcall'
I add some extension with number xxxxxxx1 but always it's unrechable.
Also I added custome destniation to mainivr,s,1 but never route to this agi script.
I'm using my own phpagi on older asterisk pefectly: https://github.com/hmdshariati/phpagi

Related

Why is the Erlang riak client crashing?

I have followed the riak installation instructions for Ubuntu and the readme for the riak erlang client. At the point in the client instructions where a ping is sent to test the connection, I get the error report below indicating a missing module. In the report, I've replace my server IP with IP_Of_Server.
How do I make sure the module is included in the compile of the client? Where should it be located?
riakc_pb_socket:ping(Pid).
=ERROR REPORT==== 28-Apr-2022::20:04:49.468604 ===
** Generic server <0.81.0> terminating
** Last message in was {req,rpbpingreq,60000}
** When Server state == {state,"IP_Of_Server",8087,false,false,#Port<0.7>,
false,gen_tcp,undefined,
{[],[]},
1,[],infinity,undefined,undefined,undefined,
undefined,[],100,false,
{false,0}}
** Reason for termination ==
** {'module could not be loaded',
[{riak_pb_codec,encode,[rpbpingreq],[]},
{riakc_pb_socket,encode_request_message,1,
[{file,"/home/pseudo/riak-erlang-client/src/riakc_pb_socket.erl"},
{line,3297}]},
{riakc_pb_socket,send_request,2,
[{file,"/home/pseudo/riak-erlang-client/src/riakc_pb_socket.erl"},
{line,3269}]},
{riakc_pb_socket,handle_call,3,
[{file,"/home/pseudo/riak-erlang-client/src/riakc_pb_socket.erl"},
{line,2089}]},
{gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,661}]},
{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,690}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}
** Client <0.78.0> stacktrace
** [{gen,do_call,4,[{file,"gen.erl"},{line,167}]},
{gen_server,call,3,[{file,"gen_server.erl"},{line,219}]},
{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,684}]},
{shell,exprs,7,[{file,"shell.erl"},{line,686}]},
{shell,eval_exprs,7,[{file,"shell.erl"},{line,642}]},
{shell,eval_loop,3,[{file,"shell.erl"},{line,627}]}]
=CRASH REPORT==== 28-Apr-2022::20:04:49.469247 ===
crasher:
initial call: riakc_pb_socket:init/1
pid: <0.81.0>
registered_name: []
exception error: undefined function riak_pb_codec:encode/1
in function riakc_pb_socket:encode_request_message/1 (/home/pseudo/riak-erlang-client/src/riakc_pb_socket.erl, line 3297)
in call from riakc_pb_socket:send_request/2 (/home/pseudo/riak-erlang-client/src/riakc_pb_socket.erl, line 3269)
in call from riakc_pb_socket:handle_call/3 (/home/pseudo/riak-erlang-client/src/riakc_pb_socket.erl, line 2089)
in call from gen_server:try_handle_call/4 (gen_server.erl, line 661)
in call from gen_server:handle_msg/6 (gen_server.erl, line 690)
ancestors: [<0.78.0>]
message_queue_len: 0
messages: []
links: [<0.78.0>,#Port<0.7>]
dictionary: []
trap_exit: false
status: running
heap_size: 6772
stack_size: 27
reductions: 13740
neighbours:
neighbour:
pid: <0.78.0>
registered_name: []
initial_call: {erlang,apply,2}
current_function: {gen,do_call,4}
ancestors: []
message_queue_len: 0
links: [<0.77.0>,<0.81.0>]
trap_exit: false
status: waiting
heap_size: 610
stack_size: 34
reductions: 4167
current_stacktrace: [{gen,do_call,4,[{file,"gen.erl"},{line,167}]},
{gen_server,call,3,[{file,"gen_server.erl"},{line,219}]},
{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,684}]},
{shell,exprs,7,[{file,"shell.erl"},{line,686}]},
{shell,eval_exprs,7,[{file,"shell.erl"},{line,642}]},
{shell,eval_loop,3,[{file,"shell.erl"},{line,627}]}]
** exception exit: undef
in function riak_pb_codec:encode/1
called as riak_pb_codec:encode(rpbpingreq)
in call from riakc_pb_socket:encode_request_message/1 (/home/pseudo/riak-erlang-client/src/riakc_pb_socket.erl, line 3297)
in call from riakc_pb_socket:send_request/2 (/home/pseudo/riak-erlang-client/src/riakc_pb_socket.erl, line 3269)
in call from riakc_pb_socket:handle_call/3 (/home/pseudo/riak-erlang-client/src/riakc_pb_socket.erl, line 2089)
in call from gen_server:try_handle_call/4 (gen_server.erl, line 661)
in call from gen_server:handle_msg/6 (gen_server.erl, line 690)
in call from proc_lib:init_p_do_apply/3 (proc_lib.erl, line 249)
Here is what I have found.
When starting the REPL, the line
erl -pa ./riak-erlang-client/_build/default/lib/riakc/ebin ./riak-erlang-client/_build/default/lib/riakc/deps/*/ebin
was missing a directory declaration. I changed it to be
erl -pa ./riak-erlang-client/_build/default/lib/riakc/ebin ./riak-erlang-client/_build/default/lib/riakc/deps/*/ebin ./riak-erlang-client/_build/default/lib/riak_pb/ebin/

Issues with reading file in erlang

So, I am trying to read and write into a file.
While writing into the file, I need to check if a particular index exist in file then I don't write and throw error.
The data in file will look like this:
{1,{data,dcA,1}}.
{2, {data, dcA, 2}}.
{3,{data,dcA,3}}.
I added the dot at the end of each line because file:consult() needs the file like this.
Which is in this format.
{Index, {Data, Node, Index}}
When I have to add a new file, I check with this Index.
Here's what I have tried so far - https://pastebin.com/apnWLk45
And I run it like this:
193> {ok, P9} = poc:start(test1, self()).
{ok,<0.2863.0>}
194> poc:add(P9, Node, {6, data}).
In poc:add/3, P9 is the process id from the file:open.
I defined before in shell as dcA
And the third is the data - which is in this format - {Index, data}
Since I am using file:consult/1, it takes the filename as parameter. At that point, I only have process id. So I take the name from
file:pid2name(_Server).
This runs perfectly when I run it for the first time.
When I run this again - poc:add(P9, Node, {6, data2}), I get an error in this line file:pid2name(_Server).
exception error: no match of right hand side value undefined
How can I solve this issue?
I am new to Erlang. Just been a week that I started learning.
I am trying to read and write into a file. While writing into the
file, I need to check if a particular index exist in file then I don't
write and throw error.
A DETS table can easily do what you want:
-module(my).
-compile(export_all).
open_table() ->
dets:open_file(my_data, [{type, set}, {file, "./my_data.dets"}]).
close_table() ->
dets:close(my_data).
clear_table() ->
dets:delete_all_objects(my_data).
insert({Key, _Rest}=Data) ->
case dets:member(my_data, Key) of
true -> throw(index_already_exists);
false -> dets:insert(my_data, Data)
end.
all_items() ->
dets:match(my_data, '$1').
In the shell:
~/erlang_programs$ erl
Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V9.2 (abort with ^G)
1> c(my).
my.erl:2: Warning: export_all flag enabled - all functions will be exported
{ok,my}
2> my:open_table().
{ok,my_data}
3> my:clear_table().
ok
4> my:all_items().
[]
5> my:insert({1, {data, a, b}}).
ok
6> my:insert({2, {data, c, d}}).
ok
7> my:insert({3, {data, e, f}}).
ok
8> my:all_items().
[[{1,{data,a,b}}],[{2,{data,c,d}}],[{3,{data,e,f}}]]
9> my:insert({1, {data, e, f}}).
** exception throw: index_already_exists
in function my:insert/1 (my.erl, line 15)
When I run this again - poc:add(P9, Node, {6, data2}), I get an error
in this line file:pid2name(_Server):
exception error: no match of right hand side value undefined
When a process opens a file, it becomes linked to a process that handles the file I/O, which means that if the process that opens the file terminates abnormally, the I/O process will also terminate. Here is an example:
-module(my).
-compile(export_all).
start() ->
{ok, Pid} = file:open('data.txt', [read, write]),
spawn(my, add, [Pid, x, y]),
exit("bye").
add(Pid, _X, _Y) ->
timer:sleep(1000), %Let start() process terminate.
{ok, Fname} = file:pid2name(Pid),
io:format("~s~n", [Fname]).
In the shell:
1> c(my).
my.erl:2: Warning: export_all flag enabled - all functions will be exported
{ok,my}
2> my:start().
** exception exit: "bye"
in function my:start/0 (my.erl, line 7)
3>
=ERROR REPORT==== 25-Jun-2018::13:28:48 ===
Error in process <0.72.0> with exit value:
{{badmatch,undefined},[{my,add,3,[{file,"my.erl"},{line,12}]}]}
According to the pid2name() docs:
pid2name(Pid) -> {ok, Filename} | undefined
the function can return undefined, which is what the error message is saying happened.

API Error ORA-29270: too many open HTTP requests

We are getting the ORA-29270:too many open HTTP requests when try to execute the Below Procedure. Please let us know where and all we need to close the Request and Response , Please provide one of the Procedure example how we can handle the exception. and all the request should process Properly.
BEGIN
l_http_request := utl_http.begin_request (p_url, 'POST');
BEGIN
-- build the request by using utl_http.set_header() and utl_http.write_text()
-- ...
-- process the request and get the response:
l_http_response := utl_http.get_response (l_http_request);
WHEN OTHERS THEN
--- utl_http.end_response(http_resp);
error_code := '91';
error_desc := SQLERRM || ' Unhandled Exception';
END;
BEGIN
LOOP
-- read the response using utl_http.read_line()
-- ...
END LOOP;
-- Complete the request and response, and close the network connection
utl_http.end_response(l_http_response);
EXCEPTION
when utl_http.end_of_body then
utl_http.end_response(http_resp);
WHEN error_out THEN
NULL;
WHEN OTHERS THEN
--- utl_http.end_response(http_resp);
error_code := '91';
error_desc := SQLERRM || ' Unhandled Exception';
END;
END;
Hello: I happen to be addressing the same error in my own code. I fixed mine by adding utl_http.end_response(l_http_response) - which you already have.
But I notice you use two different arguments in your end_response call. Try changing
utl_http.end_response(http_resp);
to
utl_http.end_response(l_http_response);
in your exception block. I hope this helps. Cheers, Hawk

SQLITE_ERROR: Connection is closed when connecting from Spark via JDBC to SQLite database

I am using Apache Spark 1.5.1 and trying to connect to a local SQLite database named clinton.db. Creating a data frame from a table of the database works fine but when I do some operations on the created object, I get the error below which says "SQL error or missing database (Connection is closed)". Funny thing is that I get the result of the operation nevertheless. Any idea what I can do to solve the problem, i.e., avoid the error?
Start command for spark-shell:
../spark/bin/spark-shell --master local[8] --jars ../libraries/sqlite-jdbc-3.8.11.1.jar --classpath ../libraries/sqlite-jdbc-3.8.11.1.jar
Reading from the database:
val emails = sqlContext.read.format("jdbc").options(Map("url" -> "jdbc:sqlite:../data/clinton.sqlite", "dbtable" -> "Emails")).load()
Simple count (fails):
emails.count
Error:
15/09/30 09:06:39 WARN JDBCRDD: Exception closing statement
java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (Connection is closed)
at org.sqlite.core.DB.newSQLException(DB.java:890)
at org.sqlite.core.CoreStatement.internalClose(CoreStatement.java:109)
at org.sqlite.jdbc3.JDBC3Statement.close(JDBC3Statement.java:35)
at org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$$anon$1.org$apache$spark$sql$execution$datasources$jdbc$JDBCRDD$$anon$$close(JDBCRDD.scala:454)
at org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$$anon$1$$anonfun$8.apply(JDBCRDD.scala:358)
at org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$$anon$1$$anonfun$8.apply(JDBCRDD.scala:358)
at org.apache.spark.TaskContextImpl$$anon$1.onTaskCompletion(TaskContextImpl.scala:60)
at org.apache.spark.TaskContextImpl$$anonfun$markTaskCompleted$1.apply(TaskContextImpl.scala:79)
at org.apache.spark.TaskContextImpl$$anonfun$markTaskCompleted$1.apply(TaskContextImpl.scala:77)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
at org.apache.spark.TaskContextImpl.markTaskCompleted(TaskContextImpl.scala:77)
at org.apache.spark.scheduler.Task.run(Task.scala:90)
at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:214)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
res1: Long = 7945
I got the same error today, and the important line is just before the exception:
15/11/30 12:13:02 INFO jdbc.JDBCRDD: closed connection
15/11/30 12:13:02 WARN jdbc.JDBCRDD: Exception closing statement
java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (Connection is closed)
at org.sqlite.core.DB.newSQLException(DB.java:890)
at org.sqlite.core.CoreStatement.internalClose(CoreStatement.java:109)
at org.sqlite.jdbc3.JDBC3Statement.close(JDBC3Statement.java:35)
at org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$$anon$1.org$apache$spark$sql$execution$datasources$jdbc$JDBCRDD$$anon$$close(JDBCRDD.scala:454)
So Spark succeeded to close the JDBC connection, and then it fails to close the JDBC statement
Looking at the source, close() is called twice:
Line 358 (org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD, Spark 1.5.1)
context.addTaskCompletionListener{ context => close() }
Line 469
override def hasNext: Boolean = {
if (!finished) {
if (!gotNext) {
nextValue = getNext()
if (finished) {
close()
}
gotNext = true
}
}
!finished
}
If you look at the close() method (line 443)
def close() {
if (closed) return
you can see that it checks the variable closed, but that value is never set to true.
If I see it correctly, this bug is still in the master. I have filed a bug report.
Source: JDBCRDD.scala (lines numbers differ slightly)

Catch hangup while Asterisk AMD is checking

Im having this problem just when i answer the phone and then hangup, but asterisk does not detect the hangup while AMD is detecting ?
Asterisk 11.11
-- Executing [09XXXXXXXX#appel-sortant:10] NoOp("Local/09XXXXXXXX#appel-sortant-40f9;2", "Next = 0") in new stack
-- Executing [09XXXXXXXX#appel-sortant:11] Set("Local/09XXXXXXXX#appel-sortant-40f9;2", "GLOBAL(NEXT)=0") in new stack
== Setting global variable 'NEXT' to '0'
-- Executing [09XXXXXXXX#appel-sortant:12] Dial("Local/09XXXXXXXX#appel-sortant-40f9;2", "SIP/09XXXXXXXX#forfait-ovh,20,gtr") in new stack
== Using SIP RTP CoS mark 5
-- Called 09XXXXXXXX#forfait-ovh
-- SIP/forfait-ovh-00000000 is ringing
-- SIP/forfait-ovh-00000000 is making progress passing it to Local/09XXXXXXXX#appel-sortant-40f9;2
-- SIP/forfait-ovh-00000000 answered Local/09XXXXXXXX#appel-sortant-40f9;2
> Channel Local/09XXXXXXXX#appel-sortant-40f9;1 was answered.
-- Executing [s#appel-sortant:1] Playback("Local/09XXXXXXXX#appel-sortant-40f9;1", "silence/1") in new stack
-- <Local/09XXXXXXXX#appel-sortant-40f9;1> Playing 'silence/1.gsm' (language 'en')
== Spawn extension (appel-sortant, 09XXXXXXXX, 12) exited non-zero on 'Local/09XXXXXXXX#appel-sortant-40f9;2'
-- Executing [s#appel-sortant:2] AMD("SIP/forfait-ovh-00000000", "") in new stack
-- AMD: SIP/forfait-ovh-00000000 09XXXXXXXX (null) (Fmt: 64)
-- AMD: initialSilence [2500] greeting [1500] afterGreetingSilence [800] totalAnalysisTime [5000] minimumWordLength [100] betweenWordsSilence [50] maximumNumberOfWords [3] silenceThreshold [256] maximumWordLength [5000]
-- AMD: Channel [SIP/forfait-ovh-00000000]. Changed state to STATE_IN_SILENCE
-- AMD: Channel [SIP/forfait-ovh-00000000]. HANGUP
[Aug 31 09:19:35] NOTICE[32712]: pbx_spool.c:349 attempt_thread: Call completed to Local/09XXXXXXXX#appel-sortant
extensions.conf
exten => s,1,Playback(silence/1)
exten => s,n,AMD()
exten => s,n,NoOp(AMDSTATUS = ${AMDSTATUS})
exten => s,n,GotoIf($[${AMDSTATUS}=MACHINE]?appel-sortant-mach,s,1:appel-sortant-humn,s,1)
I resolved the problem implementing the hangup handler.
Hangup Handlers
Asterisk DO detect hangup on called party ALWAYS.
There are no way prevent that.
Check your provider/FXO gate, probably it just not detect hangup.

Resources