diff options
author | Jenkins2 <jenkins2@gerrit.asterisk.org> | 2018-02-19 08:54:56 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2018-02-19 08:54:56 -0600 |
commit | f063ea650ede1b6c6f95298619ca7940c23e9d72 (patch) | |
tree | 5c2ab907d542b4376ee99b05ba8f0a1b8053cf97 /res | |
parent | ddc607f85a2a7f0cc8fbde4f30d09510c5e2f2cc (diff) | |
parent | 303e43f8a6eb914d1f8047c91aa022a9aff99ebc (diff) |
Merge "res_pjsip: Use pjsip_sip_uri.user_param instead of other_param"
Diffstat (limited to 'res')
-rw-r--r-- | res/res_pjsip.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/res/res_pjsip.c b/res/res_pjsip.c index 310ff20bc..7b59035c2 100644 --- a/res/res_pjsip.c +++ b/res/res_pjsip.c @@ -3350,8 +3350,6 @@ void ast_sip_add_usereqphone(const struct ast_sip_endpoint *endpoint, pj_pool_t { pjsip_sip_uri *sip_uri; int i = 0; - pjsip_param *param; - static const pj_str_t STR_USER = { "user", 4 }; static const pj_str_t STR_PHONE = { "phone", 5 }; if (!endpoint || !endpoint->usereqphone || (!PJSIP_URI_SCHEME_IS_SIP(uri) && !PJSIP_URI_SCHEME_IS_SIPS(uri))) { @@ -3379,15 +3377,7 @@ void ast_sip_add_usereqphone(const struct ast_sip_endpoint *endpoint, pj_pool_t return; } - if (pjsip_param_find(&sip_uri->other_param, &STR_USER)) { - /* Don't add it if it's already there */ - return; - } - - param = PJ_POOL_ALLOC_T(pool, pjsip_param); - param->name = STR_USER; - param->value = STR_PHONE; - pj_list_insert_before(&sip_uri->other_param, param); + sip_uri->user_param = STR_PHONE; } pjsip_dialog *ast_sip_create_dialog_uac(const struct ast_sip_endpoint *endpoint, |