GSM Gateway behind SIP device?

I have an analog GSM Gateway that is connected to a normal SIP ATA device.

Basically what it does is when you call the extension nr. of that SIP ATA port, the GSM Gateway will pick up the phone and presents you a (new) dial tone.

I would like to use the GSM Gateway to route my cellular calls, but how do i configure this in FreePBX?

Should i configure that port on the ATA as a SIP trunk, or an Extension or something else, and how do i get dialling working?

Basically i should put some logic into FreePBX that will dial the SIP device, and after 2 seconds send the number as DTMF tones to the GSM Gateway. I have no idea how to send DTMF codes from FreePBX.

Ideas anyone?

It works!!!

Here is how i did it (but maybe not the prettiest solution) :

  1. Setup a SIP extension for the ATA device, in my case i give it extension number 298. Edit the extension after creating
    it set DISALLOW to all and set ALLOW to alaw to make sure DTMF sending will work.

  2. Create a custom trunk, and set as Custom Dial String :
    Local/[email protected]

  3. add to extensions_custom.conf :
    [custom-gsmvoip-out]
    exten => _.,1,Dial(SIP/298,D(wwwwww0${EXTEN}))
    Note that i put a leading zero there, because for my fallback outbound routes i needed to strip the leading zero so it is added it again here.

  4. Insert the custom trunk in outbound routes

Hello, there…i need a help from you and i trust that
you will send me a solution
I configured my Grandstream HT-386 ATA as a trunk in my asterisk as follow
Peer details:
allow=all
context=from-internal
host=192.168.16.27
type=friend
the problem is that i can call only the 1st FXS port of the ATA and the
other one can’t be called ever even if the 1st one is busy…i need an option that is like a hunt group.if the 1st busy it redirects the call to another available…
HINT:this ATA ‘s that i use to tie all branches Panasonic PBXs’ extensions
to the VOIP extensions…i use many ATA’s 2 ports and many also of ATA’s 8 ports

please send me a solution if you can of course…
Thanks alot.
Best regards