From: Russell Bryant Date: Fri, 6 May 2011 19:35:00 +0000 (+0000) Subject: URI encode less characters in the RPID and Contact headers. X-Git-Tag: 1.8.5-rc1~11^2~143 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25ccc62ee9f5e526ea921f150f7e9d85d4ab7775;p=thirdparty%2Fasterisk.git URI encode less characters in the RPID and Contact headers. 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 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 773ebb4873..576df5dc26 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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, "", user,