I'm trying to make an Asterisk server connect to a SIP provider (which offers PSTN origination and termination). I've been reading the great Definitive Guide, but am having a conceptual problem with this illustration:
Once Asterisk has determined how to handle the channel, it will pass call control to the correct context in the dialplan. The context parameter in the channel configuration file tells the channel where it will enter the dialplan (which contains all the information about how to handle and route the call).
The "telephone", in this case a softphone, is defined in sip.conf
with easy to understand syntax. A corresponding context in extensions.conf
has the line:
exten => 101,1,Dial(Sip/000FFFF0002)
and the syntax of this seems to mean, to my understanding, to Dial the 000FFFF0002 hardphone.
Now, when it comes to dialing through a SIP provider, this just isn't covered as well, at least for me.
This seems to be crucial line:
exten => _6XXX,1,Dial(SIP/${EXTEN}@serverB)
Which, in my dialplan, is reflected as:
exten => _91999NXXXXXX,2,Dial(${TESTSIPTRUNK}/${EXTEN:2},,To)
yet the "dial" never seems to go to the other server -- in this case, a SIP provider. I don't understand the mechanics of what's happening. How do I even figure how or why it's not getting out, and, instead, returns " I am sorry that's not a valid extension..." from invalid.gsm
playing.
The full log, the channels and extensions are in gists. I'm more asking conceptually, what's supposed to be happening? I appreciate that the calls are supposed to go through ServerB, in this case a SIP provider, but otherwise don't quite understand how to ensure that this actually happens.
see also: