[Freeswitch-users] GXW4104 gateway setup for outgoing calls

Nandy Dagondon gcd at i.ph
Tue Sep 20 17:42:44 MSD 2011


perhaps, your dialtone parameters are wrong causing the problem. try to
enable it w/ the right parameters.
-nandy


On Tue, Sep 20, 2011 at 8:06 PM, ocset <ocset at the800group.com> wrote:

>  I fixed the problem.
>
> The guide I followed for setting up the incoming calls suggested this
> setting:  "Wait for Dial-Tone(Y/N): ch1-4:Y;"
>
> I changed this to "N" and now it works. Not sure how that affects the use
> of the system but at least incoming call are now working.
>
> Thanks for all your help.
>
>
>
> On 09/16/2011 03:35 PM, Nandy Dagondon wrote:
>
> pls see my comments below. you're welcome.
> -nandy
>
> On Fri, Sep 16, 2011 at 1:14 PM, ocset <ocset at the800group.com> wrote:
>
>>  Hi Nandy
>>
>> Thanks for your help so far - unfortunately this is still not working.
>>
>> Based on your examples, I have created the following  two files
>>
>> 1.
>> ../sip_profile/internal/01_custom.xml
>>
>> <include>
>>   <param name="multiple-registrations" value="true"/>
>>   <param name="accept-blind-reg" value="true"/>
>>   <param name="accept-blind-auth" value="true"/>
>>
>>   <gateway name="gxw4104-fxo">
>>
>>      <param name="username" value="1019"/>
>>       <param name="password" value="1234"/>
>>       <param name="realm" value="192.168.0.160"/>
>>      <param name="sip-port" value="5060"/>
>>      <param name="rtp_ip" value="192.168.0.160"/>
>>
>>      <param name="dtmf-type" value="rfc2833"/>
>>      <param name="expire-seconds" value="600"/>
>>      <param name="register" value="false"/>
>>      <param name="caller-id-in-from" value="false"/>
>>   </gateway>
>> </include>
>>
>>  2.
>> ../dialplan/default/01_custom.xml
>>
>> <include>
>>   <extension name="gxw4104-fxo-local">
>>
>>     <condition field="${toll_allow}" expression="local"/>
>>      <condition field="destination_number" expression="^(\d{10})$">
>>     <action application="set"
>> data="effective_caller_id_number=5555555555"/>
>>
>>     <action application="set"
>> data="effective_caller_id_name=ThisIsMyCompany"/>
>>     <action application="set" data="ignore_early_media=ring_ready"/>
>>     <action application="set" data="ringback=${us-ring}"/>
>>        <action application="bridge" data=
>> "sofia/gateway/gxw4104-fxo/$1 at 192.168.0.160:5060"<sofia/gateway/gxw4104-fxo/$1 at 192.168.0.160:5060>
>> />
>>     </condition>
>>   </extension>
>> </include>
>>
>>
>>
>> Command "sofia status"  shows the followiing
>>
>> internal                               profile
>> sip:mod_sofia at 192.168.0.23:5060         RUNNING (0)
>> internal::gxw4104-fxo        gateway             sip:1019 at 192.168.0.160
>> NOREG
>> external                              profile
>> sip:mod_sofia at 192.168.0.23:5080         RUNNING (0)
>> external::example.com      gateway             sip:joeuser at example.com
>> NOREG
>> internal-ipv6                       profile                sip:mod_sofia@[::1]:5060
>> RUNNING (0)
>> 192.168.0.23                      alias
>> internal                                                    ALIASED
>>
>>
>> Here is the call log when I try do dial out:
>>
>> 2011-09-16 12:57:30.903616 [NOTICE] switch_channel.c:669 New Channel
>> sofia/internal/1014 at 192.168.0.23 [0a83e803-b3fc-4a46-bc74-9d6786dac8e2]
>> 2011-09-16 12:57:30.933863 [INFO] mod_dialplan_xml.c:418 Processing User
>> 1014->0412345678 in context default
>> 2011-09-16 12:57:30.950359 [NOTICE] switch_channel.c:669 New Channel
>> sofia/internal/0412345678 at 192.168.0.160:5060[24111b8d-25f0-4433-a49f-88973730ebfb]
>> 2011-09-16 12:57:40.957391 [NOTICE] sofia.c:4789 Hangup
>> sofia/internal/0412345678 at 192.168.0.160:5060 [CS_CONSUME_MEDIA]
>> [NORMAL_TEMPORARY_FAILURE]
>> 2011-09-16 12:57:40.958554 [NOTICE] switch_core_session.c:1182 Session 7
>> (sofia/internal/0412345678 at 192.168.0.160:5060) Ended
>> 2011-09-16 12:57:40.958554 [NOTICE] switch_core_session.c:1184 Close
>> Channel sofia/internal/0412345678 at 192.168.0.160:5060 [CS_DESTROY]
>> 2011-09-16 12:57:40.958554 [INFO] mod_dptools.c:2355 Originate Failed.
>> Cause: NORMAL_TEMPORARY_FAILURE
>> 2011-09-16 12:57:40.958554 [NOTICE] mod_dptools.c:2418 Hangup
>> sofia/internal/1014 at 192.168.0.23 [CS_EXECUTE] [NORMAL_TEMPORARY_FAILURE]
>> 2011-09-16 12:57:40.995191 [NOTICE] switch_core_session.c:1182 Session 6
>> (sofia/internal/1014 at 192.168.0.23) Ended
>> 2011-09-16 12:57:40.995191 [NOTICE] switch_core_session.c:1184 Close
>> Channel sofia/internal/1014 at 192.168.0.23 [CS_DESTROY]
>>
>>
>>
>> I have the following questions
>>
>> 1. What is the significance of the user 1019? I have a default install of
>> FS so that user does exist but I am not logged in as that user on my sip
>> phone. I am logged in as user 1014.
>>
>>  1019 is the user account for the FXO port to handle incoming calls. so,
> the login details must be set on directory/default/1019.xml.
>
> actually,  the user and password entries can be deleted because FS is not
> registering to the FXO gateway.
>
>
>>  2. The resultant log does not show my gateway being used but instead
>> shows "/sofia/internal/0412345678 at 192.168.0.160:5060"</sofia/internal/0412345678 at 192.168.0.160:5060>.
>> Is that expected behaviour?
>>
>>  it's not hitting the dialplan, i guess. i suggest you create prefix 9
> for PSTN calls e.g.
>     <condition field="destination_number" expression="^9(\d+)$">
>
> and make the file ../dialplan/default/01_custom.xml is on top of
> dialplan/default directory so it will be scanned early.
>
>
>>  3. I assumed that the IP address 192.168.0.9 in your example is the
>> address of your HT503 and not FS. I have thus replaced it with the IP
>> address from my GXW4104 (192.168.0.160). Is that correct?
>>
>>   that is correct.
>
>>
>>
>>
>>
>>
>>
>> On 09/13/2011 11:42 PM, Nandy Dagondon wrote:
>>
>> i inserted my answers to your questions below. for point #3), here's an
>> example how i configured my FXO port of ht503.
>>
>> included in  sip_profile/internal:
>> <include>
>>   <gateway name="ht503-fxo">
>>   <param name="username" value="1019"/>   <-- it's registered to receive
>> incoming calls
>>   <param name="realm" value="192.168.0.9"/>
>>   <param name="sip-port" value="5062"/>   <-- port 5060 is set to the FXS
>> port
>>   <param name="password" value="1234"/>
>>   <param name="rtp_ip" value="192.168.0.9"/>
>>   <param name="dtmf-type" value="rfc2833"/>
>>   <param name="expire-seconds" value="600"/>
>>   <param name="register" value="false"/>
>>   <param name="caller-id-in-from" value="false"/>
>>   </gateway>
>> </include>
>>
>> included  in dialplan/default
>>
>> <include>
>>   <extension name="ht503-fxo-local">
>>     <condition field="${toll_allow}" expression="local"/>
>>     <condition field="destination_number" expression="^9([2-9]\d{6})$">
>>     <action application="set" data="effective_caller_id_number=0321234567
>> "/>
>>     <action application="set" data="effective_caller_id_name=ThisIsMy
>> Company"/>
>>     <action application="set" data="ignore_early_media=ring_ready"/>
>>     <action application="set" data="ringback=${us-ring}"/>
>>       <action application="bridge" data="sofia/gateway/ht503-fxo/$
>> 1 at 192.168.0.9:5062"/>
>>     </condition>
>>   </extension>
>> </include>
>>
>> it looks you can create 4 internal gateways for the every port, fxo-1 to
>> fxo-4, w/ the same realm/rtp_ip values but setting different sip-port
>> values. then  your bridge app would be:
>>
>>       <action application="bridge"
>> data="sofia/gateway/fxo-1/$1|sofia/gateway/fxo-2/$1|sofia/gateway/fxo-3/$1sofia/gateway/fxo-4/$1"/>
>>
>> if u want to dialout any free port.
>>
>> i haven't tested the above. just try it. i hope it works.
>>
>> -nandy
>>
>>
>> On Tue, Sep 13, 2011 at 6:10 PM, ocset <ocset at the800group.com> wrote:
>>
>>>  Hi Nandy
>>>
>>> Thanks for your reply. I assume 192.168.0.9 in your example is the IP
>>> address of the GXW4104?
>>>
>> yes.
>>
>>>
>>>
>>  Some more questions
>>>
>>> 1. When you say port number, is this something I should be setting up on
>>> the GXW4104 so that it is listening on those 4 port numbers? If yes, what
>>> would be the setting I am looking for?
>>>
>> not for every port. the gateway has a base port number e.g. 5060 for
>> port#1. add 2 to the subsequent ports e.g. 5062 for port#2 and so on. this
>> is pointed out by sergey.
>>
>>>
>>> 2. Does that mean I don't define a new gateway in FreeSWITCH?
>>>
>> it's an option. but defining a gateway is cleaner.
>>
>>
>>>
>>>
>>  3. In your example, you said the bridge data would be
>>> 7654321 at 192.168.0.9:5063. What would the whole line look like in the
>>> dialplan?*
>>>
>>> <action application="bridge" data="
>>> sofia/gateway/7654321 at 192.168.0.9:5063**"/>*
>>>
>>> Still very confused :-)
>>>
>>> Thanks
>>>
>>>
>>> On 09/13/2011 03:45 PM, Nandy Dagondon wrote:
>>>
>>> hi,
>>>
>>> if GWX4104 is in your local network, use the internal profile for the
>>> gateway. register your FXO accounts to receive incoming calls (i think you
>>> did this already).
>>>
>>> to dialout the ports, specify the port number 5060~5063 assuming Port1
>>> starts at 5060. to dialout via port4, the bridge data should look like:
>>>
>>> 7654321 at 192.168.0.9:5063
>>>
>>> hope it helps.
>>>
>>> -nandy
>>>
>>>
>>> On Tue, Sep 13, 2011 at 2:49 PM, ocset <ocset at the800group.com> wrote:
>>>
>>>>  Hi
>>>>
>>>> I have recently bought a Grandstream GXW4104 (4 FXO ports) and need some
>>>> help setting up a gateway to call out using the GXW4104. I am really out of
>>>> my depth here and may be looking at this the wrong way so please bear with
>>>> me.
>>>>
>>>> I followed the advice on this website
>>>> "http://www.timhunt.net/wiki/FreeSwitch:GXW4104"<http://www.timhunt.net/wiki/FreeSwitch:GXW4104>and incoming calls from a PSTN line are working great. Now I need to setup a
>>>> dialplan so that outgoing calls are routed through the same PSTN line on the
>>>> GXW4104. I will eventually have 4 PSTN lines with a dialplan to use the
>>>> first available line (if that is possible).
>>>>
>>>> According to the FreeSWITCH 1.0.6 book (and many online posts) I need to
>>>> create a gateway and a dialplan but all the gateway examples are for SIP
>>>> accounts.
>>>>
>>>> So, the gateway definition seems to need a username and password but the
>>>> GXW4104 does not have that capability. I found this gateway definition in
>>>> the  freeswitch.xml.fsxml file but am not sure how many of these variables
>>>> are required.
>>>>
>>>> <gateways>
>>>>    <gateway name="example.com">
>>>>       <param name="username" value="joeuser"/>
>>>>       <param name="password" value="password"/>
>>>>       <param name="from-user" value="joeuser"/>
>>>>       <param name="from-domain" value="example.com"/>
>>>>       <param name="expire-seconds" value="600"/>
>>>>       <param name="register" value="false"/>
>>>>       <param name="retry-seconds" value="30"/>
>>>>       <param name="extension" value="5000"/>
>>>>       <param name="context" value="public"/>
>>>>    </gateway>
>>>> </gateways>
>>>>
>>>>
>>>> If I define a gateway called "gxw4104", then this is what I think a
>>>> simple dialplan should look like but I'm not sure of the gateway details in
>>>> the "bridge" section of the definition.
>>>>
>>>> <extension name="gxw4104_out">
>>>>    <condition field="destination_number" expression="^(\d{10})$">
>>>>
>>>>       *<action application="bridge"
>>>> data="sofia/gateway/gxw4104/........"/>        (what should this be???)
>>>> *
>>>>    </condition>
>>>> </extension>
>>>>
>>>> Am I moving in the right direction and can someone fill in the blanks
>>>> for me please
>>>>
>>>> Thanks in advance!
>>>>
>>>>
>>>>
>>>>
>>>> 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
>>>>
>>>>
>>>
>>>
>>> FreeSWITCH-users mailing listFreeSWITCH-users at lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
>>>
>>>
>>>
>>> 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
>>>
>>>
>>
>>
>> FreeSWITCH-users mailing listFreeSWITCH-users at lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
>>
>>
>>
>> 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
>>
>>
>
>
> FreeSWITCH-users mailing listFreeSWITCH-users at lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
>
>
>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110920/2dc6795f/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list