Multiple Gateways ** SOLVED **

Moderator: areski

Multiple Gateways ** SOLVED **

Postby Jansalex » Mon Jan 09, 2012 12:16 pm

Hi all,

I want to have multiple Gateways. One per customer. All customers have the same VoIP provider.

When I do the xml file, only run one of the Gateways :

[WARNING] sofia.c:2314 Ignoring duplicate gateway 'sip.voiprovider.com'

How can I solve this ?
Last edited by Jansalex on Sun Jan 22, 2012 9:41 am, edited 1 time in total.
Jansalex
 
Posts: 10
Joined: Fri Jan 06, 2012 12:20 pm

Re: Multiple Gateways

Postby jroper » Tue Jan 10, 2012 3:40 pm

Hi

When creating the XML gateway files as described in the beginners guide, set the gateway name to anything you like, e.g. sip-provider-smith or sip-provider-jones. for your two customers, Smith and Jones using SIP provider "Sip-Provider"

Then use the param name "realm", and set the value to sip.voiprovider.com...

Code: Select all
<param name="realm" value="sip.voiprovider.com"/>


...and then set the username / from-user / password / etc parameters as required in each xml file.

Then in Newfies Dialer, add gateways of:-

sofia/gateway/sip-provider-smith/
sofia/gateway/sip-provider-jones/

Using this method allows you to use multiple gateways each with a different account but using the same SIP provider.

Sofia Status should look something like this:-

Code: Select all
external::sip-provider-smith   gateway                sip:account1@sip.voiprovider.com   REGED
external::sip-provider-jones   gateway                sip:account2@sip.voiprovider.com   REGED


Joe
jroper
 
Posts: 31
Joined: Wed Oct 19, 2011 1:19 pm

Re: Multiple Gateways

Postby Jansalex » Sat Jan 14, 2012 9:25 pm

Wow,

it works. I download the nbew release. Going to test it.

Very very very good job.
Jansalex
 
Posts: 10
Joined: Fri Jan 06, 2012 12:20 pm

Re: Multiple Gateways

Postby Jansalex » Sun Jan 15, 2012 10:51 pm

Don´t work.

The gateway appears registred :

Name Type Data State
=================================================================================================
external profile sip:mod_sofia@MyIP:5080 RUNNING (0)
external::example.com gateway sip:joeuser@example.com NOREG
external::sip.voiprovider.com-Test1 gateway sip:xxxxxxxxx@sip.voiprovider.com REGED
external::sip.voiprovider.com.Test2 gateway sip:zzzzzzzzz@sip.voiprovider.com REGED
internal-ipv6 profile sip:mod_sofia@[::1]:5060 RUNNING (0)
MyIp (xxx.xxx.xxx.xxx) alias internal ALIASED
internal profile sip:mod_sofia@MyIP:5060 RUNNING (0)
=================================================================================================



