summaryrefslogtreecommitdiff
path: root/res/res_pjsip_mwi.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2014-06-12 11:34:36 +0000
committerJoshua Colp <jcolp@digium.com>2014-06-12 11:34:36 +0000
commit58f4c18ab692ad0c43d9cb4418fc2b680bb17b80 (patch)
treed718320702c43bf77a048defeab91d1cc9c8e1c8 /res/res_pjsip_mwi.c
parent3b0ad74e1741c78afbab229cb38965280744f76d (diff)
res_pjsip_pubsub: Persist subscriptions in sorcery so they are recreated on startup.
This change makes res_pjsip_pubsub persist inbound subscriptions in sorcery. By default this uses the local astdb but it can also be configured to store within an outside database. When Asterisk is started these subscriptions are recreated if they have not expired. Notifications are sent to the devices which have subscribed and they are none the wiser that the system has restarted. Review: https://reviewboard.asterisk.org/r/3598/ ........ Merged revisions 415766 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@415767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip_mwi.c')
-rw-r--r--res/res_pjsip_mwi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/res/res_pjsip_mwi.c b/res/res_pjsip_mwi.c
index 6e45ded33..f25a7c48f 100644
--- a/res/res_pjsip_mwi.c
+++ b/res/res_pjsip_mwi.c
@@ -699,7 +699,6 @@ static struct ast_sip_subscription *mwi_new_subscribe(struct ast_sip_endpoint *e
RAII_VAR(struct mwi_subscription *, sub, NULL, ao2_cleanup);
pjsip_uri *ruri = rdata->msg_info.msg->line.req.uri;
pjsip_sip_uri *sip_ruri;
- pjsip_evsub *evsub;
char aor_name[80];
if (!PJSIP_URI_SCHEME_IS_SIP(ruri) && !PJSIP_URI_SCHEME_IS_SIPS(ruri)) {
@@ -715,8 +714,7 @@ static struct ast_sip_subscription *mwi_new_subscribe(struct ast_sip_endpoint *e
return NULL;
}
- evsub = ast_sip_subscription_get_evsub(sub->sip_sub);
- pjsip_evsub_accept(evsub, rdata, 200, NULL);
+ ast_sip_subscription_accept(sub->sip_sub, rdata, 200);
send_mwi_notify(sub, PJSIP_EVSUB_STATE_ACTIVE, NULL);
return sub->sip_sub;