summaryrefslogtreecommitdiff
path: root/res/res_sip_mwi.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2013-07-18 19:25:51 +0000
committerMark Michelson <mmichelson@digium.com>2013-07-18 19:25:51 +0000
commitc47787feab34d9572b41ebe7148c169b52362fbd (patch)
tree85410d3780938b31d9605f6d05cef9a744c3932d /res/res_sip_mwi.c
parent3c86832f9f271c8d479cf956155424fda512c76b (diff)
Add a bunch of options from sip.conf to res_sip.conf
For a complete list of the options added, see the review linked at the bottom of this commit message. (closes issue ASTERISK-21506) reported by Matt Jordan Review: https://reviewboard.asterisk.org/r/2671 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_sip_mwi.c')
-rw-r--r--res/res_sip_mwi.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/res/res_sip_mwi.c b/res/res_sip_mwi.c
index f18e56469..cb636dbbb 100644
--- a/res/res_sip_mwi.c
+++ b/res/res_sip_mwi.c
@@ -281,6 +281,14 @@ static int send_unsolicited_mwi_notify_to_contact(void *obj, void *arg, int flag
return 0;
}
+ if (!ast_strlen_zero(endpoint->mwi_from)) {
+ pjsip_fromto_hdr *from = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_FROM, NULL);
+ pjsip_name_addr *from_name_addr = (pjsip_name_addr *) from->uri;
+ pjsip_sip_uri *from_uri = pjsip_uri_get_uri(from_name_addr->uri);
+
+ pj_strdup2(tdata->pool, &from_uri->user, endpoint->mwi_from);
+ }
+
switch (state) {
case PJSIP_EVSUB_STATE_ACTIVE:
state_name = "active";