From: zuul Date: Wed, 14 Sep 2016 17:54:24 +0000 (-0500) Subject: Merge "res_pjsip: Add ignore_uri_user_options option." into 13 X-Git-Tag: 13.12.0-rc1~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5f7b07579093c22e5b2397451b46c5073d09810;p=thirdparty%2Fasterisk.git Merge "res_pjsip: Add ignore_uri_user_options option." into 13 --- a5f7b07579093c22e5b2397451b46c5073d09810 diff --cc res/res_pjsip_messaging.c index a3cc8afcf8,07869052de..835a383939 --- a/res/res_pjsip_messaging.c +++ b/res/res_pjsip_messaging.c @@@ -127,11 -128,17 +127,17 @@@ static struct ast_sip_endpoint *get_out /* attempt to extract the endpoint name */ if ((aor_uri = strchr(name, '/'))) { - /* format was 'endpoint/' */ + /* format was 'endpoint/(aor_name | uri)' */ *aor_uri++ = '\0'; } else if ((aor_uri = strchr(name, '@'))) { - /* format was 'endpoint@' - don't use the rest */ + /* format was 'endpoint@domain' - discard the domain */ *aor_uri = '\0'; + + /* + * We may want to match without any user options getting + * in the way. + */ + AST_SIP_USER_OPTIONS_TRUNCATE_CHECK(name); } /* at this point, if name is not empty then it @@@ -545,9 -538,9 +557,9 @@@ static void msg_data_destroy(void *obj ast_msg_destroy(mdata->msg); } -static struct msg_data* msg_data_create(const struct ast_msg *msg, const char *to, const char *from) +static struct msg_data *msg_data_create(const struct ast_msg *msg, const char *to, const char *from) { - char *tag; + char *uri_params; struct msg_data *mdata = ao2_alloc(sizeof(*mdata), msg_data_destroy); if (!mdata) {