diff options
author | Mark Michelson <mmichelson@digium.com> | 2014-03-25 17:40:51 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2014-03-25 17:40:51 +0000 |
commit | 2bf37a417d7ca529311b56344d56c4a421db3c25 (patch) | |
tree | 91ee86f4f6430251bc44bab4228a3c37c1bd2dbe /res/res_pjsip_messaging.c | |
parent | c1c8300e27060033cab536e0782b8d508bcfbdd5 (diff) |
Add a "message_context" option for PJSIP endpoints.
........
Merged revisions 411157 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip_messaging.c')
-rw-r--r-- | res/res_pjsip_messaging.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/res/res_pjsip_messaging.c b/res/res_pjsip_messaging.c index 0f884aeda..07d207bdb 100644 --- a/res/res_pjsip_messaging.c +++ b/res/res_pjsip_messaging.c @@ -464,13 +464,14 @@ static enum pjsip_status_code rx_data_to_ast_msg(pjsip_rx_data *rdata, struct as const char *field; pjsip_status_code code; struct ast_sip_endpoint *endpt = ast_pjsip_rdata_get_endpoint(rdata); + const char *context = S_OR(endpt->message_context, endpt->context); /* make sure there is an appropriate context and extension*/ - if ((code = get_destination(rdata, endpt->context, buf)) != PJSIP_SC_OK) { + if ((code = get_destination(rdata, context, buf)) != PJSIP_SC_OK) { return code; } - CHECK_RES(ast_msg_set_context(msg, "%s", endpt->context)); + CHECK_RES(ast_msg_set_context(msg, "%s", context)); CHECK_RES(ast_msg_set_exten(msg, "%s", buf)); /* to header */ |