MacOSX 10.6, asterisk-1.4.26.1, FreePBX-2.6.0RC2.1 extension issues

I wonder if there is a dialparties.agi problem still - all the extensions show up on the FOP as hung-up:

== Manager ‘admin’ logged off from 127.0.0.1
– Executing [1633@from-sip-external:1] NoOp(“SIP/192.168.243.24-01034200”, “Received incoming SIP connection from unknown peer to 1633”) in new stack
– Executing [1633@from-sip-external:2] Set(“SIP/192.168.243.24-01034200”, “DID=1633”) in new stack
– Executing [1633@from-sip-external:3] Goto(“SIP/192.168.243.24-01034200”, “s|1”) in new stack
– Goto (from-sip-external,s,1)
– Executing [s@from-sip-external:1] GotoIf(“SIP/192.168.243.24-01034200”, “1?checklang:noanonymous”) in new stack
– Goto (from-sip-external,s,2)
– Executing [s@from-sip-external:2] GotoIf(“SIP/192.168.243.24-01034200”, “0?setlanguage:from-trunk|1633|1”) in new stack
– Goto (from-trunk,1633,1)
– Executing [1633@from-trunk:1] GotoIf(“SIP/192.168.243.24-01034200”, “1?ext-local|1633|1”) in new stack
– Goto (ext-local,1633,1)
– Executing [1633@ext-local:1] Set(“SIP/192.168.243.24-01034200”, “__RINGTIMER=100”) in new stack
– Executing [1633@ext-local:2] Macro(“SIP/192.168.243.24-01034200”, “exten-vm|1633|1633”) in new stack
– Executing [s@macro-exten-vm:1] Macro(“SIP/192.168.243.24-01034200”, “user-callerid”) in new stack
– Executing [s@macro-user-callerid:1] Set(“SIP/192.168.243.24-01034200”, “AMPUSER=7159”) in new stack
– Executing [s@macro-user-callerid:2] GotoIf(“SIP/192.168.243.24-01034200”, “0?report”) in new stack
– Executing [s@macro-user-callerid:3] ExecIf(“SIP/192.168.243.24-01034200”, “1|Set|REALCALLERIDNUM=7159”) in new stack
– Executing [s@macro-user-callerid:4] Set(“SIP/192.168.243.24-01034200”, “AMPUSER=7159”) in new stack
– Executing [s@macro-user-callerid:5] Set(“SIP/192.168.243.24-01034200”, “AMPUSERCIDNAME=Ian”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“SIP/192.168.243.24-01034200”, “0?report”) in new stack
– Executing [s@macro-user-callerid:7] Set(“SIP/192.168.243.24-01034200”, “AMPUSERCID=7159”) in new stack
– Executing [s@macro-user-callerid:8] Set(“SIP/192.168.243.24-01034200”, “CALLERID(all)=“Ian” <7159>”) in new stack
– Executing [s@macro-user-callerid:9] ExecIf(“SIP/192.168.243.24-01034200”, “0|Set|CHANNEL(language)=”) in new stack
– Executing [s@macro-user-callerid:10] GotoIf(“SIP/192.168.243.24-01034200”, “0?continue”) in new stack
– Executing [s@macro-user-callerid:11] Set(“SIP/192.168.243.24-01034200”, “__TTL=64”) in new stack
– Executing [s@macro-user-callerid:12] GotoIf(“SIP/192.168.243.24-01034200”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,19)
– Executing [s@macro-user-callerid:19] NoOp(“SIP/192.168.243.24-01034200”, “Using CallerID “Ian” <7159>”) in new stack
– Executing [s@macro-exten-vm:2] Set(“SIP/192.168.243.24-01034200”, “RingGroupMethod=none”) in new stack
– Executing [s@macro-exten-vm:3] Set(“SIP/192.168.243.24-01034200”, “VMBOX=1633”) in new stack
– Executing [s@macro-exten-vm:4] Set(“SIP/192.168.243.24-01034200”, “EXTTOCALL=1633”) in new stack
– Executing [s@macro-exten-vm:5] Set(“SIP/192.168.243.24-01034200”, “CFUEXT=”) in new stack
– Executing [s@macro-exten-vm:6] Set(“SIP/192.168.243.24-01034200”, “CFBEXT=”) in new stack
– Executing [s@macro-exten-vm:7] Set(“SIP/192.168.243.24-01034200”, “RT=100”) in new stack
– Executing [s@macro-exten-vm:8] Macro(“SIP/192.168.243.24-01034200”, “record-enable|1633|IN”) in new stack
– Executing [s@macro-record-enable:1] GotoIf(“SIP/192.168.243.24-01034200”, “1?check”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [s@macro-record-enable:4] AGI(“SIP/192.168.243.24-01034200”, “recordingcheck|20090915-193427|1253057667.80”) in new stack
– Launched AGI Script /opt/local/var/lib/asterisk/agi-bin/recordingcheck
– AGI Script recordingcheck completed, returning 0
– Executing [s@macro-record-enable:5] MacroExit(“SIP/192.168.243.24-01034200”, “”) in new stack
– Executing [s@macro-exten-vm:9] Macro(“SIP/192.168.243.24-01034200”, “dial|100|tr|1633”) in new stack
– Executing [s@macro-dial:1] GotoIf(“SIP/192.168.243.24-01034200”, “1?dial”) in new stack
– Goto (macro-dial,s,3)
– Executing [s@macro-dial:3] AGI(“SIP/192.168.243.24-01034200”, “dialparties.agi”) in new stack
– Launched AGI Script /opt/local/var/lib/asterisk/agi-bin/dialparties.agi
– AGI Script dialparties.agi completed, returning 0
– Executing [s@macro-dial:4] NoOp(“SIP/192.168.243.24-01034200”, “Returned from dialparties with no extensions to call and DIALSTATUS: “) in new stack
– Executing [s@macro-exten-vm:10] GotoIf(“SIP/192.168.243.24-01034200”, “0?exit|return”) in new stack
– Executing [s@macro-exten-vm:11] Set(“SIP/192.168.243.24-01034200”, “SV_DIALSTATUS=”) in new stack
– Executing [s@macro-exten-vm:12] GosubIf(“SIP/192.168.243.24-01034200”, “0?docfu|1”) in new stack
– Executing [s@macro-exten-vm:13] GosubIf(“SIP/192.168.243.24-01034200”, “0?docfb|1”) in new stack
– Executing [s@macro-exten-vm:14] Set(“SIP/192.168.243.24-01034200”, “DIALSTATUS=”) in new stack
– Executing [s@macro-exten-vm:15] NoOp(“SIP/192.168.243.24-01034200”, “Voicemail is 1633”) in new stack
– Executing [s@macro-exten-vm:16] GotoIf(“SIP/192.168.243.24-01034200”, “0?s-|1”) in new stack
– Executing [s@macro-exten-vm:17] NoOp(“SIP/192.168.243.24-01034200”, “Sending to Voicemail box 1633”) in new stack
– Executing [s@macro-exten-vm:18] Macro(“SIP/192.168.243.24-01034200”, “vm|1633||”) in new stack
– Executing [s@macro-vm:1] Macro(“SIP/192.168.243.24-01034200”, “user-callerid|SKIPTTL”) in new stack
– Executing [s@macro-user-callerid:1] Set(“SIP/192.168.243.24-01034200”, “AMPUSER=7159”) in new stack
– Executing [s@macro-user-callerid:2] GotoIf(“SIP/192.168.243.24-01034200”, “0?report”) in new stack
– Executing [s@macro-user-callerid:3] ExecIf(“SIP/192.168.243.24-01034200”, “0|Set|REALCALLERIDNUM=7159”) in new stack
– Executing [s@macro-user-callerid:4] Set(“SIP/192.168.243.24-01034200”, “AMPUSER=7159”) in new stack
– Executing [s@macro-user-callerid:5] Set(“SIP/192.168.243.24-01034200”, “AMPUSERCIDNAME=Ian”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“SIP/192.168.243.24-01034200”, “0?report”) in new stack
– Executing [s@macro-user-callerid:7] Set(“SIP/192.168.243.24-01034200”, “AMPUSERCID=7159”) in new stack
– Executing [s@macro-user-callerid:8] Set(“SIP/192.168.243.24-01034200”, “CALLERID(all)=“Ian” <7159>”) in new stack
– Executing [s@macro-user-callerid:9] ExecIf(“SIP/192.168.243.24-01034200”, “0|Set|CHANNEL(language)=”) in new stack
– Executing [s@macro-user-callerid:10] GotoIf(“SIP/192.168.243.24-01034200”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,19)
– Executing [s@macro-user-callerid:19] NoOp(“SIP/192.168.243.24-01034200”, “Using CallerID “Ian” <7159>”) in new stack
– Executing [s@macro-vm:2] Set(“SIP/192.168.243.24-01034200”, “VMGAIN=”””) in new stack
– Executing [s@macro-vm:3] GotoIf(“SIP/192.168.243.24-01034200”, “1?vmx|1”) in new stack
– Goto (macro-vm,vmx,1)
– Executing [vmx@macro-vm:1] Set(“SIP/192.168.243.24-01034200”, “MEXTEN=1633”) in new stack
– Executing [vmx@macro-vm:2] Set(“SIP/192.168.243.24-01034200”, “MMODE=”) in new stack
– Executing [vmx@macro-vm:3] Set(“SIP/192.168.243.24-01034200”, “RETVM=”) in new stack
– Executing [vmx@macro-vm:4] Set(“SIP/192.168.243.24-01034200”, “MODE=unavail”) in new stack
– Executing [vmx@macro-vm:5] GotoIf(“SIP/192.168.243.24-01034200”, “0?chknomsg”) in new stack
– Executing [vmx@macro-vm:6] Set(“SIP/192.168.243.24-01034200”, “VM_OPTS=”) in new stack
– Executing [vmx@macro-vm:7] GotoIf(“SIP/192.168.243.24-01034200”, “0?s-|1”) in new stack
– Executing [vmx@macro-vm:8] GotoIf(“SIP/192.168.243.24-01034200”, “1?notdirect”) in new stack
– Goto (macro-vm,vmx,10)
– Executing [vmx@macro-vm:10] NoOp(“SIP/192.168.243.24-01034200”, “Checking if ext 1633 is enabled: blocked”) in new stack
– Executing [vmx@macro-vm:11] GotoIf(“SIP/192.168.243.24-01034200”, “1?s-|1”) in new stack
– Goto (macro-vm,s-,1)
– Executing [1633@ext-local:3] Goto(“SIP/192.168.243.24-01034200”, “vmret|1”) in new stack
– Goto (ext-local,vmret,1)
– Executing [vmret@ext-local:1] GotoIf(“SIP/192.168.243.24-01034200”, “0?playret”) in new stack
– Executing [vmret@ext-local:2] Hangup(“SIP/192.168.243.24-01034200”, “”) in new stack
== Spawn extension (ext-local, vmret, 2) exited non-zero on 'SIP/192.168.243.24-01034200’
Really destroying SIP dialog ‘[email protected]’ Method: REGISTER
Really destroying SIP dialog ‘[email protected]’ Method: REGISTER

Basically, MacOSX 10.6 ships with PHP-5.3. After a lot of pain and trial and error I came across another post on another forum which pointed to a bug report filed for phpagi.php which had some of the errors I was seeing. PHP 5.3 has it’s own “goto” function which looks like it causes major problems when trying to define a script goto function.

So, I got the MacPorts set of tools installed and installed PHP-5.2.10, modified all the agi-bin scripts to use that version of PHP and everything is now working.

It might be time for a major overhaul of the goto idea in the scripts/macros…

$.02

PS. I followed the instructions here:

http://blog.jseibert.com/post/177992072/installing-php-5-2-10-on-mac-os-x-10-6-snow-leopard