For a long while I wasn’t able to pinpoint this really stupid issue where my extensions couldn’t call each other however my trunk calls were OK. It first surfaced by not being able to point my BV to my internal extension, but I brushed it out since I had a shitty Comcast router. I first thought that was the culprit.
Then when I was fixing my parents’ extensions in Turkey I realized that I cannot make any extension to extension calls but I still can use outbound routes. After hours of troubleshooting I realized that dialparties.agi script would always return: “Returned from dialparties with no extensions to call and DIALSTATUS:”
I manually ran the script and found out that it was spitting out this error message: “PHP Parse error: syntax error, unexpected T_GOTO, expecting T_STRING in /var/lib/asterisk/agi-bin/phpagi.php on line 1234”
Then I found this bug in freepbx Trac. I ended up changing the name of the goto function in line 1234 of phpagi.agi to go_to and things started to work fine. 😛
Apparently this started to happen when I upgraded my ubuntu which upgraded the php to version 5.3.2.