[Freeswitch-users] Simple SPA8800 FXO connection to FreeSwitch

Anton Kvashenkin anton.jugatsu at gmail.com
Fri Jun 29 11:19:51 MSD 2012


2012-06-29 04:13:44.298584 [ERR] mod_sofia.c:4492 Invalid Gateway ''

Are you sure that you compile and install mod_distributor or at least load
it. From fs_cli
module_exist mod_distributor

2012/6/29 Robin Gilks <robin.gilks at taitradio.com>

> Greetings
>
> I'm a noob with FS (and VoIP generally!!) and am really struggling
> with getting 2 way comms between a PABX and a soft-phone using FS and
> an SPA8800.
>
> Calls from the PABX are OK, the FXO ports have registered with FS and
> when I dial the FXO extension I get the dial tone, dial the number for
> the soft-phone and it all works fine.
>
> The problem is connections *TO* the PABX. The SPA8800 AFAIK has a
> separate SIP port for each of its FXO ports. My understanding of how
> it should work is as follows:
>
> I have to have 4 gateways defined in a file in the
> sip-profiles/externals directory, each with a different "sip-port"
> line. I'm testing with 2 to start with:
>
> # cat cicsco_fxo.xml
> <include>
>  <gateway name="fxoline3">
>    <param name="username" value="none"/>
>    <param name="password" value="none"/>
>    <param name="realm" value="172.27.1.20"/>
>    <param name="sip-port" value="5260"/>
>    <param name="register" value="false"/>
>  </gateway>
>  <gateway name="fxoline4">
>    <param name="username" value="none"/>
>    <param name="password" value="none"/>
>    <param name="realm" value="172.27.1.20"/>
>    <param name="sip-port" value="5360"/>
>    <param name="register" value="false"/>
>  </gateway>
>
> I have to use mod_distributor to select one of the gateways that
> define the SIP ports. Thats is configured in the autoload_configs
> directory.
>
> # cat distributor.conf.xml
> <configuration name="distributor.conf" description="Distributor
> Configuration">
>  <lists>
>    <list name="cisco_fxo" total-weight="2">
>      <node name="fxoline3" weight="1"/>
>      <node name="fxoline4" weight="1"/>
>    </list>
>  </lists>
> </configuration>
>
> Finally, I use a dialplan to access this distribution of gateways when
> a 4 digit number starting with 8 is dialed from the soft-phone.
>
> # cat 33_ciscofox.xml
> <include>
>  <extension name="pabx">
>    <condition field="destination_number" expression="^(8\d{3})$">
>      <action application="bridge"
> data="sofia/gateway/${distributor(cisco_fxo)}/$1"/>
>    </condition>
>  </extension>
> </include>
>
> Result expected - it all works.
> Result I get is:
>
> freeswitch at PBX.localdomain> 2012-06-29 04:13:44.287982 [NOTICE]
> switch_channel.c:926 New Channel sofia/internal/1002 at 172.16.164.33
> [d0fc47e6-c1a0-11e1-881d-f70f560259d2]
> 2012-06-29 04:13:44.287982 [INFO] mod_dialplan_xml.c:485 Processing
> 1002 <1002>->8569 in context default
> 2012-06-29 04:13:44.298584 [ERR] mod_sofia.c:4492 Invalid Gateway ''
> 2012-06-29 04:13:44.298584 [NOTICE] mod_sofia.c:4889 Close Channel N/A
> [CS_NEW]
> 2012-06-29 04:13:44.298584 [NOTICE] switch_ivr_originate.c:2535 Cannot
> create outgoing channel of type [sofia] cause: [INVALID_GATEWAY]
> 2012-06-29 04:13:44.298584 [INFO] mod_dptools.c:2956 Originate Failed.
>  Cause: INVALID_GATEWAY
> 2012-06-29 04:13:44.298584 [NOTICE] mod_dptools.c:3076 Hangup
> sofia/internal/1002 at 172.16.164.33 [CS_EXECUTE] [INVALID_GATEWAY]
> 2012-06-29 04:13:44.298584 [NOTICE] switch_core_session.c:1447 Session
> 11 (sofia/internal/1002 at 172.16.164.33) Ended
> 2012-06-29 04:13:44.298584 [NOTICE] switch_core_session.c:1449 Close
> Channel sofia/internal/1002 at 172.16.164.33 [CS_DESTROY]
>
> So what is invalid about the gateway?
>
> Cheers
>
> --
> Robin Gilks
>
> --
>
> ------------------------------
> This email, including any attachments, is only for the intended recipient.
> It is subject to copyright, is confidential and may be the subject of legal
> or other privilege, none of which is waived or lost by reason of this
> transmission.
> If you are not an intended recipient, you may not use, disseminate,
> distribute or reproduce such email, any attachments, or any part thereof.
> If you have received a message in error, please notify the sender
> immediately and erase all copies of the message and any attachments.
> Unfortunately, we cannot warrant that the email has not been altered or
> corrupted during transmission nor can we guarantee that any email or any
> attachments are free from computer viruses or other conditions which may
> damage or interfere with recipient data, hardware or software. The
> recipient relies upon its own procedures and assumes all risk of use and of
> opening any attachments.
> ------------------------------
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> Join Us At ClueCon - Aug 7-9, 2012
>
> 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/20120629/97a645f1/attachment-0001.html 


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