diff options
author | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-19 05:00:39 +0000 |
---|---|---|
committer | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-19 05:00:39 +0000 |
commit | 73c599f3cee45b3225ecf5ab92dc05307c84d2de (patch) | |
tree | 1e7ea8e13aea35728468fa71c1a30a8fefebe1af /channels | |
parent | 2a1596958dda6e8924384acf32488eceec9d05ef (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@8247 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 24872fe48..b5b5ae148 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -5200,13 +5200,14 @@ static int transmit_notify_with_mwi(struct sip_pvt *p, int newmsgs, int oldmsgs, char tmp[500]; char *t = tmp; size_t maxbytes = sizeof(tmp); + char iabuf[INET_ADDRSTRLEN]; initreqprep(&req, p, SIP_NOTIFY); add_header(&req, "Event", "message-summary"); add_header(&req, "Content-Type", default_notifymime); ast_build_string(&t, &maxbytes, "Messages-Waiting: %s\r\n", newmsgs ? "yes" : "no"); - ast_build_string(&t, &maxbytes, "Message-Account: sip:%s@%s\r\n", !ast_strlen_zero(vmexten) ? vmexten : global_vmexten, p->fromdomain); + ast_build_string(&t, &maxbytes, "Message-Account: sip:%s@%s\r\n", !ast_strlen_zero(vmexten) ? vmexten : global_vmexten, ast_strlen_zero(p->fromdomain) ? ast_inet_ntoa(iabuf, sizeof(iabuf), p->ourip) : p->fromdomain); ast_build_string(&t, &maxbytes, "Voice-Message: %d/%d (0/0)\r\n", newmsgs, oldmsgs); if (t > tmp + sizeof(tmp)) |