[Kamailio-Users] sanity_check question

Daniel-Constantin Mierla miconda at gmail.com
Mon Jul 20 17:06:07 CEST 2009


Hello,

there was a wrong return code check for r-uri parsing, causing the 
warning to be printed even r-uri was ok. Should be fixed in svn. Please 
try again and let me know if ok now.

Thanks,
Daniel

On 20.07.2009 13:55 Uhr, Dubravko Caric wrote:
> Hi all,
>
> I have a question regarding sanity module (kamailio 1.5.1). Module documentation says "The function returns true if one of the checks failed", but as you can see in case 1 (request is valid) and case 2 (request is not valid because bad request uri) requests always enter function block.
>
> Does anybody else have the same problem? Any help would be appreciated... 
>
> Thanks a lot
>
> /dubravko
>
>
> *Case 1:*
> if (is_method("REGISTER")) {
> xlog("L_INFO", "ENTER REGISTER\n");         
> if (sanity_check("128","6")) {
> xlog("L_NOTICE", "SANITY $si:$sp TIME $Tf USER $fu METHOD $rm\n");
> exit;
> }
> }
>
> ENTER REGISTER
> Jul 20 13:30:13 [8180] DBG:core:parse_headers: flags=2000
> Jul 20 13:30:13 [8180] DBG:core:get_hdr_field: cseq <CSeq>: <1> <REGISTER>
> Jul 20 13:30:13 [8180] DBG:core:get_hdr_field: content_length=0
> Jul 20 13:30:13 [8180] DBG:core:parse_headers: flags=ffffffffffffffff
> Jul 20 13:30:13 [8180] DBG:core:get_hdr_field: found end of header
> Jul 20 13:30:13 [8180] DBG:sanity:sanity_check: all sanity checks passed
> SANITY xxx.xxx.xxx.xxx:22355 TIME Mon Jul 20 13:30:13 2009 USER sip:bob at exmaple.com METHOD REGISTER
> Jul 20 13:30:13 [8180] DBG:core:destroy_avp_list: destroying list (nil)
> Jul 20 13:30:13 [8180] DBG:core:receive_msg: cleaning up
>
> *Case 2:*
> ...
> if (sanity_check("130","6")) {
> ...
>
> ENTER REGISTER
> Jul 20 13:34:06 [8226] WARNING:sanity:check_ruri_scheme: failed to parse request uri
> Jul 20 13:34:06 [8226] DBG:core:parse_headers: flags=2000
> Jul 20 13:34:06 [8226] DBG:core:get_hdr_field: cseq <CSeq>: <1> <REGISTER>
> Jul 20 13:34:06 [8226] DBG:core:get_hdr_field: content_length=0
> Jul 20 13:34:06 [8226] DBG:core:parse_headers: flags=ffffffffffffffff
> Jul 20 13:34:06 [8226] DBG:core:get_hdr_field: found end of header
> Jul 20 13:34:06 [8226] 
> SANITY xxx.xxx.xxx.xxx:22359 TIME Mon Jul 20 13:34:06 2009 USER sip:bob at exmaple.com METHOD REGISTER
> Jul 20 13:34:06 [8226] DBG:core:destroy_avp_list: destroying list (nil)
> Jul 20 13:34:06 [8226] DBG:core:receive_msg: cleaning up
>
>
>
>       
>
> _______________________________________________
> Kamailio (OpenSER) - Users mailing list
> Users at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>
>   

-- 
Daniel-Constantin Mierla
http://www.asipto.com/index.php/sip-router-bootcamp/




More information about the Users mailing list