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