[Freeswitch-users] How to receive call using gsmopen

Luiz Fernando Softov fernando at softov.com.br
Tue Apr 21 07:20:59 MSD 2015


To enable Voice you need to make a AT command

i don't know in other system, but in FreeBSD i use "cu"

"cu -l /dev/ttyU0.1"

AT^CVOICE=0 Enable Voice
AT^CVOICE=1 Disable Voice
AT^CVOICE=? Check status

Or you can use a software to unlock, it's not free, i think you need to paid

https://www.dc-unlocker.com/

Some modems/dongle don't have the destination number write in SIM, and
in source code variable "destination" will be used to make calls.
If you want to change this, you need to do some changes in source code
and write real number in SIM card

To get number written in SIM

AT+CNUM

To write number in SIM i make this

AT+CPBS="ON";^CPBW=1;^CPBW=1,"556700000000",129

You can get explain of this AT commands in google.com


To receive calls, like "Nandy" say.

On gsmopen.conf.xml file, add this line between <global_settings> and
</global_settings>:

<param name="context" value="public"/>
<param name="destination" value="incoming_gsm_call"/>

Or to have a number per modem

<configuration name="gsmopen.conf" description="GSMopen Configuration">
  <global_settings>
    <param name="debug" value="8"/>
    <param name="dialplan" value="XML"/>
    <param name="context" value="default"/>
    <param name="hold-music" value="$${moh_uri}"/>
  </global_settings>
  <!-- one entry here per gsmopen interface -->
  <per_interface_settings>
    <interface id="1" name="gsm01">
      <param name="controldevice_name" value="/dev/ttyU0.2"/>
      <param name="controldevice_audio_name" value="/dev/ttyU0.1"/>
      <param name="destination" value="99990001"/>
    </interface>
    <interface id="2" name="gsm02">
      <param name="controldevice_name" value="/dev/ttyU1.2"/>
      <param name="controldevice_audio_name" value="/dev/ttyU1.1"/>
      <param name="destination" value="99990002"/>
    </interface>
  </per_interface_settings>
</configuration>

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * *

Ring Extension 1001 based on GSM01

<extension name="incoming-mobile-call-1">
   <condition field="context" expression="public"/>
   <condition field="destination_number" expression="99990001">
       <action application="transfer" data="1001 XML default"/>
   </condition>
</extension>

Ring Extension 1002 based on GSM02

<extension name="incoming-mobile-call-2">
   <condition field="context" expression="public"/>
   <condition field="destination_number" expression="99990002">
       <action application="transfer" data="1002 XML default"/>
   </condition>
</extension>

