Hello.
I need make a simple AGI script than make a call to number. It’s all.
Hello.
I need make a simple AGI script than make a call to number. It’s all.
Show us what have you done so far, where do you need help ?
ok.
I have in custom_extensions:
exten => 12345,1,Dial(DAHDI/g0/cellphone)
exten => h,1,DeadAGI(recall.php)
If i dial 12345 , asterisk make call to cellphone, if call is drop then run recall.php
in recall.php :
<?php echo "EXEC Dial DAHDI/g0/cellphone"; ?>to make a recall to my cellphone.
but this not work.
please help
Please show the CLI OUTPUT and enable the agi debug " agi set debug on"
I done a similar call back script using Asterisk’s cmd System() and Originate().
– Executing [12345@from-internal:1] Dial(“SIP/136-00000000”, “DAHDI/g0/mycellphonehere”) in new stack
– Requested transfer capability: 0x00 - SPEECH
– Called g0/mycellphone
– DAHDI/1-1 is proceeding passing it to SIP/136-00000000
– DAHDI/1-1 is ringing
– DAHDI/1-1 answered SIP/136-00000000
– Channel 0/1, span 1 got hangup request, cause 31
– Executing [h@from-internal:1] Macro(“SIP/136-00000000”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/136-00000000”, “1?endmixmoncheck”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] NoOp(“SIP/136-00000000”, “End of MIXMON check”) in new stack
– Executing [s@macro-hangupcall:10] GotoIf(“SIP/136-00000000”, “1?nomeetmemon”) in new stack
– Goto (macro-hangupcall,s,12)
– Executing [s@macro-hangupcall:12] NoOp(“SIP/136-00000000”, “MEETME_RECORDINGFILE=”) in new stack
– Executing [s@macro-hangupcall:13] GotoIf(“SIP/136-00000000”, “1?noautomon”) in new stack
– Goto (macro-hangupcall,s,15)
– Executing [s@macro-hangupcall:15] NoOp(“SIP/136-00000000”, “TOUCH_MONITOR_OUTPUT=”) in new stack
– Executing [s@macro-hangupcall:16] GotoIf(“SIP/136-00000000”, “1?noautomon2”) in new stack
– Goto (macro-hangupcall,s,18)
– Executing [s@macro-hangupcall:18] NoOp(“SIP/136-00000000”, “MONITOR_FILENAME=”) in new stack
– Executing [s@macro-hangupcall:19] GotoIf(“SIP/136-00000000”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,22)
– Executing [s@macro-hangupcall:22] GotoIf(“SIP/136-00000000”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,25)
– Executing [s@macro-hangupcall:25] GotoIf(“SIP/136-00000000”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,27)
– Executing [s@macro-hangupcall:27] Hangup(“SIP/136-00000000”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 27) exited non-zero on ‘SIP/136-00000000’ in macro ‘hangupcall’
== Spawn h extension (from-internal, h, 1) exited non-zero on ‘SIP/136-00000000’
– Hungup ‘DAHDI/1-1’
== Spawn extension (from-internal, 12345, 1) exited non-zero on ‘SIP/136-00000000’
– Executing [h@from-internal:1] Macro(“SIP/136-00000000”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/136-00000000”, “1?endmixmoncheck”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] NoOp(“SIP/136-00000000”, “End of MIXMON check”) in new stack
– Executing [s@macro-hangupcall:10] GotoIf(“SIP/136-00000000”, “1?nomeetmemon”) in new stack
– Goto (macro-hangupcall,s,12)
– Executing [s@macro-hangupcall:12] NoOp(“SIP/136-00000000”, “MEETME_RECORDINGFILE=”) in new stack
– Executing [s@macro-hangupcall:13] GotoIf(“SIP/136-00000000”, “1?noautomon”) in new stack
– Goto (macro-hangupcall,s,15)
– Executing [s@macro-hangupcall:15] NoOp(“SIP/136-00000000”, “TOUCH_MONITOR_OUTPUT=”) in new stack
– Executing [s@macro-hangupcall:16] GotoIf(“SIP/136-00000000”, “1?noautomon2”) in new stack
– Goto (macro-hangupcall,s,18)
– Executing [s@macro-hangupcall:18] NoOp(“SIP/136-00000000”, “MONITOR_FILENAME=”) in new stack
– Executing [s@macro-hangupcall:19] GotoIf(“SIP/136-00000000”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,22)
– Executing [s@macro-hangupcall:22] GotoIf(“SIP/136-00000000”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,25)
– Executing [s@macro-hangupcall:25] GotoIf(“SIP/136-00000000”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,27)
– Executing [s@macro-hangupcall:27] Hangup(“SIP/136-00000000”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 27) exited non-zero on ‘SIP/136-00000000’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/136-00000000’
you can help me? please i need make this
Your script (recall.php) is never invoked in the h extension. And you are using Freepbx it is extremely difficult to debug your dialplan.
how can i do, iam new in this
You have 3 choices.
1-)Start by installing Asterisk and writing your own dialplan, if this is the case you can get help in this forum in whole process.
2-) Keep your Freepbx distro and ask for help in the freepbx.org/forums
3-) Paid to a professional, and this will do the job for you. viewforum.php?f=17