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

Daniel-Constantin Mierla miconda at gmail.com
Wed Oct 14 09:54:11 CEST 2020


Hello,

but do you have reply_route or onreply_route[x] where you access the
contact with a transformation? Can you give here those lines from your
config accessing the contact header?

parse_to_param() is not used by core Contact header parser, thus that
can happen only on some config operations...

Cheers,
Daniel

On 14.10.20 09:41, David VILLAUME wrote:
>
> Hi Daniel,
>
>  
>
> I already use the select for getting the contact, but I still got the
> error as it happens before the fist line of my failure_route :
>
>  
>
> Oct 14 09:32:53 fr-kam-misc-lab-vma-1 kamailio[21633]: ERROR: { 2  udp
> 172.18.0.15 17 REGISTER # 8_466109112 at 10.244.3.114
> <mailto:8_466109112 at 10.244.3.114> * } <core>
> [core/parser/parse_addr_spec.c:479]: parse_to_param(): invalid
> character ',' in status 27: [;q=0.5]
>
> Oct 14 09:32:53 fr-kam-misc-lab-vma-1 kamailio[21633]: INFO: { 1  tcp
> 65.39.65.250 17 REGISTER # 8_466109112 at 10.244.3.114
> <mailto:8_466109112 at 10.244.3.114> * } <script>: first line of failure
> route
>
>  
>
>  
>
>  
>
> Regards,
>
> David
>
>  
>
> *From:* sr-users <sr-users-bounces at lists.kamailio.org> *On Behalf Of
> *Daniel-Constantin Mierla
> *Sent:* Wednesday, October 14, 2020 8:44 AM
> *To:* Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
> *Subject:* Re: [SR-Users] '302 Moved temporarily' contact parsing error
>
>  
>
> 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
>             <sip:172.16.0.21:5060>>;q=0.5,<sip:172.16.0.22:5060
>             <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 <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>
>
> -- 
> Daniel-Constantin Mierla -- www.asipto.com <http://www.asipto.com>
> www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
> Funding: https://www.paypal.me/dcmierla <https://www.paypal.me/dcmierla>

-- 
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/88614bd3/attachment.htm>


More information about the sr-users mailing list