[OpenSIPS-Users] Fwd: Opensips as outbound proxy to Freeswitch
David Wafula
davidwaf at gmail.com
Tue Feb 2 09:44:01 CET 2016
---------- Forwarded message ----------
From: David Wafula <davidwaf at gmail.com>
Date: Tue, Feb 2, 2016 at 10:43 AM
Subject: Re: [OpenSIPS-Users] Opensips as outbound proxy to Freeswitch
To: Bogdan-Andrei Iancu <bogdan at opensips.org>
Yes, the opensips.cfg was indeed messed up. i was tinkering with it.
Anyway, i regenerated a clean one, put in the the alias, and happily got
registrations going through. And one way audio. Except that i think am
missing the big picture.
My goal is to have Opensips front Freeswitch:
Client <-> OpenSips <-> Freeswitch
To act as outbound proxy at this stage. As i learn more about it, i hope to
get into NATing, loadbalancing etc. Am afraid i have not succeeded in
achieving this goal unfortunately, yet, though i think am very close. This
is what i have done.
1. Added the alias as advised. The registrations fail. Then when i create
users in opensips, registration work perfectly, and one of the users can
call the other. Except that in this case it appears all is happening in
Opensips and freeswitch is not in the loop here. Infact, i verified, that
obviously registrationds are done on Opensips and not freeswitch.
2. I removed the alias, deleted the users from opensips. This time the
registrations goes through successfully onto freeswitch. Very happy, as
this is what i want. But now obviously INVITES fail with 403 Rely
forbidden.
It appears to me, there is more configuration that i must do, beyond
setting alias, to get Opensips to act as outboundproxy to freeswitch. I
need registrations and calls to happen on Freeswitch, but via Opensips.
So after again searching the internet, i can see that may be something
like dynamic routing can be done (
http://www.taitclarridge.com/techlog/2012/02/opensips-dynamic-routing.html),
or i can see whole lot of other way of doing it (
http://www.opensips.org/Documentation/Tutorials-OpenSIPSFreeSwitchIntegration
).
What is the recommended, possibly simplest way to do this: to get opensips
proxy registrations, invites , messaging to freeswitch.
Many thanks.
On Mon, Feb 1, 2016 at 5:30 PM, Bogdan-Andrei Iancu <bogdan at opensips.org>
wrote:
> David,
>
> Your opensips cfg is bogus - the test for the presence of username in RURI
> should not be done for a REGISTER requests (as they do not have a username
> part).
>
> Where have you taken the script from ? have you changed it by yourself ?
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 01.02.2016 15:06, David Wafula wrote:
>
> Thank you Bogdan. Ok i made the alias change, and now am getting "Address
> Incomplete" reply. Please see the log below, am not sure what could be
> now causing this:
>
> REQUEST
> ============
> 02-01 14:58:53.144: I/System.out(14726): REGISTER sip:192.168.0.46 SIP/2.0
> 02-01 14:58:53.144: I/System.out(14726): Via: SIP/2.0/UDP 10.0.1.175:30802
> ;rport;branch=z9hG4bKPjGfzHRCN4S.QyGFhBBv9njI9Amj2oU7ko
> 02-01 14:58:53.144: I/System.out(14726): Route: <sip:192.168.4.248;lr>
> 02-01 14:58:53.144: I/System.out(14726): Max-Forwards: 70
> 02-01 14:58:53.144: I/System.out(14726): From: <sip:1000 at 192.168.0.46
> >;tag=eNVm.45KTH3OkXAjSikua1cwsZ.XdeRE
> 02-01 14:58:53.144: I/System.out(14726): To: <sip:1000 at 192.168.0.46>
> 02-01 14:58:53.144: I/System.out(14726): Call-ID: 9
> TVBTDFtUPz05axr9qvyynhFWhJetb6m
> 02-01 14:58:53.144: I/System.out(14726): CSeq: 64838 REGISTER
> 02-01 14:58:53.144: I/System.out(14726): User-Agent: Pjsua2 Android 2.4.5
> 02-01 14:58:53.144: I/System.out(14726): Contact: <sip:1000 at 10.0.1.175:
> 34708;ob>
> 02-01 14:58:53.144: I/System.out(14726): Expires: 300
> 02-01 14:58:53.144: I/System.out(14726): Allow: PRACK, INVITE, ACK, BYE,
> CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
> 02-01 14:58:53.144: I/System.out(14726): Content-Length: 0
> 02-01 14:58:53.144: I/System.out(14726):
> 02-01 14:58:53.144: I/System.out(14726): --end msg--
>
> REPLY
> =============
>
>
> 02-01 14:58:53.585: I/System.out(14726): SIP/2.0 484 Address Incomplete
> 02-01 14:58:53.585: I/System.out(14726): Via: SIP/2.0/UDP 10.0.1.175:30802
> ;received=10.0.1.175;rport=30802
> ;branch=z9hG4bKPjGfzHRCN4S.QyGFhBBv9njI9Amj2oU7ko
> 02-01 14:58:53.585: I/System.out(14726): From: <sip:1000 at 192.168.0.46
> >;tag=eNVm.45KTH3OkXAjSikua1cwsZ.XdeRE
> 02-01 14:58:53.585: I/System.out(14726): To: <sip:1000 at 192.168.0.46
> >;tag=a0a925d2eca49498ea7382b7b1f63f38.d365
> 02-01 14:58:53.585: I/System.out(14726): Call-ID: 9
> TVBTDFtUPz05axr9qvyynhFWhJetb6m
> 02-01 14:58:53.585: I/System.out(14726): CSeq: 64838 REGISTER
> 02-01 14:58:53.585: I/System.out(14726): Server: OpenSIPS (2.1.2
> (x86_64/linux))
> 02-01 14:58:53.585: I/System.out(14726): Content-Length: 0
>
> On Mon, Feb 1, 2016 at 1:07 PM, Bogdan-Andrei Iancu <
> <bogdan at opensips.org>bogdan at opensips.org> wrote:
>
>> Hi David,
>>
>> I see. The problem is all the SIP traffic contains references to this 192.168.0.46,
>> but opensips has no idea how to handle consider this IP (like local or
>> foreign domain).
>>
>> It should handle it as local domain, so add in your cfg:
>> alias="192.168.0.46"
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 01.02.2016 12:21, David Wafula wrote:
>>
>> Hi Bogdan,
>> OpenSips is listening on 192.168.4.248, which running in totally
>> different network from freeswitch. Freeswitch is running on 192.168.0.46.
>> And, my test user 1000 at 192.168.0.46, is created on freeswitch. I do not
>> have any local users on opensips at this stage.
>>
>> Regards.
>>
>>
>>
>>
>> On Mon, Feb 1, 2016 at 11:48 AM, Bogdan-Andrei Iancu <
>> <bogdan at opensips.org>bogdan at opensips.org> wrote:
>>
>>> Hi David,
>>>
>>> The "relay forbidden" case happens when neither the FROM URI, nor the
>>> request URI contain a SIP domain served/local to OpenSIPS. In your case I
>>> see that the INVITE has in FROM and RURI the 192.168.0.46 SIP domain. Is
>>> your OpenSIPS actually listening on this IP ?
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>>
>>> On 30.01.2016 17:25, David Wafula wrote:
>>>
>>> Hello list,
>>> Am quite new to opensips. So i want opensips to act as an outbound proxy
>>> to freeswitch. I followed the tutorial on the opensips site and set up a
>>> running opensips instance (vanilla). I too have a running freeswitch
>>> instance.
>>>
>>> so, on my softphone, when i set outbound proxy as opensips, am able to
>>> register the phone successfully to freeswitch via opensips. But when i
>>> attempt to make a call, i get:
>>>
>>>
>>> send_reply("403","Rely forbidden");
>>>
>>>
>>>
>
--
David Wafula
--
David Wafula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160202/2d9b935e/attachment-0001.htm>
More information about the Users
mailing list