2015-04-20 15:12 GMT-04:00 Anurag Rana <anuragrana31189 at gmail.com>:
> I tried but didn't worked. I edited the files as said above. Registered a
> Softphone with 1000 as user so that call can be received and dialled the sim
> number in dongle. Nothing happened.
>
> Do I need to do something like "Unlocking voice capability" as given in
> below link
> https://wiki.freeswitch.org/wiki/GSMopen#UNLOCK_THE_DONGLE.21.21.21
>
> I am using this device -
> http://www.amazon.in/Micromax-MMX210G-Data-Card-White/dp/B00MF91LZ2/ref=sr_1_2?ie=UTF8&qid=1429556927&sr=8-2&keywords=micromax+dongle
>
> Anybody using this or similar device?
>
>
>
> Anurag Rana
> M.Tech CSE, IIIT-Delhi,
> https://sites.google.com/site/homepagerana/
>
>
>
>
> On Mon, Apr 20, 2015 at 12:40 PM, Giovanni Maruzzelli <gmaruzz at gmail.com>
> wrote:
>>
>> you must set the destination, in global or interface specific section.
>> If not set, there will be an error.
>>
>> -giovanni
>>
>> On Mon, Apr 20, 2015 at 8:58 AM, Nandy Dagondon <nandy1925 at gmail.com>
>> wrote:
>>>
>>>
>>> In the absence of <param name="destination" value="incoming_gsm_call"/>,
>>> I think the destination number will be the mobile number of the SIM
>>> installed on the USB dongle.  Can anyone confirm this?
>>>
>>> On Mon, Apr 20, 2015 at 2:55 PM, Nandy Dagondon <nandy1925 at gmail.com>
>>> wrote:
>>>>
>>>>
>>>>
>>>> On gsmopen.conf.xml file, add this line between <global_settings> and
>>>> </global_settings>:
>>>>
>>>> <param name="context" value="public"/>
>>>> <param name="destination" value="incoming_gsm_call"/>
>>>>
>>>> On your dialplan add e.g. public/incoming-gsm-call.xml containing these
>>>> lines to ring extension 1000
>>>>
>>>> <extension name="incoming-mobile-call">
>>>>    <condition field="context" expression="public"/>
>>>>    <condition field="destination_number" expression="incoming_gsm_call">
>>>>        <action application="transfer" data="1000 XML default"/>
>>>>    </condition>
>>>> </extension>
>>>>
>>>> Good luck!
>>>>
>>>>
>>>> On Sun, Apr 19, 2015 at 7:27 PM, Anurag Rana <anuragrana31189 at gmail.com>
>>>> wrote:
>>>>>
>>>>> Hi All,
>>>>>
>>>>> I have micromax usb dongle with a gsm sim in it attached to my system.
>>>>> mod_gsmopen has been compiled and has been loaded. Freeswitch is
>>>>> running.
>>>>>
>>>>> This is the output of lsusb command -
>>>>> ----------------------------------------------------------
>>>>> Bus 002 Device 003: ID 064e:e263 Suyin Corp.
>>>>> Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching
>>>>> Hub
>>>>> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>>>> Bus 001 Device 006: ID 1c9e:9605 OMEGA TECHNOLOGY
>>>>> Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching
>>>>> Hub
>>>>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>>>> Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
>>>>> Bus 003 Device 011: ID 15d9:0a4e Trust International B.V.
>>>>> Bus 003 Device 010: ID 1a2c:0c21 China Resource Semico Co., Ltd
>>>>> Bus 003 Device 009: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
>>>>> Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>>>>
>>>>> ---------------------------------------------------------------------------------------
>>>>>
>>>>> This is the output of dmesg | grep tty command
>>>>> ----------------------------------------------------------------------
>>>>> [ 8114.018211] usb 1-1.2: GSM modem (1-port) converter now attached to
>>>>> ttyUSB0
>>>>> [ 8114.018840] usb 1-1.2: GSM modem (1-port) converter now attached to
>>>>> ttyUSB1
>>>>> [ 8114.019458] usb 1-1.2: GSM modem (1-port) converter now attached to
>>>>> ttyUSB2
>>>>> [ 8114.019961] usb 1-1.2: GSM modem (1-port) converter now attached to
>>>>> ttyUSB3
>>>>> ---------------------------------------------------------------------
>>>>>
>>>>> This is the content of gsmopen.conf.xml file
>>>>>
>>>>> -----------------------------------------------------------------
>>>>> <configuration name="gsmopen.conf" description="GSMopen Configuration">
>>>>>   <global_settings>
>>>>>     <param name="debug" value="8"/>
>>>>>     <param name="dialplan" value="XML"/>
>>>>>     <param name="context" value="default"/>
>>>>>     <param name="hold-music" value="$${moh_uri}"/>
>>>>>     <param name="destination" value="5000"/>
>>>>>   </global_settings>
>>>>>   <!-- one entry here per gsmopen interface -->
>>>>>   <per_interface_settings>
>>>>>     <interface id="1" name="gsm01">
>>>>>       <param name="controldevice_name" value="/dev/ttyUSB3"/>
>>>>>       <param name="controldevice_audio_name" value="/dev/ttyUSB2"/>
>>>>>     <!-- in windowz would be, eg: -->
>>>>>       <!--
>>>>>       <param name="controldevice_name" value="COM4"/>
>>>>>       -->
>>>>>       <!-- 3G PC UI Interface is controldevice_name -->
>>>>>       <!--
>>>>>       <param name="controldevice_audio_name" value="COM2"/>
>>>>>       -->
>>>>>       <!-- 3G Application Interface is controldevice_audio_name -->
>>>>>     </interface>
>>>>>     <!-- following interfaces are commented out!
>>>>>     -->
>>>>>   </per_interface_settings>
>>>>> </configuration>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>>
>>>>> I searched internet for "how to receive a call using FS" or "How to
>>>>> make an inbound call using gsmopen"
>>>>> but could not find detailed stepwise explanation.
>>>>>
>>>>>
>>>>> Can someone please tell me what I need to do next so that when I call
>>>>> the sim number in dongle, call is received by FS and actions are performed
>>>>> based on dialplan.
>>>>>
>>>>> OR
>>>>>
>>>>> direct me to some link which explains this. (apart from this
>>>>> https://freeswitch.org/confluence/display/FREESWITCH/mod_gsmopen)
>>>>>
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>> Anurag Rana
>>>>> M.Tech CSE, IIIT-Delhi,
>>>>> https://sites.google.com/site/homepagerana/
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _________________________________________________________________________
>>>>> Professional FreeSWITCH Consulting Services:
>>>>> consulting at freeswitch.org
>>>>> http://www.freeswitchsolutions.com
>>>>>
>>>>> Official FreeSWITCH Sites
>>>>> http://www.freeswitch.org
>>>>> http://confluence.freeswitch.org
>>>>> http://www.cluecon.com
>>>>>
>>>>> FreeSWITCH-users mailing list
>>>>> FreeSWITCH-users at lists.freeswitch.org
>>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>>>
>>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>>> http://www.freeswitch.org
>>>>
>>>>
>>>
>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://confluence.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>
>>
>>
>>
>> --
>> Sincerely,
>>
>> Giovanni Maruzzelli
>> Cell : +39-347-2665618
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org



-- 
Luiz Fernando Softov
http://www.softov.com.br
fernando at softov.com.br



Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list