[OpenSER-Users] uri transformation errors in 1.2

Andreas Granig agranig at sipwise.com
Thu Aug 9 11:59:42 CEST 2007


Hi,

Here we go (I'll send you the binary files and the openser.cfg in 
private, maybe you can reproduce it with it?):

# ./sbin/openser -V
version: openser 1.2.1-notls (i386/linux)
flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST, SHM_MEM, 
SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
svnrevision: 2:2584
@(#) $Id: main.c 2304 2007-05-25 16:36:07Z bogdan_iancu $
main.c compiled on 23:06:25 Aug  8 2007 with gcc 4.1.2


SIP Request:
method:  <INVITE>
uri:     <sip:test at 192.168.101.11;sw_domain=sipwise.com>
version: <SIP/2.0>
parse_headers: flags=2
Found param type 232, <branch> = <z9hG4bK.559fb63e>; state=6
Found param type 235, <rport> = <n/a>; state=6
Found param type 237, <alias> = <n/a>; state=16
end of header reached, state=5
parse_headers: Via found, flags=2
parse_headers: this is the first via
After parse_msg...
preparing to run routing scripts...
parse_headers: flags=ffffffffffffffff
Found param type 232, <branch> = <z9hG4bKd65f.67a4c9a4.0>; state=16
end of header reached, state=5
parse_headers: Via found, flags=ffffffffffffffff
parse_headers: this is the second via
DEBUG:parse_to:end of header reached, state=10
DBUG:parse_to: display={}, ruri={sip:test at sipwise.com}
DEBUG: get_hdr_field: <To> [24]; uri=[sip:test at sipwise.com]
DEBUG: to body [<sip:test at sipwise.com>  ]
get_hdr_field: cseq <CSeq>: <10> <INVITE>
DEBUG: get_hdr_body : content_length=0
found end of header
parse_headers: flags=ffffffffffffffff
parse_headers: flags=ffffffffffffffff
DEBUG: add_param: tag=7AF24EE9-46BA33CF000A5188-B7C82BB0
DEBUG:parse_to:end of header reached, state=29
DBUG:parse_to: display={}, ruri={sip:test at sipwise.com}
New request - M=INVITE R=sip:test at 192.168.101.11;sw_domain=sipwise.com 
F=sip:test at sipwise.com T=sip:test at sipwise.com IP=192.168.101.11 
ID=08BC2B20-46BA33CF000A51AC-B7C82BB0 at 192.168.101.11  DN=<null>
unprocessed uri='sip:test at 192.168.101.11;sw_domain=sipwise.com'
domain=''
ERROR: parse_uri: bad host in uri (error at char
ERROR: parse_sip_msg_uri: bad uri <sip:test@>
set_err_info: ec: 1, el: 3, ei: 'error parsing r-uri'
xl_get_ruri: ERROR while parsing the R-URI
processed uri='<null>'
ERROR: parse_uri: bad host in uri (error at char
ERROR: parse_sip_msg_uri: bad uri <sip:test@>
set_err_info: ec: 1, el: 3, ei: 'error parsing r-uri'
xl_get_ruri: ERROR while parsing the R-URI
Application server request post-processed - M=INVITE R=<null> 
F=sip:test at sipwise.com T=sip:test at sipwise.com IP=192.168.101.11 
ID=08BC2B20-46BA33CF000A51AC-B7C82BB0 at 192.168.101.11  DN=<null>
DEBUG:maxfwd:is_maxfwd_present: value = 70
comp_scriptvar: int 20 : 0 / 1
parse_headers: flags=200
find_first_route: No Route headers found
loose_route: There is no Route HF
parse_headers: flags=ffffffffffffffff
check_via_address(192.168.101.11, 127.0.0.1, 0)
parse_headers: flags=10000
pre_auth(): Credentials with given realm not found
ERROR: parse_uri: bad host in uri (error at char
ERROR: parse_sip_msg_uri: bad uri <sip:test@>
set_err_info: ec: 1, el: 3, ei: 'error parsing r-uri'
xl_get_ruri: ERROR while parsing the R-URI
Proxy authentication failed - M=INVITE R=<null> F=sip:test at sipwise.com 
T=sip:test at sipwise.com IP=192.168.101.11 
ID=08BC2B20-46BA33CF000A51AC-B7C82BB0 at 192.168.101.11
build_auth_hf(): 'Proxy-Authenticate: Digest realm="sipwise.com", 
nonce="46bae5588006df1b6ccaf8884b1726c295dc36e9"  '
parse_headers: flags=ffffffffffffffff
check_via_address(192.168.101.11, 127.0.0.1, 0)
DEBUG:destroy_avp_list: destroying list 0xb3a2f898
receive_msg: cleaning up

Cheers,
Andreas



Daniel-Constantin Mierla wrote:
> Hello Andreas,
> 
> I run many times the sipsak and it is ok. Could you send me the logs in 
> debug=7 and output of openser -V?
> 
> Daniel
> 
> 
> On 08/09/07 00:32, Andreas Granig wrote:
>> Hi Daniel,
>>
>> Very strange, since I currently tried a fresh version of latest 1.2 
>> without any modifications, and it still doesn't work for me. After 
>> some tries, I get this errors:
>>
>> unprocessed uri='sip:test at 192.168.101.11;sw_domain=sipwise.com'
>> domain=''
>> ERROR: parse_uri: bad host in uri (error at char
>> ERROR: parse_sip_msg_uri: bad uri <sip:agranig@>
>> xl_get_ruri: ERROR while parsing the R-URI
>> processed uri='<null>'
>> ERROR: parse_uri: bad host in uri (error at char
>> ERROR: parse_sip_msg_uri: bad uri <sip:agranig@>
>>
>> You can reproduce this easily using sipsak (just adapt the ruri-ip):
>>
>> # sipsak -l 7060 -f /tmp/inv.txt \
>>     -s sip:test at 192.168.101.11;sw_domain=sipwise.com
>>
>> The file /tmp/inv.txt contains:
>>
>> INVITE sip:test at 192.168.101.11;sw_domain=sipwise.com SIP/2.0
>> Via: SIP/2.0/UDP 192.168.101.11:7060;branch=z9hG4bKd65f.67a4c9a4.0
>> To: <sip:test at sipwise.com>
>> From: <sip:test at sipwise.com>;tag=7AF24EE9-46BA33CF000A5188-B7C82BB0
>> CSeq: 10 INVITE
>> Call-ID: 08BC2B20-46BA33CF000A51AC-B7C82BB0 at 192.168.101.11
>> Content-Length: 0
>> Contact: <sip:default_en at 192.168.101.11:7060>
>> Content-Type: application/sdp
>> Max-Forwards: 70
>> User-Agent: Sipwise media server
>>
>> Regards,
>> Andreas
>>
>> Daniel-Constantin Mierla wrote:
>>> Hello Andreas,
>>>
>>> I have tested with trunk and latest 1.2 and everything went fine. Do 
>>> you use the latest SVN version of branch 1.2? It was a fix of a 
>>> similar issue some time ago.
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>> On 08/08/07 10:14, Andreas Granig wrote:
>>>> Btw, forget the last log line "msg_uri: bad uri <sip:user@>", it 
>>>> sneaked in while copy&paste. Rest is ok.
>>>>
>>>> Andreas Granig wrote:
>>>>> Hi Bogdan,
>>>>>
>>>>> No, the r-uri is definitely ok. Here's the real-world snipped and 
>>>>> logging example. The snipped is placed as very first code in route[0]:
>>>>>
>>>>>     if(uri =~ ";sw_domain=.+")
>>>>>     {
>>>>>         xlog("L_INFO", "unprocessed uri='$ru'\n");
>>>>>         $var(swdom) = $(ru{uri.param,sw_domain});
>>>>>         xlog("L_INFO", "domain='$var(swdom)'\n");
>>>>>         $ru = "sip:" + $rU + "@" + $var(swdom);
>>>>>         xlog("L_INFO", "processed uri='$ru'\n");
>>>>>     }
>>>>>
>>>>> This works well for ~5 times, then I get:
>>>>>
>>>>> unprocessed uri='sip:agranig at 192.168.101.11;sw_domain=sipwise.com'
>>>>> domain=''
>>>>> ERROR: parse_uri: bad host in uri (error at char
>>>>> ERROR: parse_sip_msg_uri: bad uri <sip:agranig@>
>>>>> xl_get_ruri: ERROR while parsing the R-URI
>>>>> processed uri='<null>'
>>>>> msg_uri: bad uri <sip:user@>
>>>>>
>>>>> Andreas
>>>>>
>>>>>
>>>>> Bogdan-Andrei Iancu wrote:
>>>>>> Hi Andreas,
>>>>>>
>>>>>> I rather suspect that there is a problem with the RURI you are 
>>>>>> trying to use. I guess you get the error for the first line 
>>>>>> ($var(mydom) = $(ru{uri.param,my_domain});), so can you check 
>>>>>> (xlog) what's the ruri before?
>>>>>>
>>>>>> regards,
>>>>>> bogdan
>>>>>>
>>>>>> Andreas Granig wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> At the top of my config I've put the following snippet for some 
>>>>>>> SEMS routings:
>>>>>>>
>>>>>>>     if(uri =~ ";my_domain=.+")
>>>>>>>     {
>>>>>>>         $var(mydom) = $(ru{uri.param,my_domain});
>>>>>>>         xlog("L_INFO", "domain='$var(mydom)'\n");
>>>>>>>         $ru = "sip:" + $rU + "@" + $var(mydom);
>>>>>>>     }
>>>>>>>
>>>>>>> It does nothing more than changing an r-uri 
>>>>>>> "sip:user at domain;my_domain=otherdomain" to 
>>>>>>> "sip:user at otherdomain". This works fine for some requests, but 
>>>>>>> then it starts to complain:
>>>>>>>
>>>>>>> xl_get_ruri: ERROR while parsing the R-URI
>>>>>>> domain=''
>>>>>>> ERROR: parse_uri: bad host in uri (error at char
>>>>>>> ERROR: parse_sip_msg_uri: bad uri <sip:user@>
>>>>>>>
>>>>>>> So obviously the transformation $(ru{uri.param,my_domain}) 
>>>>>>> doesn't return the parameter anymore, but it's present in the 
>>>>>>> r-uri. After a restart it works again for some requests, then 
>>>>>>> again stops working.
>>>>>>>
>>>>>>> Any hints?
>>>>>>> Andreas
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Users mailing list
>>>>>>> Users at openser.org
>>>>>>> http://openser.org/cgi-bin/mailman/listinfo/users
>>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> Users at openser.org
>>>>> http://openser.org/cgi-bin/mailman/listinfo/users
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at openser.org
>>>> http://openser.org/cgi-bin/mailman/listinfo/users
>>>>
>>




More information about the sr-users mailing list