[asterisk-commits] russell: branch 1.6.1 r202503 - in /branches/1.6.1: ./ main/channel.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jun 22 15:18:06 CDT 2009
Author: russell
Date: Mon Jun 22 15:18:02 2009
New Revision: 202503
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=202503
Log:
Merged revisions 202497 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r202497 | russell | 2009-06-22 15:11:04 -0500 (Mon, 22 Jun 2009) | 11 lines
Merged revisions 202496 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r202496 | russell | 2009-06-22 15:08:53 -0500 (Mon, 22 Jun 2009) | 4 lines
Report CallerID change during a masquerade.
Reported by: markster
........
................
Modified:
branches/1.6.1/ (props changed)
branches/1.6.1/main/channel.c
Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.1/main/channel.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.1/main/channel.c?view=diff&rev=202503&r1=202502&r2=202503
==============================================================================
--- branches/1.6.1/main/channel.c (original)
+++ branches/1.6.1/main/channel.c Mon Jun 22 15:18:02 2009
@@ -4225,6 +4225,26 @@
}
/*!
+ * \pre chan is locked
+ */
+static void report_new_callerid(const struct ast_channel *chan)
+{
+ manager_event(EVENT_FLAG_CALL, "NewCallerid",
+ "Channel: %s\r\n"
+ "CallerIDNum: %s\r\n"
+ "CallerIDName: %s\r\n"
+ "Uniqueid: %s\r\n"
+ "CID-CallingPres: %d (%s)\r\n",
+ chan->name,
+ S_OR(chan->cid.cid_num, ""),
+ S_OR(chan->cid.cid_name, ""),
+ chan->uniqueid,
+ chan->cid.cid_pres,
+ ast_describe_caller_presentation(chan->cid.cid_pres)
+ );
+}
+
+/*!
\brief Masquerade a channel
\note Assumes channel will be locked when called
@@ -4427,6 +4447,7 @@
tmpcid = original->cid;
original->cid = clonechan->cid;
clonechan->cid = tmpcid;
+ report_new_callerid(original);
/* Restore original timing file descriptor */
ast_channel_set_fd(original, AST_TIMING_FD, original->timingfd);
@@ -4524,20 +4545,9 @@
ast_free(chan->cid.cid_ani);
chan->cid.cid_ani = ast_strdup(cid_ani);
}
- manager_event(EVENT_FLAG_CALL, "NewCallerid",
- "Channel: %s\r\n"
- "CallerIDNum: %s\r\n"
- "CallerIDName: %s\r\n"
- "Uniqueid: %s\r\n"
- "CID-CallingPres: %d (%s)\r\n",
- chan->name,
- S_OR(chan->cid.cid_num, ""),
- S_OR(chan->cid.cid_name, ""),
- chan->uniqueid,
- chan->cid.cid_pres,
- ast_describe_caller_presentation(chan->cid.cid_pres)
- );
-
+
+ report_new_callerid(chan);
+
ast_channel_unlock(chan);
}
More information about the asterisk-commits
mailing list