[svn-commits] trunk - r8243 in /trunk: ./ channels/chan_sip.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed Jan 18 21:58:45 MST 2006


Author: russell
Date: Wed Jan 18 22:58:43 2006
New Revision: 8243

URL: http://svn.digium.com/view/asterisk?rev=8243&view=rev
Log:
Merged revisions 8242 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8242 | russell | 2006-01-18 23:56:48 -0500 (Wed, 18 Jan 2006) | 3 lines

fix Message-Account header to use the ip address if the fromdomain 
isn't set (issue #6278)

........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=8243&r1=8242&r2=8243&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Jan 18 22:58:43 2006
@@ -5192,13 +5192,14 @@
 	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))



More information about the svn-commits mailing list