My understanding is that loose_route() checks for a Route header field. The standard cfg entry will then relay the SIP request. Let's take the following scenario. I have a PSTN gateway which listens on port 5060 and accepts to that port only from my SIP proxy. Normally the proxy takes care of authentication and authorization and if approved, forwards to the gateway. What if someone were to send an INVITE to my proxy with a header: Route: sip:phone-number@pstn-gateway? Would the proxy forward it, and the gateway then set up the call?
Thanks in advance.
Dovid
Any comments? (Pleeease.)
Dovid
-----Original Message----- From: serusers-bounces@iptel.org [mailto:serusers-bounces@lists.iptel.org]On Behalf Of Dovid Sent: Thursday, September 25, 2003 3:30 PM To: Serusers Subject: [Serusers] loose_route
My understanding is that loose_route() checks for a Route header field. The standard cfg entry will then relay the SIP request. Let's take the following scenario. I have a PSTN gateway which listens on port 5060 and accepts to that port only from my SIP proxy. Normally the proxy takes care of authentication and authorization and if approved, forwards to the gateway. What if someone were to send an INVITE to my proxy with a header: Route: sip:phone-number@pstn-gateway? Would the proxy forward it, and the gateway then set up the call?
Thanks in advance.
Dovid
_______________________________________________ Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
What if someone were to send an INVITE to your proxy with a header: Route: sip:phone-number@pstn-gateway? Would the proxy forward it, and the gateway then set up the call? Normally the request is directed to the proxy. The proxy then authenticates before forwarding to the PSTN gateway. In the above example, there was a Route header. In which case doesn't it mean if (loose_route()) { #Route header exists. t_relay(); #Forward now. Don't authenticate. break; }; Is my understanding of loose_route() wrong?
Thanks.
Dovid
-----Original Message----- From: Juha Heinanen [mailto:jh@tutpro.com] Sent: Tuesday, September 30, 2003 2:06 AM To: Dovid Cc: Serusers Subject: RE: [Serusers] loose_route
Dovid writes:
My understanding is that loose_route() checks for a Route header field.
The
proxy
with a header: Route: sip:phone-number@pstn-gateway? Would the proxy forward it, and the gateway then set up the call?
i call loose_route() in the beginning of ser.cfg before the user is authenticated and approved for pstn access.
-- juha
Yes, the proxy will forward the request to the PSTN gateway. In case of loose routing, Request-URI doesn't always contain URI where the message will be sent. In that case loose_route will return 1 and the condition will be true.
Simply challenge the messages before forwarding them.
Jan.
On 30-09 09:40, Dovid wrote:
What I do at iptel is:
if (loose_route()) { if (uri=~"sip:[+0-9]+@mygw.iptel.org") { /* if gateway in my request-uri, proceed to route[3] which includes all ACL checks */ route(3); } else { append_hf("P-hint: rr-enforced\r\n"); t_relay(); }; break; };
-jiri
At 03:40 PM 9/30/2003, Dovid wrote:
-- Jiri Kuthan http://iptel.org/~jiri/