[OpenSIPS-Users] strange (?) loose_route() behaviour

Victor Gamov vit at euro-comm.net
Sat Oct 1 11:23:24 CEST 2011


Hi All!

I have the following situation with loose_route() which looks strange 
for me.

X.X.X.X is OpenSIPS-1.7.0
Y.Y.Y.Y is next-hop SIP device
Z.Z.Z.Z is SIP UAC

The following ACK come to OpenSIPS
--------------
U 2011/10/01 00:54:49.046875 Z.Z.Z.Z:59343 -> X.X.X.X:5060
ACK sip:123456789 at Y.Y.Y.Y:5080 SIP/2.0.
Via: SIP/2.0/UDP 
192.168.0.114:5060;branch=z9hG4bK84de8ff6d771e53a8aee9afc7831780;rport.
Route: <sip:X.X.X.X;lr;ftag=1406706537;did=107.420a00d5>.
Route: <sip:Y.Y.Y.Y:5080;lr>.
From: "myuser" <sip:myuser at mydomain>;tag=1406706537.
To: 
<sip:123456789 at mydomain;user=phone>;tag=265de77d7e20be8300f0e1c6014f1c57.
Call-ID: 3234622210 at 192_168_0_114.
CSeq: 3 ACK.
Contact: <sip:myuser at 192.168.0.114:5060>.
Content-Length: 0.
--------------


Then OpenSIPS do loose_route():

--------------
Oct  1 00:54:49 [80328] DBG:core:parse_headers: flags=200
Oct  1 00:54:49 [80328] DBG:rr:is_preloaded: is_preloaded: No
Oct  1 00:54:49 [80328] DBG:core:grep_sock_info: checking if host==us: 
12==12 &&  [Y.Y.Y.Y] == [X.X.X.X]
Oct  1 00:54:49 [80328] DBG:core:grep_sock_info: checking if port 5060 
matches port 5080
Oct  1 00:54:49 [80328] DBG:core:grep_sock_info: checking if host==us: 
12==12 &&  [Y.Y.Y.Y] == [X.X.X.X]
Oct  1 00:54:49 [80328] DBG:core:grep_sock_info: checking if port 5060 
matches port 5080
Oct  1 00:54:49 [80328] DBG:core:db_new_result: allocate 48 bytes for 
result set at 0x6fe0a8
Oct  1 00:54:49 [80328] DBG:db_mysql:db_mysql_get_columns: 1 columns 
returned from the query
Oct  1 00:54:49 [80328] DBG:core:db_allocate_columns: allocate 28 bytes 
for result columns at 0x6ff320
Oct  1 00:54:49 [80328] DBG:db_mysql:db_mysql_get_columns: 
RES_NAMES(0x6ff328)[0]=[domain]
Oct  1 00:54:49 [80328] DBG:db_mysql:db_mysql_get_columns: use DB_STRING 
result type
Oct  1 00:54:49 [80328] DBG:core:db_allocate_rows: allocate 48 bytes for 
result rows and values at 0x6fafe0
Oct  1 00:54:49 [80328] DBG:db_mysql:db_mysql_str2val: converting STRING 
[Y.Y.Y.Y]
Oct  1 00:54:49 [80328] DBG:domain:is_domain_local: Realm 'Y.Y.Y.Y' is local
Oct  1 00:54:49 [80328] DBG:core:db_free_columns: freeing result columns 
at 0x6ff320
Oct  1 00:54:49 [80328] DBG:core:db_free_rows: freeing 1 rows
Oct  1 00:54:49 [80328] DBG:core:db_free_row: freeing row values at 0x6faff0
Oct  1 00:54:49 [80328] DBG:core:db_free_rows: freeing rows at 0x6fafe0
Oct  1 00:54:49 [80328] DBG:core:db_free_result: freeing result set at 
0x6fe0a8
Oct  1 00:54:49 [80328] DBG:rr:after_strict: Next hop: 
'sip:X.X.X.X;lr;ftag=1406706537;did=107.420a00d5' is loose router
Oct  1 00:54:49 [80328] DBG:core:parse_headers: flags=ffffffffffffffff
Oct  1 00:54:49 [80328] DBG:rr:after_strict: The last route URI: 
'sip:Y.Y.Y.Y:5080;lr'
Oct  1 00:54:49 [80328] DBG:rr:run_rr_callbacks: callback id 1 entered 
with <>
Oct  1 00:54:49 [80328] DBG:dialog:dlg_onroute: Route param 'did' not found

route[1]: METHOD=ACK; R-URI=sip:Y.Y.Y.Y:5080;lr; 
du=sip:X.X.X.X;lr;ftag=1406706537;did=107.420a00d5; mf=2; bf=192; 
ds=Contact: sip:Y.Y.Y.Y:5080;lr
--------------


If Y.Y.Y.Y is known as local domain from domain table, then 
loose_route() decide to send ACK to himself
I hope this request will be send to Y.Y.Y.Y because topmost Route 
indicate this proxy and it will be removed and next Route will be used 
to route request


If Y.Y.Y.Y is NOT known as local domain (deleted from domain table) then 
request routed properly


Also, I try old kamailio-1.5.1 with this configuration and request 
routed as expected by me


Is this bug/feature or my misunderstood of loose_route (again?! :-) )

Thanks!

-- 
CU,
Victor Gamov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vit.vcf
Type: text/x-vcard
Size: 156 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20111001/f55df307/attachment.vcf>


More information about the Users mailing list