This is kind of weird that it works this way. . .
http://pbxinaflash.com/forum/showthread ... #post13482
I implemented the outgoing trunk fine, but I couldn't for the life of me get the incoming to route correctly. It was driving me mad.
Then I just did this routing game as seen above in asiby's post and it works.
Is there a post that explains why we have to go through this process?
Added after 6 minutes: I figured out a more straightforward way to do this.
My "Custom Destination" is this:
custom-a2billing,9876,1
Then under extensions_a2billing.conf I put this in:
[custom-a2billing]
exten => 9876,1,Answer
exten => 9876,n,Wait(1)
exten => 9876,n,DeadAGI(a2billing.php|1)
exten => 9876,n,Hangup
And it seems to work with incoming calls to route it that way. The installation guide originally has _X. instead of 9876. But it seems if I manually assign the extension it work, whereas when I kept it at the tutorial version, it wouldn't. THe ones that didn't seem to work were these:
[custom-a2billing]
exten => _X.,1,Answer
exten => _X.,n,Wait(1)
exten => _X.,n,DeadAGI(a2billing.php|1)
exten => _X.,n,Hangup
"Custom Destionation:
custom-a2billing,${EXTEN},1
I don't really know the default doesn't work. . .
asiby wrote:
This type of situation has been resolved in the paste and here is how.
First of all, keep in mind that freepbx does not allow the use of asterisk's extension matching patterns when calling a custom application.
You might need to create a custom or misc destination that matches the DID number from which the call is going to come from; for instance: 2345678901
Now in freepbx, use the inbound menu to send the incoming call to the right place. Instead of sending the call to custom_yourcontext,s,1 ... send it to custom_yourcontext,2345678901,1
and somewhere create an extension that will be within reach.
[custom_yourcontext]
...
exten => 2345678901,1,Goto(a2billing,${EXTEN},1)
This should send the call successfully to a2billing assuming that you have a context called [a2billing].
Cheers