I have a GSM VOIP adapter, that i ma using with FreePBX. In the webconfiguration menu of the GSM adapter, i have set it up as an SIP extension.
Now I can receive calls from the GSM network, which are then forwarded to the FREEPBX. All shiny till now.
My problem lies with the outgoing calls. Seems to me (after a few day of RTM&Google) that outgoing calls can only go to Trunks. If i want to make a call go from Softphone->Freepbx->GSM adapter, how can I achive this?
The GSM adapter is no trunk, it is an SIP extension…
The ‘right’ solution is to set it up as a trunk. Start with a chan_sip trunk with outgoing settings:
host=dynamic
username=(what you set in the gateway)
secret=(what you set in the gateway)
type=peer
For incoming:
secret=(what you set in the gateway)
type=user
context=from-trunk
Then set up an Outbound Route to send the appropriate calls to your gateway.
If you can’t set it up as a trunk, for example because you don’t have administrative control of the PBX, some gateways can work as an extension using ‘two-stage dialing’. Once properly set up in the gateway, when you call the extension the gateway will answer and play a dial tone. The caller then dials the desired number; the gateway receives the DTMF tones and places the call.
If you still have trouble, post gateway make/model and whether PBX is at the same site or remote.
the problem with setting up it as a trunk is that it will round robin the outgoing calls, or select the least used GSM card for the outgoing call. That is bad for me. I want to bind one SIP extension to one GSM channel. That is how the company works. (but now they need call recording, that is the reason for freepbx)
So in normal asterisk (last time I used one was like 3-4 years ago) we did something like
Set up a Custom Trunk with a Custom Dial String of SIP/200/$OUTNUM$
then set up an Outbound Route with match pattern 0[178]XXXXXXXX
that points to the trunk.
If you have trouble, post the log of a failing call.