]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
URI encode less characters in the RPID and Contact headers.
authorRussell Bryant <russell@russellbryant.com>
Fri, 6 May 2011 19:35:00 +0000 (19:35 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 6 May 2011 19:35:00 +0000 (19:35 +0000)
If this change causes any problems, we will need to backport the more extensive
uri encoding and decoding handling changes that are in trunk/1.10.

(closes issue #18686)
Reported by: wolfgang
Patches:
      quick-and-dirty.patch uploaded by wdoekes (license 717)
Tested by: wdoekes, devellow, wolfgang, mav3rick

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@317861 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 773ebb4873e854d3a534bde9135bbe96d1fcde4d..576df5dc26c072c637b7a407514a5eedb4251367 100644 (file)
@@ -10408,7 +10408,7 @@ static int add_rpid(struct sip_request *req, struct sip_pvt *p)
                lid_name = lid_num;
        fromdomain = S_OR(p->fromdomain, ast_sockaddr_stringify_host(&p->ourip));
 
-       lid_num = ast_uri_encode(lid_num, tmp2, sizeof(tmp2), 1);
+       lid_num = ast_uri_encode(lid_num, tmp2, sizeof(tmp2), 0);
 
        if (ast_test_flag(&p->flags[0], SIP_SENDRPID_PAI)) {
                if ((lid_pres & AST_PRES_RESTRICTION) != AST_PRES_ALLOWED) {
@@ -11379,7 +11379,7 @@ static void extract_uri(struct sip_pvt *p, struct sip_request *req)
 static void build_contact(struct sip_pvt *p)
 {
        char tmp[SIPBUFSIZE];
-       char *user = ast_uri_encode(p->exten, tmp, sizeof(tmp), 1);
+       char *user = ast_uri_encode(p->exten, tmp, sizeof(tmp), 0);
 
        if (p->socket.type == SIP_TRANSPORT_UDP) {
                ast_string_field_build(p, our_contact, "<sip:%s%s%s>", user,