[OpenSIPS-Users] sip_msg_validate()
Bogdan-Andrei Iancu
bogdan at opensips.org
Wed Feb 27 15:33:24 CET 2013
Hi Nick,
Thank you for the patch - once we are over the today release for stable
1.9.0, we will start working on the patches.
Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 02/26/2013 08:26 PM, Nick Altmann wrote:
> The patch adding text pvar in case of negative result.
>
> https://sourceforge.net/tracker/?group_id=232389&atid=1086412
> <https://sourceforge.net/tracker/?group_id=232389&atid=1086412>
>
> --
> Nick
>
>
> 2013/2/26 Bogdan-Andrei Iancu <bogdan at opensips.org
> <mailto:bogdan at opensips.org>>
>
> I would suggest to spit -1 even more... or we can make the
> function to populate a kind of strerror :) - to return in a pvar
> the description of the failure....just exploring here :)
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
>
> On 02/26/2013 05:16 PM, Nick Altmann wrote:
>> Now we have:
>>
>> *
>>
>> /1/ - the message is RFC3261 compliant and has been
>> successfully validated.
>>
>> *
>>
>> /-1/ - the message is not RFC3261 compliant.
>>
>> *
>>
>> /-2/ - signals a parsing error.
>>
>> *
>>
>> /-3/ - invalid SDP body.
>>
>> *
>>
>> /-4/ - invalid headers body.
>>
>> *
>>
>> /-5/ - invalid R-URI.
>>
>> *
>>
>> /-6/ - invalid R-URI domain.
>>
>> *
>>
>> /-255/ - undefined errors.
>>
>> "-1" can be:
>> - message doesn't have callid
>> - message doesn't have Content Length header for proto %d
>> - PATH header supported only for REGISTERs
>> - Cseq not parsed properly
>> - invalid body - content length %ld different then actual body %d
>>
>> Maybe increase log level for "-1" only?
>> But now I think I just can increase debug level before
>> sip_msg_validate() and lower it after. :-)
>>
>> --
>> Nick
>>
>>
>> 2013/2/26 Bogdan-Andrei Iancu <bogdan at opensips.org
>> <mailto:bogdan at opensips.org>>
>>
>> In this case, it means the function has to report something
>> more than -1....like: -1 no MF hdr, -2 missing body, -3
>> missing TO, etc...
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developer
>> http://www.opensips-solutions.com
>>
>>
>> On 02/26/2013 03:32 PM, Nick Altmann wrote:
>>> Bogdan,
>>>
>>> I'm second time deal with problem when I receive "-1" from
>>> script and to understand what is not okay I should compare
>>> message with source code. :-)
>>> Of course I receive and interpret this codes, but "-1" is
>>> not fully informative sometimes. Especially when sdp length
>>> is not okay. :-)
>>>
>>> --
>>> Nick
>>>
>>>
>>> 2013/2/26 Bogdan-Andrei Iancu <bogdan at opensips.org
>>> <mailto:bogdan at opensips.org>>
>>>
>>> Hi Nick,
>>>
>>> Such a change may induce a self-spaming effect on your
>>> logs :). I would rather interpret the return code from
>>> script and let the script writer the decision if he
>>> wants to log that or not...(depending on the failed
>>> check, maybe if local subscriber or not, etc).
>>>
>>> At least these are my 2 cents on the matter :)
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>> OpenSIPS Founder and Developer
>>> http://www.opensips-solutions.com
>>>
>>>
>>> On 02/26/2013 01:01 PM, Nick Altmann wrote:
>>>> Hello!
>>>>
>>>> What about to change DBG messages in sip_msg_validate()
>>>> to ERR or INFO? It will help to understand the reason
>>>> of reject. Especially for -1 return (the message is not
>>>> RFC3261 compliant).
>>>>
>>>> --
>>>> Nick
>>>>
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130227/3601cd9a/attachment.htm>
More information about the Users
mailing list