[asterisk-commits] seanbright: branch seanbright/issue13827-1.4 r168535 - /team/seanbright/issue...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jan 12 21:30:14 CST 2009


Author: seanbright
Date: Mon Jan 12 21:30:14 2009
New Revision: 168535

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=168535
Log:
It's nice when things work.

Modified:
    team/seanbright/issue13827-1.4/channels/chan_sip.c

Modified: team/seanbright/issue13827-1.4/channels/chan_sip.c
URL: http://svn.digium.com/svn-view/asterisk/team/seanbright/issue13827-1.4/channels/chan_sip.c?view=diff&rev=168535&r1=168534&r2=168535
==============================================================================
--- team/seanbright/issue13827-1.4/channels/chan_sip.c (original)
+++ team/seanbright/issue13827-1.4/channels/chan_sip.c Mon Jan 12 21:30:14 2009
@@ -7462,8 +7462,8 @@
 		ast_build_string(&t, &maxbytes, "<?xml version=\"1.0\"?>\n");
 		ast_build_string(&t, &maxbytes, "<dialog-info xmlns=\"urn:ietf:params:xml:ns:dialog-info\" version=\"%d\" state=\"%s\" entity=\"%s\">\n", p->dialogver++, full ? "full" : "partial", mto);
 		if ((state & AST_EXTENSION_RINGING) && global_notifyringing) {
-			const char *local_display = p->exten, *local_target = mto;
-
+			const char *local_display = p->exten;
+			char *local_target = mto;
 			/* There are some limitations to how this works.  The primary one is that the
 			   callee must be dialing the same extension that is being monitored.  Simply dialing
 			   the hint'd device is not sufficient. */
@@ -7471,8 +7471,10 @@
 				struct ast_channel *caller = ast_channel_search_locked(find_calling_channel, p);
 
 				if (caller) {
+					int need = strlen(caller->cid.cid_num) + strlen(p->fromdomain) + sizeof("sip:@");
+					local_target = alloca(need);
+					snprintf(local_target, need, "sip:%s@%s", caller->cid.cid_num, p->fromdomain);
 					local_display = ast_strdupa(caller->cid.cid_name);
-					local_target = ast_strdupa(caller->cid.cid_num);
 					ast_channel_unlock(caller);
 					caller = NULL;
 				}




More information about the asterisk-commits mailing list