[Freeswitch-users] Duplicate gateways - how to use multiple user IDs?

Mario mario_fs at mgtech.com
Mon Sep 20 10:48:10 PDT 2010


Although I have the 2 accounts now registering with the same ITSP, I
can't get a dial out due to invalid gateway message even though I
changed the dialplan and tried many combinations. Now that I have the 2
accounts registered using proxy, how can I get the outbound diaplan to
direct to the correct gateway? I thought it was as simple as changing
the name to match then gateway name. Thanks!


2010-09-20 10:38:07.974744 [ERR] mod_sofia.c:3690 Invalid Gateway


2010-09-20 10:38:07.974744 [NOTICE] mod_sofia.c:4012 Close Channel N/A
[CS_NEW]

2010-09-20 10:38:07.974744 [ERR] switch_ivr_originate.c:2632 Cannot
create outgoing channel of type [sofia] cause: [INVALID_NUMBER_FORMAT]

2010-09-20 10:38:07.974744 [INFO] mod_dptools.c:2393 Originate Failed.
Cause: INVALID_NUMBER_FORMAT

2010-09-20 10:38:07.974744 [NOTICE] mod_dptools.c:2456 Hangup
sofia/internal/200 at 10.246.1.37 [CS_EXECUTE] [INVALID_NUMBER_FORMAT]



SIPS:
    <gateway name="a1.sip.itsp.com">
    <!--  <param name="proxy" value="sip.itsp.com"/> -->
      <param name="username" value="userid1"/>
      <param name="from-user" value="userid1"/>
      <param name="password" value="password1"/>
      <param name="expire-seconds" value="600"/>
      <param name="register" value="true"/>
      <param name="retry-seconds" value="30"/>
    </gateway>

      <gateway name="a2.sip.itsp.com">
    <!--  <param name="proxy" value="sip.itsp.com"/> -->
      <param name="username" value="userid2"/>
      <param name="from-user" value="userid2"/>
      <param name="password" value="password"/>
      <param name="expire-seconds" value="600"/>
      <param name="register" value="true"/>
      <param name="retry-seconds" value="30"/>
    </gateway>


DIALPLANS:
 <extension name="local.a1.sip.voipyourlife.com">
    <condition field="${toll_allow}" expression="local"/>
    <condition field="destination_number" expression="^8(\d{7})$">
      <action application="set"
data="effective_caller_id_number=${outbound_caller_id_number}"/>
      <action application="set"
data="effective_caller_id_name=${outbound_caller_id_name}"/>
      <action application="bridge"
data="sofia/gateway/a1.sip.itsp.com/1${default_areacode}$1 at a1.sip.itsp.com"/>
    </condition>
  </extension>


 <extension name="local.a2.sip.voipyourlife.com">
    <condition field="${toll_allow}" expression="local"/>
    <condition field="destination_number" expression="^8(\d{7})$">
      <action application="set"
data="effective_caller_id_number=${outbound_caller_id_number}"/>
      <action application="set"
data="effective_caller_id_name=${outbound_caller_id_name}"/>
      <action application="bridge"
data="sofia/gateway/a2.sip.itsp.com/1${default_areacode}$2 at a1.sip.itsp.com"/>
    </condition>
  </extension>





On 09/20/10 09:34, Mario wrote:
> Thanks very much that looks to be working! I am new at FreeSwitch
> and have read the book (very good), wiki, etc. I am working through
> my issues and this first post is very encouraging! Thanks to others
> that responded! Mario
> 
> On 09/20/2010 09:04 AM, Brian West wrote:
>> In this case you have to name each gateway unique names and use the
>> proxy field to specify the hostname to the proxy.
>> 
>> /b
>> 
>> On Sep 20, 2010, at 10:45 AM, Mario wrote:
>> 
>>> I have more than 1 account at an ITSP, I put both on
>>> sip_profiles/external. Both work but only one at a time. At
>>> startup I get ignoring duplicate gateway. I looked at the new
>>> book (very good) and examples, wiki, etc. but could not find a
>>> way to do this. This is a major problem. Anyone know how to do
>>> this? Thanks.
>>> 
>>> -- Mario _______________________________________________ 
>>> 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 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
> 



More information about the FreeSWITCH-users mailing list