[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freeswitch-users
Subject:    Re: [Freeswitch-users] Simple SPA8800 FXO connection to FreeSwitch
From:       Michael Collins <msc () freeswitch ! org>
Date:       2012-06-29 15:20:57
Message-ID: CAKzWOxUaakFUCWUfTyG1DamW0AHvai6zdQ9Ls5w7mCKC4XGw1g () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Go to fs_cli and type:

distributor cisco_fxo

If you get an error then you know your distributor is not set up correctly.
If you get "fxolineX" then your dialplan call to distributor is not
correct. Most likely it's the former, and most likely mod_distributor is
not compiled and/or installed.

In FS source:
Edit modules.conf and uncomment the line with "mod_distributor"
Do "make mod_distributor-install"

In fs_cli do:
load mod_distributor

Then go to conf/autoload_configs/modules.conf.xml
Uncomment the line w/ mod_distributor
That will make mod_distributor load each time FS starts.

-MC

On Thu, Jun 28, 2012 at 9:22 PM, Robin Gilks <robin.gilks@taitradio.com>wrote:

> 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@PBX.localdomain> 2012-06-29 04:13:44.287982 [NOTICE]
> switch_channel.c:926 New Channel sofia/internal/1002@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@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@172.16.164.33) Ended
> 2012-06-29 04:13:44.298584 [NOTICE] switch_core_session.c:1449 Close
> Channel sofia/internal/1002@172.16.164.33 [CS_DESTROY]
>
> So what is invalid about the gateway?
>
> Cheers
>
> --
> Robin Gilks
>
> --
>

[Attachment #5 (text/html)]

Go to fs_cli and type:<br><br>distributor cisco_fxo<br><br>If you get an error then \
you know your distributor is not set up correctly. If you get &quot;fxolineX&quot; \
then your dialplan call to distributor is not correct. Most likely it&#39;s the \
former, and most likely mod_distributor is not compiled and/or installed.<br> <br>In \
FS source:<br>Edit modules.conf and uncomment the line with \
&quot;mod_distributor&quot;<br>Do &quot;make mod_distributor-install&quot;<br><br>In \
fs_cli do:<br>load mod_distributor<br><br>Then go to \
conf/autoload_configs/modules.conf.xml<br> Uncomment the line w/ \
mod_distributor<br>That will make mod_distributor load each time FS \
starts.<br><br>-MC<br><br><div class="gmail_quote">On Thu, Jun 28, 2012 at 9:22 PM, \
Robin Gilks <span dir="ltr">&lt;<a href="mailto:robin.gilks@taitradio.com" \
target="_blank">robin.gilks@taitradio.com</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Greetings<br> <br>
I&#39;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 &quot;sip-port&quot;<br>
line. I&#39;m testing with 2 to start with:<br>
<br>
# cat cicsco_fxo.xml<br>
&lt;include&gt;<br>
  &lt;gateway name=&quot;fxoline3&quot;&gt;<br>
    &lt;param name=&quot;username&quot; value=&quot;none&quot;/&gt;<br>
    &lt;param name=&quot;password&quot; value=&quot;none&quot;/&gt;<br>
    &lt;param name=&quot;realm&quot; value=&quot;172.27.1.20&quot;/&gt;<br>
    &lt;param name=&quot;sip-port&quot; value=&quot;5260&quot;/&gt;<br>
    &lt;param name=&quot;register&quot; value=&quot;false&quot;/&gt;<br>
  &lt;/gateway&gt;<br>
  &lt;gateway name=&quot;fxoline4&quot;&gt;<br>
    &lt;param name=&quot;username&quot; value=&quot;none&quot;/&gt;<br>
    &lt;param name=&quot;password&quot; value=&quot;none&quot;/&gt;<br>
    &lt;param name=&quot;realm&quot; value=&quot;172.27.1.20&quot;/&gt;<br>
    &lt;param name=&quot;sip-port&quot; value=&quot;5360&quot;/&gt;<br>
    &lt;param name=&quot;register&quot; value=&quot;false&quot;/&gt;<br>
  &lt;/gateway&gt;<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>
&lt;configuration name=&quot;distributor.conf&quot; description=&quot;Distributor \
Configuration&quot;&gt;<br>  &lt;lists&gt;<br>
    &lt;list name=&quot;cisco_fxo&quot; total-weight=&quot;2&quot;&gt;<br>
      &lt;node name=&quot;fxoline3&quot; weight=&quot;1&quot;/&gt;<br>
      &lt;node name=&quot;fxoline4&quot; weight=&quot;1&quot;/&gt;<br>
    &lt;/list&gt;<br>
  &lt;/lists&gt;<br>
&lt;/configuration&gt;<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>
&lt;include&gt;<br>
  &lt;extension name=&quot;pabx&quot;&gt;<br>
    &lt;condition field=&quot;destination_number&quot; \
expression=&quot;^(8\d{3})$&quot;&gt;<br>  &lt;action \
application=&quot;bridge&quot;<br> \
data=&quot;sofia/gateway/${distributor(cisco_fxo)}/$1&quot;/&gt;<br>  \
&lt;/condition&gt;<br>  &lt;/extension&gt;<br>
&lt;/include&gt;<br>
<br>
Result expected - it all works.<br>
Result I get is:<br>
<br>
freeswitch@PBX.localdomain&gt; 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 &lt;1002&gt;-&gt;8569 in context \
default<br> 2012-06-29 04:13:44.298584 [ERR] mod_sofia.c:4492 Invalid Gateway \
&#39;&#39;<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></blockquote></div><br>



_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic