diff options
author | Jonathan Rose <jrose@digium.com> | 2013-03-08 20:26:03 +0000 |
---|---|---|
committer | Jonathan Rose <jrose@digium.com> | 2013-03-08 20:26:03 +0000 |
commit | b4a010e958226d21750a5a1797bf50f22898e974 (patch) | |
tree | 61bd1e328121609b93fd96ae1a29b71a6d12470b | |
parent | 91eba7dc1371609c1915cd96fdc24c37b79ea19e (diff) |
chan_sip: Update the via header when relaying SMS MESSAGE
Prior to this change, certain conditions for sending the message would
result in an address of '(null)' being used in the via header of the
SIP message because a NULl value of pvt->ourip was used when initially
generating the via header. This is fixed by adding a call to build_via
when the address is set before sending the message.
(closes issue ASTERISK-21148)
Reported by: Zhi Cheng
Patches:
700-sip_msg_send_via_fix.patch uploaded by Zhi Cheng (license 6475)
........
Merged revisions 382739 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | channels/chan_sip.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index c1b4bd328..40f44ebab 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -27081,6 +27081,7 @@ static int sip_msg_send(const struct ast_msg *msg, const char *to, const char *f ast_string_field_set(pvt, username, to_user); } ast_sip_ouraddrfor(&pvt->sa, &pvt->ourip, pvt); + build_via(pvt); ast_set_flag(&pvt->flags[0], SIP_OUTGOING); /* XXX Does pvt->expiry need to be set? */ |