[SR-Users] '302 Moved temporarily' contact parsing error

Daniel-Constantin Mierla miconda at gmail.com
Wed Oct 14 08:44:04 CEST 2020


Hello,

the Contact header body looks ok, using comma to separate many contact
values is ok.

My guess is that {to.body} transformation is used in this case, it is
not coming from core or a module. The To header cannot appear many
times, thus the transformation is throwing error in this case. If I am
right with my guess, a solution is to plug {s.select,0,,} transformation
before use of {to.body}. The index of s.select can be a variable, in
case one needs to get all contact values, a while loop can be used.

Cheers,
Daniel

On 13.10.20 22:07, Sergiu Pojoga wrote:
> Hmm, it's a tricky one, not sure actually.
>
> https://tools.ietf.org/html/rfc3261#page-167
> <https://tools.ietf.org/html/rfc3261#page-167>
>
> The answer might be in:
> Even if the "display-name" is empty, the "name-addr" form MUST be used if the "addr-spec" contains a comma, semicolon, or question mark.
>
> On Tue, Oct 13, 2020 at 3:39 PM Sergiu Pojoga <pojogas at gmail.com
> <mailto:pojogas at gmail.com>> wrote:
>
>     Aren't the Contact params supposed to be delimited by semicolon?
>
>     On Tue, Oct 13, 2020 at 1:06 PM David VILLAUME
>     <david.villaume at sewan.fr <mailto:david.villaume at sewan.fr>> wrote:
>
>         Hello,
>
>          
>
>         I see parsing errors on 302 contact header that seems
>         compliant to RFC :
>
>          
>
>         Contact:<sip:172.16.0.21:5060>;q=0.5,<sip:172.16.0.22:5060>;q=0.25
>
>          
>
>         <core> [core/parser/parse_addr_spec.c:479]: parse_to_param():
>         invalid character ',' in status 27: [;q=0.5]
>
>          
>
>         Is there an error in my contact or is it truly a parsing error ?
>
>                        
>
>         Regards,
>
>         David
>
>          
>
>         _______________________________________________
>         Kamailio (SER) - Users Mailing List
>         sr-users at lists.kamailio.org <mailto:sr-users at lists.kamailio.org>
>         https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>         <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20201014/7d3dff18/attachment.htm>


More information about the sr-users mailing list