2012-01-15 23:40:27.609436 [DEBUG] switch_ivr_originate.c:1884 Parsing global variables
2012-01-15 23:40:27.609436 [DEBUG] switch_event.c:1521 Parsing variable [plivo_request_uuid]=[ebe0bea6-3fc9-11e1-b98f-00163e1e13cb]
2012-01-15 23:40:27.609436 [DEBUG] switch_event.c:1521 Parsing variable [plivo_answer_url]=[http://MyIP:8008/api/v1/answercall/]
2012-01-15 23:40:27.609436 [DEBUG] switch_event.c:1521 Parsing variable [plivo_hangup_url]=[http://MyIp:8008/api/v1/hangupcall/]
2012-01-15 23:40:27.609436 [DEBUG] switch_event.c:1521 Parsing variable [origination_caller_id_number]=[513333333]
2012-01-15 23:40:27.609436 [DEBUG] switch_event.c:1521 Parsing variable [bridge_early_media]=[true]
2012-01-15 23:40:27.609436 [DEBUG] switch_event.c:1521 Parsing variable [hangup_after_bridge]=[true]
2012-01-15 23:40:27.609436 [DEBUG] switch_event.c:1521 Parsing variable [plivo_from]=[512222222]
2012-01-15 23:40:27.609436 [DEBUG] switch_event.c:1521 Parsing variable [plivo_to]=[517777777]
2012-01-15 23:40:27.609436 [DEBUG] switch_event.c:1521 Parsing variable [plivo_app]=[true]
2012-01-15 23:40:27.609436 [DEBUG] switch_event.c:1521 Parsing variable [absolute_codec_string]=[PCMA]
2012-01-15 23:40:27.609436 [DEBUG] switch_event.c:1521 Parsing variable [originate_timeout]=[1800]
2012-01-15 23:40:27.609436 [DEBUG] switch_event.c:1521 Parsing variable [ignore_early_media]=[true]
2012-01-15 23:40:27.609436 [ERR] mod_sofia.c:4383 Invalid URL 'sip.voipprovider.com-Test1513333333'
2012-01-15 23:40:27.609436 [NOTICE] mod_sofia.c:4777 Close Channel N/A [CS_NEW]
2012-01-15 23:40:27.609436 [DEBUG] switch_core_state_machine.c:494 () Running State Change CS_DESTROY
2012-01-15 23:40:27.609436 [DEBUG] switch_core_state_machine.c:504 (N/A) State DESTROY
2012-01-15 23:40:27.609436 [DEBUG] mod_sofia.c:374 N/A SOFIA DESTROY
2012-01-15 23:40:27.609436 [DEBUG] switch_core_state_machine.c:504 (N/A) State DESTROY going to sleep
2012-01-15 23:40:27.609436 [NOTICE] switch_ivr_originate.c:2459 Cannot create outgoing channel of type [sofia] cause: [INVALID_URL]
2012-01-15 23:40:27.609436 [DEBUG] switch_ivr_originate.c:3364 Originate Resulted in Error Cause: 610 [INVALID_URL]
/exit
Jansalex
 
Posts: 10
Joined: Fri Jan 06, 2012 12:20 pm

Re: Multiple Gateways

Postby jroper » Mon Jan 16, 2012 8:12 pm

Hi

Can I suggest renaming your trunks with something that looks less like an address on the internet? e.g.

sip.voiprovider.com-Test1 => sip-voiprovider-com-Test1
sip.voiprovider.com.Test2 => sip-voiprovider-com-Test2

Joe
jroper
 
Posts: 31
Joined: Wed Oct 19, 2011 1:19 pm

Re: Multiple Gateways

Postby Jansalex » Thu Jan 19, 2012 6:30 am

Hi Joe,

I put a name without dots and the error persists :

2012-01-19 07:28:18.182269 [ERR] mod_sofia.c:4383 Invalid URL 'voip-siprovider-com633333333'
2012-01-19 07:28:18.182269 [NOTICE] mod_sofia.c:4777 Close Channel N/A [CS_NEW]
Jansalex
 
Posts: 10
Joined: Fri Jan 06, 2012 12:20 pm

Re: Multiple Gateways

Postby jroper » Fri Jan 20, 2012 10:23 am

Hi

I would suggest closely inspecting your xml file, as I tested this approach as working.

Joe
jroper
 
Posts: 31
Joined: Wed Oct 19, 2011 1:19 pm

Re: Multiple Gateways

Postby Jansalex » Sun Jan 22, 2012 9:00 am

This is the XML,

The gateway is registered under the name Test-01

In the gateway admin interface I put sofia/gateway/Test-01 ¿ Its right ?


<include>
<gateway name="Test-01">
<!--/// account username *required* ///-->
<param name="username" value="1111111111"/>
<!--// auth realm: *optional* same as gateway name, if blank ///-->
<param name="realm" value="sip.voiprovider.com"/>
<!--/// username to use in from: *optional* same as username, if blank ///-->
<param name="from-user" value="1111111111"/>
<!--/// domain to use in from: *optional* same as realm, if blank ///-->
<!--<param name="from-domain" value="asterlink.com"/>-->
<!--/// account password *required* ///-->
<param name="password" value="$$$$$$$$$$$"/>
<!--/// extension for inbound calls: *optional* same as username, if blank ///-->
<!--<param name="extension" value="cluecon"/>-->
<!--/// proxy host: *optional* same as realm, if blank ///-->
<!--<param name="proxy" value="asterlink.com"/>-->
<!--/// send register to this proxy: *optional* same as proxy, if blank ///-->
<!--<param name="register-proxy" value="mysbc.com"/>-->
<!--/// expire in seconds: *optional* 3600, if blank ///-->
<!--<param name="expire-seconds" value="60"/>-->
<!--/// do not register ///-->
<param name="register" value="true"/>
<!-- which transport to use for register -->
<!--<param name="register-transport" value="udp"/>-->
<!--How many seconds before a retry when a failure or timeout occurs -->
<!--<param name="retry-seconds" value="30"/>-->
<!--Use the callerid of an inbound call in the from field on outbound calls via this gateway -->
<!--<param name="caller-id-in-from" value="false"/>-->
<!--extra sip params to send in the contact-->
<!--<param name="contact-params" value="tport=tcp"/>-->
<!--send an options ping every x seconds, failure will unregister and/or mark it down-->
<!--<param name="ping" value="25"/>-->
</gateway>
<!--rfc5626 : Abilitazione rfc5626 ///-->
<!--<param name="rfc-5626" value="true"/>-->
<!--rfc5626 : extra sip params to send in the contact-->
<!--<param name="reg-id" value="1"/>-->
</include>
Jansalex
 
Posts: 10
Joined: Fri Jan 06, 2012 12:20 pm

Re: Multiple Gateways ** Solved **

Postby Jansalex » Sun Jan 22, 2012 9:07 am

The problem was in the definition of the gateway in the admin panel.

sofia/gateway/Test-01 ---> Don´t work
sofia/gateway/Test-01/ ---> Work

Thanks, continue testing.
Jansalex
 
Posts: 10
Joined: Fri Jan 06, 2012 12:20 pm


Return to Installation

Who is online

Users browsing this forum: No registered users and 66 guests

cron