[OpenSIPS-Users] Opensips as outbound proxy to Freeswitch

Bogdan-Andrei Iancu bogdan at opensips.org
Mon Feb 1 12:07:01 CET 2016


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 Developer
http://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 <mailto: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 <mailto: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 Developer
>     http://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");
>>
>>
>>     From the opensips config, i can see this is cause by this snipped:
>>
>>     if ( !(is_method("REGISTER")  ) ) {
>>     if (from_uri==myself)
>>     {
>>     # authenticate if from local subscriber
>>     # authenticate all initial non-REGISTER request that pretend to be
>>     # generated by local subscriber (domain from FROM URI is local)
>>     if (!proxy_authorize("", "subscriber")) {
>>     proxy_challenge("", "0");
>>     exit;
>>     }
>>     if (!db_check_from()) {
>>     sl_send_reply("403","Forbidden auth ID");
>>     exit;
>>     }
>>     consume_credentials();
>>     # caller authenticated
>>     } else {
>>     # if caller is not local, then called number must be local
>>     if (!uri==myself) {
>>     send_reply("403","Rely forbidden");
>>     exit;
>>     }
>>     }
>>
>>     }
>>
>>     What extra configuration should i be making to allow calls
>>     (INVITE etc) to be signalled via opensips ?
>>
>>     Here is a sample of the SIP trace:
>>
>>     REQUEST:
>>     ===================
>>     01-30 17:15:57.522: I/System.out(30771): INVITE
>>     sip:1012 at 192.168.0.46 SIP/2.0
>>     01-30 17:15:57.522: I/System.out(30771): Via: SIP/2.0/TCP
>>     10.1.4.24:57232;rport;branch=z9hG4bKPj2Ablr3CXdtiqLbZwAwM1IY.s2phTfK3i;alias
>>     01-30 17:15:57.522: I/System.out(30771): Max-Forwards: 70
>>     01-30 17:15:57.522: I/System.out(30771): From:
>>     sip:1000 at 192.168.0.46;tag=SgvMtXb0KnIhW0ZDWnLxDN1tglrpAPzD
>>     01-30 17:15:57.522: I/System.out(30771): To: sip:1012 at 192.168.0.46
>>     01-30 17:15:57.522: I/System.out(30771): Contact:
>>     <sip:1000 at 105.5.139.90:30789;ob>
>>     01-30 17:15:57.522: I/System.out(30771): Call-ID:
>>     MnJgNdYjsQsPxaxyPScBIbYydinJm9dR
>>     01-30 17:15:57.522: I/System.out(30771): CSeq: 9040 INVITE
>>     01-30 17:15:57.522: I/System.out(30771): Route:
>>     <sip:192.168.4.248;lr>
>>     01-30 17:15:57.522: I/System.out(30771): Allow: PRACK, INVITE,
>>     ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER,
>>     MESSAGE, OPTIONS
>>     01-30 17:15:57.522: I/System.out(30771): Supported: replaces,
>>     100rel, timer, norefersub
>>     01-30 17:15:57.522: I/System.out(30771): Session-Expires: 1800
>>     01-30 17:15:57.522: I/System.out(30771): Min-SE: 90
>>     01-30 17:15:57.522: I/System.out(30771): User-Agent: Pjsua2
>>     Android 2.4.5
>>     01-30 17:15:57.522: I/System.out(30771): Content-Type: application/s
>>
>>     RESPONSE
>>     ====================
>>     01-30 17:15:58.123: I/System.out(30771): SIP/2.0 403 Rely forbidden
>>     01-30 17:15:58.123: I/System.out(30771): Via: SIP/2.0/TCP
>>     10.1.4.24:57232;received=105.5.139.90;rport=30689;branch=z9hG4bKPj2Ablr3CXdtiqLbZwAwM1IY.s2phTfK3i;alias
>>     01-30 17:15:58.123: I/System.out(30771): From:
>>     sip:1000 at 192.168.0.46;tag=SgvMtXb0KnIhW0ZDWnLxDN1tglrpAPzD
>>     01-30 17:15:58.123: I/System.out(30771): To:
>>     sip:1012 at 192.168.0.46;tag=a0a925d2eca49498ea7382b7b1f63f38.62df
>>     01-30 17:15:58.123: I/System.out(30771): Call-ID:
>>     MnJgNdYjsQsPxaxyPScBIbYydinJm9dR
>>     01-30 17:15:58.123: I/System.out(30771): CSeq: 9040 INVITE
>>     01-30 17:15:58.123: I/System.out(30771): Server: OpenSIPS (2.1.2
>>     (x86_64/linux))
>>     01-30 17:15:58.123: I/System.out(30771): Content-Length: 0
>>
>>     -- 
>>     David
>>
>>
>>     _______________________________________________
>>     Users mailing list
>>     Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
> -- 
> David Wafula

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160201/f68bac3a/attachment-0001.htm>


More information about the Users mailing list