External GSM Gateway to FreePBX?

Hi

I have a Yestar TG100, which I’d like to use as GSM gateway on my RasPi based FreePBX.

I have success in creating the trunk between the TG100 and my FreePBX (tried SIP trunks towards TG100 as both peer/device and what they call “service provider”).

I can get outgoing calls to work OK (FreePBX->GSM) - no problem there… But when a call is received at the GSM, it goes into FreePBX - and even if I have made an incoming route definition that states that calls should go to a specific extension, the caller on the GSM phone is presented with a new dialtone from FreePBX - instead of being directed to the extension specified by my route…

Any hints on where I can have missed something in my configuration ?

Regards
Brian

It seems that your GSM might be configured for what is called 2 stage dialing. You might want to search on the gateway’s manual how to unconditionally redirect every incoming call to a specific destination on your FreePBX, the concept is called 1 stage dialing, which usually applies to outgoing calls but can also apply to incoming as well. Some gateways call that unconditional forward, Grandstream is one of them, others call it hotline, Micronet for example. If you created a trunk, you should try to configure your gateway to redirect all calls to the trunk’s number, but you could also redirect them to special number 7777, which is the default feature code for incoming call simulator on FreePBX if you haven’t changed it.

From the looks of it, it seems like the GSM gateway is running some kind of asterisk as well… So I just need to find out whether there is such a setting somewhere inside the webinterface on it…

Checked in the general settings - there is a “Two stage Dialing Prompt” which is set to no…

According to page 55 of the TG100 user manual, which can be found on this link: http://www.yeastar.com/download/Yeastar_TG_Series_User_Manual_en.pdf, you should configure an advanced “Mobile to IP” route, which will let you specify a hotline. Hotline concept is to redirect every incoming call to a specific number on your configured trunk, which in your case should be the trunk to your FreePBX server.
Make sure you select “Simple mode: NO” when you create the route, in order to get the Hotline option.

This should be an example of the GUI for the creation of the “Mobile to IP” route, hope it helps: https://support.yeastar.com/hc/en-us/article_attachments/206096417/__22.png

1 Like

I found out… So now the calls get into my FreePBX, so far, so good…

On a SIP subscription I have created a custom extension, which handles calls with no caller-id (in order to avoid certain types of calls) - and on that trunk I have this defined on the incoming user details:

context=from-external-custom

It points out the flow, that filters away non-whitelisted callers and callers without CID…

The flow starts (in extensions_custom.conf):

[from-external-custom]
exten => s,1,Zapateller(answer,nocallerid)
exten => s,2,Wait(3)
exten => s,3,SetMusicOnHold(Mixes)
exten => s,4,GotoIf($["${CALLERID(num)}" = ""]?who-r-u,s,1)
exten => s,5,GotoIf($["foo${CALLERID(num)}" = "foo"]?who-r-u,s,1)

The question is now if I somehow can direct calls from the GSM gateway into this flow as well?

The FreePBX is running on an old 2.11.0.43 (I have tried to see if I could upgrade, it is running on Raspberry Pi - but I have some problems getting my No-CID stuff to work on the newer versions)…