[asterisk-commits] kaii: branch kaii/1.8-multicall r365572 - in /team/kaii/1.8-multicall: ./ app...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue May 8 04:45:52 CDT 2012
Author: kaii
Date: Tue May 8 04:45:47 2012
New Revision: 365572
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=365572
Log:
changed __ast_request_and_dial() so originated calls send the called partys number as CLID to the originator instead of CLID "asterisk"
Modified:
team/kaii/1.8-multicall/.version
team/kaii/1.8-multicall/ChangeLog
team/kaii/1.8-multicall/apps/app_parkandannounce.c
team/kaii/1.8-multicall/include/asterisk/channel.h
team/kaii/1.8-multicall/main/ccss.c
team/kaii/1.8-multicall/main/channel.c
team/kaii/1.8-multicall/main/pbx.c
Modified: team/kaii/1.8-multicall/.version
URL: http://svnview.digium.com/svn/asterisk/team/kaii/1.8-multicall/.version?view=diff&rev=365572&r1=365571&r2=365572
==============================================================================
--- team/kaii/1.8-multicall/.version (original)
+++ team/kaii/1.8-multicall/.version Tue May 8 04:45:47 2012
@@ -1,1 +1,1 @@
-1.8.11.0-multicall-k3
+1.8.11.0-multicall-k4
Modified: team/kaii/1.8-multicall/ChangeLog
URL: http://svnview.digium.com/svn/asterisk/team/kaii/1.8-multicall/ChangeLog?view=diff&rev=365572&r1=365571&r2=365572
==============================================================================
--- team/kaii/1.8-multicall/ChangeLog (original)
+++ team/kaii/1.8-multicall/ChangeLog Tue May 8 04:45:47 2012
@@ -1,3 +1,11 @@
+2012-05-08 Kai Hoerner <kh at ciphron.de>
+
+ * /main/channel.c, /main/pbx.c, /main/ccss.c,
+ /include/asterisk/channel.h, /apps/app_parkandannounce.c:
+ changed __ast_request_and_dial() so originated calls send the
+ called partys number as CLID to the originator instead of
+ CLID "asterisk".
+
2012-03-29 Asterisk Development Team <asteriskteam at digium.com>
* Asterisk 1.8.11.0 Released.
Modified: team/kaii/1.8-multicall/apps/app_parkandannounce.c
URL: http://svnview.digium.com/svn/asterisk/team/kaii/1.8-multicall/apps/app_parkandannounce.c?view=diff&rev=365572&r1=365571&r2=365572
==============================================================================
--- team/kaii/1.8-multicall/apps/app_parkandannounce.c (original)
+++ team/kaii/1.8-multicall/apps/app_parkandannounce.c Tue May 8 04:45:47 2012
@@ -167,7 +167,10 @@
&outstate,
S_COR(caller_id.number.valid, caller_id.number.str, NULL),
S_COR(caller_id.name.valid, caller_id.name.str, NULL),
- &oh);
+ &oh,
+ S_COR(caller_id.number.valid, caller_id.number.str, NULL),
+ S_COR(caller_id.name.valid, caller_id.name.str, NULL)
+ );
ast_variables_destroy(oh.vars);
ast_party_id_free(&caller_id);
if (dchan) {
Modified: team/kaii/1.8-multicall/include/asterisk/channel.h
URL: http://svnview.digium.com/svn/asterisk/team/kaii/1.8-multicall/include/asterisk/channel.h?view=diff&rev=365572&r1=365571&r2=365572
==============================================================================
--- team/kaii/1.8-multicall/include/asterisk/channel.h (original)
+++ team/kaii/1.8-multicall/include/asterisk/channel.h Tue May 8 04:45:47 2012
@@ -1321,14 +1321,18 @@
* \param data data to pass to the channel requester
* \param timeout maximum amount of time to wait for an answer
* \param reason why unsuccessful (if unsuccessful)
- * \param cid_num Caller-ID Number
- * \param cid_name Caller-ID Name (ascii)
+ * \param cid_num Caller-ID Number sent to the target / calle
+ * \param cid_name Caller-ID Name (ascii) sent to the target / callee
+ * \param called_num Caller-ID Number sent to the originator / caller
+ * \param called_name Caller-ID Name (ascii) sent to the originator / caller
*
* \return Returns an ast_channel on success or no answer, NULL on failure. Check the value of chan->_state
* to know if the call was answered or not.
*/
struct ast_channel *ast_request_and_dial(const char *type, format_t format, const struct ast_channel *requestor, void *data,
- int timeout, int *reason, const char *cid_num, const char *cid_name);
+ int timeout, int *reason, const char *cid_num, const char *cid_name,
+ const char *called_num, const char *called_name);
+
/*!
* \brief Request a channel of a given type, with data as optional information used
@@ -1339,14 +1343,17 @@
* \param data data to pass to the channel requester
* \param timeout maximum amount of time to wait for an answer
* \param reason why unsuccessful (if unsuccessful)
- * \param cid_num Caller-ID Number
- * \param cid_name Caller-ID Name (ascii)
+ * \param cid_num Caller-ID Number sent to the target / calle
+ * \param cid_name Caller-ID Name (ascii) sent to the target / callee
* \param oh Outgoing helper
+ * \param called_num Caller-ID Number sent to the originator / caller
+ * \param called_name Caller-ID Name (ascii) sent to the originator / caller
* \return Returns an ast_channel on success or no answer, NULL on failure. Check the value of chan->_state
* to know if the call was answered or not.
*/
struct ast_channel *__ast_request_and_dial(const char *type, format_t format, const struct ast_channel *requestor, void *data,
- int timeout, int *reason, const char *cid_num, const char *cid_name, struct outgoing_helper *oh);
+ int timeout, int *reason, const char *cid_num, const char *cid_name, struct outgoing_helper *oh,
+ const char *called_num, const char *called_name);
/*!
* \brief Forwards a call to a new channel specified by the original channel's call_forward str. If possible, the new forwarded channel is created and returned while the original one is terminated.
Modified: team/kaii/1.8-multicall/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/kaii/1.8-multicall/main/ccss.c?view=diff&rev=365572&r1=365571&r2=365572
==============================================================================
--- team/kaii/1.8-multicall/main/ccss.c (original)
+++ team/kaii/1.8-multicall/main/ccss.c Tue May 8 04:45:47 2012
@@ -2551,7 +2551,7 @@
if ((target = strchr(interface, '/'))) {
*target++ = '\0';
}
- if (!(chan = ast_request_and_dial(tech, AST_FORMAT_SLINEAR, NULL, target, recall_timer, &reason, generic_pvt->cid_num, generic_pvt->cid_name))) {
+ if (!(chan = ast_request_and_dial(tech, AST_FORMAT_SLINEAR, NULL, target, recall_timer, &reason, generic_pvt->cid_num, generic_pvt->cid_name, generic_pvt->cid_num, generic_pvt->cid_name))) {
/* Hmm, no channel. Sucks for you, bud.
*/
ast_log_dynamic_level(cc_logger_level, "Core %d: Failed to call back %s for reason %d\n",
Modified: team/kaii/1.8-multicall/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/kaii/1.8-multicall/main/channel.c?view=diff&rev=365572&r1=365571&r2=365572
==============================================================================
--- team/kaii/1.8-multicall/main/channel.c (original)
+++ team/kaii/1.8-multicall/main/channel.c Tue May 8 04:45:47 2012
@@ -5306,7 +5306,7 @@
return new_chan;
}
-struct ast_channel *__ast_request_and_dial(const char *type, format_t format, const struct ast_channel *requestor, void *data, int timeout, int *outstate, const char *cid_num, const char *cid_name, struct outgoing_helper *oh)
+struct ast_channel *__ast_request_and_dial(const char *type, format_t format, const struct ast_channel *requestor, void *data, int timeout, int *outstate, const char *cid_num, const char *cid_name, struct outgoing_helper *oh, const char *called_num, const char *called_name)
{
int dummy_outstate;
int cause = 0;
@@ -5366,17 +5366,20 @@
ast_set_flag(chan->cdr, AST_CDR_FLAG_ORIGINATED);
ast_party_connected_line_set_init(&connected, &chan->connected);
- if (cid_num) {
+ if (called_num) {
connected.id.number.valid = 1;
- connected.id.number.str = (char *) cid_num;
+ connected.id.number.str = (char *) called_num; // XXX KH
connected.id.number.presentation = AST_PRES_ALLOWED_USER_NUMBER_NOT_SCREENED;
}
- if (cid_name) {
+ if (called_name) {
connected.id.name.valid = 1;
- connected.id.name.str = (char *) cid_name;
+ connected.id.name.str = (char *) called_name; // XXX KH
connected.id.name.presentation = AST_PRES_ALLOWED_USER_NUMBER_NOT_SCREENED;
}
ast_channel_set_connected_line(chan, &connected, NULL);
+
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Originate: setting CLID to \"%s\" <%s> and COLP to \"%s\" <%s> on channel %s\n", cid_name, cid_num, called_name, called_num, chan->name);
if (ast_call(chan, data, 0)) { /* ast_call failed... */
ast_log(LOG_NOTICE, "Unable to call channel %s/%s\n", type, (char *)data);
@@ -5499,9 +5502,9 @@
return chan;
}
-struct ast_channel *ast_request_and_dial(const char *type, format_t format, const struct ast_channel *requestor, void *data, int timeout, int *outstate, const char *cidnum, const char *cidname)
-{
- return __ast_request_and_dial(type, format, requestor, data, timeout, outstate, cidnum, cidname, NULL);
+struct ast_channel *ast_request_and_dial(const char *type, format_t format, const struct ast_channel *requestor, void *data, int timeout, int *outstate, const char *cidnum, const char *cidname, const char *called_num, const char *called_name)
+{
+ return __ast_request_and_dial(type, format, requestor, data, timeout, outstate, cidnum, cidname, NULL, called_num, called_name);
}
static int set_security_requirements(const struct ast_channel *requestor, struct ast_channel *out)
Modified: team/kaii/1.8-multicall/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/team/kaii/1.8-multicall/main/pbx.c?view=diff&rev=365572&r1=365571&r2=365572
==============================================================================
--- team/kaii/1.8-multicall/main/pbx.c (original)
+++ team/kaii/1.8-multicall/main/pbx.c Tue May 8 04:45:47 2012
@@ -8793,7 +8793,7 @@
oh.vars = vars;
oh.parent_channel = NULL;
- chan = __ast_request_and_dial(type, format, NULL, data, timeout, reason, cid_num, cid_name, &oh);
+ chan = __ast_request_and_dial(type, format, NULL, data, timeout, reason, cid_num, cid_name, &oh, exten, ""); // XXX KH
if (channel) {
*channel = chan;
if (chan)
@@ -8883,7 +8883,7 @@
res = -1;
goto outgoing_exten_cleanup;
}
- chan = ast_request_and_dial(type, format, NULL, data, timeout, reason, cid_num, cid_name);
+ chan = ast_request_and_dial(type, format, NULL, data, timeout, reason, cid_num, cid_name, exten, "");
if (channel) {
*channel = chan;
if (chan)
@@ -8963,7 +8963,7 @@
goto outgoing_app_cleanup;
}
if (synchronous) {
- chan = __ast_request_and_dial(type, format, NULL, data, timeout, reason, cid_num, cid_name, &oh);
+ chan = __ast_request_and_dial(type, format, NULL, data, timeout, reason, cid_num, cid_name, &oh, cid_num, cid_name);
if (chan) {
ast_set_variables(chan, vars);
if (account)
@@ -9031,7 +9031,7 @@
res = -1;
goto outgoing_app_cleanup;
}
- chan = __ast_request_and_dial(type, format, NULL, data, timeout, reason, cid_num, cid_name, &oh);
+ chan = __ast_request_and_dial(type, format, NULL, data, timeout, reason, cid_num, cid_name, &oh, cid_num, cid_name);
if (!chan) {
ast_free(as);
res = -1;
More information about the asterisk-commits
mailing list