[OpenSIPS-Users] Routing to Proxy Issue

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Mar 14 17:55:01 CET 2013


Hi Nathaniel,

According to SIP RFC, replies are following the same path as requests 
(in revert order, of course) - this back routing is done based on VIA 
hdr (added in requests, consumed from replies).

if you want to avoid opensips to add the VIA hdr (so, to be skipped by 
replies), use the send() function for relaying the requests - be careful 
this is a stateless function, so no failure_route !

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 03/14/2013 09:30 AM, Nathaniel L Keeling III wrote:
> Hello,
>
> I would like to know if this routing is possible and if so how. I have 
> a scenario where I have a opensips proxy that I want to use just to 
> send requests to other opensips proxy witch would then process the 
> request. Here is the scenario:  client  --> p1 --> p2 --> client --> 
> p2. I have been able to route to proxy 2 but the replies are still 
> being routed back via proxy 1 then to the client. I was hoping to send 
> the replies directly to the client and not back thru the first proxy. 
> Is this possible? I am currently using the dispatcher module to send 
> the requests to the second proxy. I also noticed that the SIP packets 
> have a VIA header of the first proxies IP address when it reaches the 
> second proxy. I thought the record_route was causing this, so I moved 
> it after I send the request to the second proxy. Here is a small 
> snipet of my code:
>
> if (is_method("REGISTER")) {
>    if (!ds_select_dst("2", "3")) {
>             sl_send_reply("503", "Rawr!!");
>    };
>    t_relay();
> }
>
>
> Thanks
>
> Nathaniel
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



More information about the Users mailing list