[Home]

Summary:ASTERISK-20023: double uri_escaping of contact in outbound invite
Reporter:Walter Doekes (wdoekes)Labels:
Date Opened:2012-06-19 05:57:27Date Closed:2012-07-12 13:57:20
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:1.8.13.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:In:
{noformat}
static void initreqprep(struct sip_request *req, struct sip_pvt *p, int sipmethod, const char * const explicit_uri)
{noformat}
there's this:
{noformat}
       const char *l = NULL; /* will hold user-part */
...
       if (sip_cfg.pedanticsipchecking) {
               ast_escape_quoted(n, tmp_n, sizeof(tmp_n));
               n = tmp_n;
               ast_uri_encode(l, tmp_l, sizeof(tmp_l), 0);
               l = tmp_l;
       }
...
       ast_string_field_set(p, exten, l);
       build_contact(p);
       add_header(req, "Contact", p->our_contact);
{noformat}
and in build_contact, we have this:
{noformat}
       char *user = ast_uri_encode(p->exten, tmp, sizeof(tmp), 0);
{noformat}
That looks a bit double to me.

Regards,
Walter
Comments: