[Users] Proxy Route Processing
Victor Gamov
vit at lipetsk.ru
Wed Mar 28 18:57:20 CEST 2007
Klaus Darilion wrote:
> Does xxx.xxx.xx.xx mean always the same IP address? Then Route header IP
> address and From and To would be identical. That would be a bug.
Yes it's a same IP.
But why it a bug? I have two clients using the same OpenSER with address
XXX.XXX.XXX.XXX. Both clients use this IP as a "SIP proxy" parameter in
their equipments and use this address as domain of their AOR
I still confused with loose_route() behavior: why it use first and
single Route header previously placed by this proxy as route-decision
element? I hope that this Route must be deleted and R-RURI will be used
to make lookup() request.
BTW: packet in my example coming from ngrep not from OpenSER debug. So
it packet really getted by OpenSER for future processing.
> Thus, if you replace IP addresses make sure you replace them different.
>
> e.g. use "proxy.ip" and "gateway.ip" and "client.ip" as placeholder.
>
> regards
> klaus
>
> Victor Gamov wrote:
>> Hi guys!
>>
>> May be my previous message was some obscure. I'll try to make it clear.
>>
>> I have following request comes to my OpenSER (xxx.xxx.xxx.xxx is IP of
>> this OpenSER):
>>
>>> PRACK sip:1111 at xxx.xxx.xxx.xxx:5060;nat=yes SIP/2.0
>>> Via: SIP/2.0/UDP
>>> 192.168.100.77:5060;branch=z9hG4bK_00179A52BC45_T59048F1A
>>> From: "Vit-Horosho"
>>> <sip:vit-horosho at xxx.xxx.xxx.xxx>;tag=00179A52BC45_T1304371222
>>> To: <sip:1111 at xxx.xxx.xxx.xxx:5060>;tag =0015E9A0D47D_T1002915332
>>> Call-ID: CALL_ID3_00179A52BC45_T2098965184 at 192.168.100.77
>>> RAck: 1909013112 135588358 INVITE
>>> CSeq: 135588359 PRACK
>>> Contact: <sip:vit-horosho at 192.168.100.77:5060>
>>> Route: <sip:xxx.xxx.xxx.xxx;lr=on;ftag=00179A52BC45_T1304371222>
>>> Content-Length: 0
>>
>> this message processed by OpenSER loose_route() and I found following
>> output in OpenSER debug:
>>
>>> 0(99796) parse_headers: flags=200
>>> 0(99796) is_preloaded: No
>>> 0(99796) grep_sock_info - checking if host==us: 11==11 &&
>>> [xxx.xxx.xxx.xxx] == [xxx.xxx.xxx.xxx]
>>> 0(99796) grep_sock_info - checking if port 5060 matches port 5060
>>> 0(99796) after_strict: Next hop:
>>> 'sip:xxx.xxx.xxx.xxx;lr=on;ftag=00179A52BC45_T1304371222' is loose
>>> router
>>> 0(99796) parse_headers: flags=ffffffffffffffff
>>> 0(99796) rewrite_uri: Rewriting Request-URI with
>>> 'sip:xxx.xxx.xxx;lr=on;ftag=00179A52BC45_T1304371222'
>>> 0(99796) after_strict: The last route URI:
>>> 'sip:xxx.xxx.xxx.xxx;lr=on;ftag=00179A52BC45_T1304371222'
>>> 0(99796) parse_headers: flags=ffffffffffffffff
>>
>> It's strange for me why loose_route() change Request-URI with values
>> from Route. As I red at RFC3261 "16.12 Summary of Proxy Route
>> Processing" part (with my comments):
>>
>> 1. Request-URI must be rewrited based on location service (it will be
>> done after loose_route)
>> 2. The proxy will inspect the URI in the topmost Route header
>> field value. If it indicates this proxy, the proxy removes it
>> from the Route header field (in my case Route must be removed because
>> it indicate this proxy)
>> 3. Proxy will forward the request to the resource indicated
>> by the URI in the topmost Route header field value (but we have not
>> this Route after step 2) or in the Request-URI if no Route header
>> field is present (so it must be forwarded to URI getted on step 1)
>>
>>
>> So my question:
>> Is it my misconfiguration and I must call loose_route() not for all
>> requests coming to my proxy or my misunderstood of RFC3261 ?
>>
>> (the part of openser.cfg is followed):
>> >
>> > ----------- cut here ----------------
>> >
>> > # we record-route all messages -- to make sure that
>> > # subsequent messages will go through our proxy; that's
>> > # particularly good if upstream and downstream entities
>> > # use different transport protocol
>> > record_route();
>> >
>> > #xdbg("\n\troute[0]: before loose_route() ou=$ou; ru=$ru\n");
>> > # subsequent messages withing a dialog should take the
>> > # path determined by record-routing
>> > if ( loose_route() ) {
>> > # mark routing logic in request
>> > append_hf("P-hint: rr-enforced\r\n");
>> > # route(1);
>> > };
>> >
>> > force_rport();
>>
>> Thanks for advise!
>>
>> --
>> CU,
>> Victor Gamov
>>
>> _______________________________________________
>> Users mailing list
>> Users at openser.org
>> http://openser.org/cgi-bin/mailman/listinfo/users
--
CU,
Victor Gamov
More information about the sr-users
mailing list