[Pkg-voip-commits] r5776 - in /asterisk/trunk/debian/patches/bristuff: uniqueid-10-channel-ops-uniqueid uniqueid-30-app-chanspy uniqueid-40-manager
tzafrir-guest at alioth.debian.org
tzafrir-guest at alioth.debian.org
Sun May 25 11:42:33 UTC 2008
Author: tzafrir-guest
Date: Sun May 25 11:42:30 2008
New Revision: 5776
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=5776
Log:
Further reduce uniqueid API breakage: make all function changes extra
*_uniqueid functions with original functions wrappers.
Modified:
asterisk/trunk/debian/patches/bristuff/uniqueid-10-channel-ops-uniqueid
asterisk/trunk/debian/patches/bristuff/uniqueid-30-app-chanspy
asterisk/trunk/debian/patches/bristuff/uniqueid-40-manager
Modified: asterisk/trunk/debian/patches/bristuff/uniqueid-10-channel-ops-uniqueid
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/bristuff/uniqueid-10-channel-ops-uniqueid?rev=5776&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/bristuff/uniqueid-10-channel-ops-uniqueid (original)
+++ asterisk/trunk/debian/patches/bristuff/uniqueid-10-channel-ops-uniqueid Sun May 25 11:42:30 2008
@@ -1,7 +1,7 @@
Add or convert channel operations so they can use the unique ID.
---- a/include/asterisk/channel.h
-+++ b/include/asterisk/channel.h
+--- asterisk.orig/include/asterisk/channel.h
++++ asterisk/include/asterisk/channel.h
@@ -677,6 +677,18 @@ void ast_channel_free(struct ast_channe
*/
struct ast_channel *ast_request(const char *type, int format, void *data, int *status);
@@ -21,19 +21,20 @@
/*!
* \brief Request a channel of a given type, with data as optional information used
* by the low level module and attempt to place a call on it
-@@ -690,9 +702,9 @@ struct ast_channel *ast_request(const ch
- * \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.
+@@ -692,8 +704,12 @@ struct ast_channel *ast_request(const ch
*/
--struct ast_channel *ast_request_and_dial(const char *type, int format, void *data, int timeout, int *reason, const char *cidnum, const char *cidname);
-+struct ast_channel *ast_request_and_dial(const char *type, int format, void *data, int timeout, int *reason, int callingpres, const char *cidnum, const char *cidname, char *uniqueid);
-
--struct ast_channel *__ast_request_and_dial(const char *type, int format, void *data, int timeout, int *reason, const char *cidnum, const char *cidname, struct outgoing_helper *oh);
-+struct ast_channel *__ast_request_and_dial(const char *type, int format, void *data, int timeout, int *reason, int callingpres, const char *cidnum, const char *cidname, struct outgoing_helper *oh, char *uniqueid);
-
+ struct ast_channel *ast_request_and_dial(const char *type, int format, void *data, int timeout, int *reason, const char *cidnum, const char *cidname);
+
++struct ast_channel *ast_request_and_dial_uniqueid(const char *type, int format, void *data, int timeout, int *reason, int callingpres, const char *cidnum, const char *cidname, char *uniqueid);
++
+ struct ast_channel *__ast_request_and_dial(const char *type, int format, void *data, int timeout, int *reason, const char *cidnum, const char *cidname, struct outgoing_helper *oh);
+
++struct ast_channel *__ast_request_and_dial_uniqueid(const char *type, int format, void *data, int timeout, int *reason, int callingpres, const char *cidnum, const char *cidname, struct outgoing_helper *oh, char *uniqueid);
++
/*! \brief "Requests" a channel for sending a message
* \param type type of channel to request
-@@ -977,6 +989,8 @@ struct ast_channel *ast_get_channel_by_e
+ * \param data data to pass to the channel requester
+@@ -977,6 +993,8 @@ struct ast_channel *ast_get_channel_by_e
/*! \brief Get next channel by exten (and optionally context) and lock it */
struct ast_channel *ast_walk_channel_by_exten_locked(const struct ast_channel *chan, const char *exten,
const char *context);
@@ -42,8 +43,8 @@
/*! ! \brief Waits for a digit
* \param c channel to wait for a digit on
---- a/main/channel.c
-+++ b/main/channel.c
+--- asterisk.orig/main/channel.c
++++ asterisk/main/channel.c
@@ -1017,7 +1017,7 @@ void ast_channel_undefer_dtmf(struct ast
*/
static struct ast_channel *channel_find_locked(const struct ast_channel *prev,
@@ -129,16 +130,20 @@
ast_copy_string(name, chan->name, sizeof(name));
-@@ -2821,7 +2831,7 @@ char *ast_channel_reason2str(int reason)
- }
- }
-
--struct ast_channel *__ast_request_and_dial(const char *type, int format, 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, int format, void *data, int timeout, int *outstate, int callingpres, const char *cid_num, const char *cid_name, struct outgoing_helper *oh, char* uniqueid)
- {
+@@ -2823,6 +2833,12 @@ char *ast_channel_reason2str(int reason)
+
+ struct ast_channel *__ast_request_and_dial(const char *type, int format, void *data, int timeout, int *outstate, const char *cid_num, const char *cid_name, struct outgoing_helper *oh)
+ {
++ return __ast_request_and_dial_uniqueid(type, format, data,
++ timeout, outstate, 0, cid_num, cid_name, oh, NULL);
++}
++
++struct ast_channel *__ast_request_and_dial_uniqueid(const char *type, int format, void *data, int timeout, int *outstate, int callingpres, const char *cid_num, const char *cid_name, struct outgoing_helper *oh, char* uniqueid)
++{
int dummy_outstate;
int cause = 0;
-@@ -2834,7 +2844,7 @@ struct ast_channel *__ast_request_and_di
+ struct ast_channel *chan;
+@@ -2834,7 +2850,7 @@ struct ast_channel *__ast_request_and_di
else
outstate = &dummy_outstate; /* make outstate always a valid pointer */
@@ -147,7 +152,7 @@
if (!chan) {
ast_log(LOG_NOTICE, "Unable to request channel %s/%s\n", type, (char *)data);
/* compute error and return */
-@@ -2857,7 +2867,7 @@ struct ast_channel *__ast_request_and_di
+@@ -2857,7 +2873,7 @@ struct ast_channel *__ast_request_and_di
ast_cdr_setaccount(chan, oh->account);
}
ast_set_callerid(chan, cid_num, cid_name, cid_num);
@@ -156,23 +161,21 @@
if (!chan->cdr) { /* up till now, this insertion hasn't been done. Therefore,
-@@ -2950,12 +2960,12 @@ struct ast_channel *__ast_request_and_di
- return chan;
- }
-
--struct ast_channel *ast_request_and_dial(const char *type, int format, void *data, int timeout, int *outstate, const char *cidnum, const char *cidname)
-+struct ast_channel *ast_request_and_dial(const char *type, int format, void *data, int timeout, int *outstate, int callingpres, const char *cidnum, const char *cidname, char *uniqueid)
- {
-- return __ast_request_and_dial(type, format, data, timeout, outstate, cidnum, cidname, NULL);
-+ return __ast_request_and_dial(type, format, data, timeout, outstate, 0, cidnum, cidname, NULL, uniqueid);
- }
+@@ -2954,8 +2970,12 @@ struct ast_channel *ast_request_and_dial
+ {
+ return __ast_request_and_dial(type, format, data, timeout, outstate, cidnum, cidname, NULL);
+ }
++struct ast_channel *ast_request_and_dial_uniqueid(const char *type, int format, void *data, int timeout, int *outstate, int callingpres, const char *cidnum, const char *cidname, char *uniqueid)
++{
++ return __ast_request_and_dial_uniqueid(type, format, data, timeout, outstate, 0, cidnum, cidname, NULL, uniqueid);
++}
-struct ast_channel *ast_request(const char *type, int format, void *data, int *cause)
+struct ast_channel *ast_request_with_uniqueid(const char *type, int format, void *data, int *cause, char *uniqueid)
{
struct chanlist *chan;
struct ast_channel *c;
-@@ -3005,6 +3015,11 @@ struct ast_channel *ast_request(const ch
+@@ -3005,6 +3025,11 @@ struct ast_channel *ast_request(const ch
return NULL;
}
@@ -184,7 +187,7 @@
int ast_call(struct ast_channel *chan, char *addr, int timeout)
{
/* Place an outgoing call, but don't wait any longer than timeout ms before returning.
-@@ -3390,7 +3405,7 @@ int ast_do_masquerade(struct ast_channel
+@@ -3390,7 +3415,7 @@ int ast_do_masquerade(struct ast_channel
ast_string_field_set(clone, name, masqn);
/* Notify any managers of the change, first the masq then the other */
@@ -193,25 +196,14 @@
manager_event(EVENT_FLAG_CALL, "Rename", "Oldname: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", orig, newn, original->uniqueid);
/* Swap the technologies */
---- a/apps/app_parkandannounce.c
-+++ b/apps/app_parkandannounce.c
-@@ -182,7 +182,7 @@ static int parkandannounce_exec(struct a
- memset(&oh, 0, sizeof(oh));
- oh.parent_channel = chan;
- oh.vars = ast_variable_new("_PARKEDAT", buf);
-- dchan = __ast_request_and_dial(dialtech, AST_FORMAT_SLINEAR, dialstr,30000, &outstate, chan->cid.cid_num, chan->cid.cid_name, &oh);
-+ dchan = __ast_request_and_dial(dialtech, AST_FORMAT_SLINEAR, dialstr,30000, &outstate, 0, chan->cid.cid_num, chan->cid.cid_name, &oh, NULL);
-
- if(dchan) {
- if(dchan->_state == AST_STATE_UP) {
---- a/include/asterisk/pbx.h
-+++ b/include/asterisk/pbx.h
+--- asterisk.orig/include/asterisk/pbx.h
++++ asterisk/include/asterisk/pbx.h
@@ -717,9 +717,17 @@ int ast_async_goto_by_name(const char *c
int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout, const char *context, const char *exten, int priority, int *reason, int sync, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **locked_channel);
/*! Synchronously or asynchronously make an outbound call and send it to a
+ particular extension (extended version with callinpres and uniqueid) */
-+int ast_pbx_outgoing_exten2(const char *type, int format, void *data, int timeout, const char *context, const char *exten, int priority, int *reason, int sync, int callingpres, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **locked_channel, char *uniqueid);
++int ast_pbx_outgoing_exten_uniqueid(const char *type, int format, void *data, int timeout, const char *context, const char *exten, int priority, int *reason, int sync, int callingpres, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **locked_channel, char *uniqueid);
+
+/*! Synchronously or asynchronously make an outbound call and send it to a
particular application with given extension */
@@ -219,19 +211,19 @@
+/*! Synchronously or asynchronously make an outbound call and send it to a
+ particular application with given extension (extended version with callinpres and uniqueid) */
-+int ast_pbx_outgoing_app2(const char *type, int format, void *data, int timeout, const char *app, const char *appdata, int *reason, int sync, int callingpres, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **locked_channel, char *uniqueid);
++int ast_pbx_outgoing_app_uniqueid(const char *type, int format, void *data, int timeout, const char *app, const char *appdata, int *reason, int sync, int callingpres, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **locked_channel, char *uniqueid);
+
/*!
* \brief Evaluate a condition
*
---- a/main/pbx.c
-+++ b/main/pbx.c
+--- asterisk.orig/main/pbx.c
++++ asterisk/main/pbx.c
@@ -4990,7 +4990,7 @@ static int ast_pbx_outgoing_cdr_failed(v
return 0; /* success */
}
-int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout, const char *context, const char *exten, int priority, int *reason, int sync, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **channel)
-+int ast_pbx_outgoing_exten2(const char *type, int format, void *data, int timeout, const char *context, const char *exten, int priority, int *reason, int sync, int callingpres, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **channel, char *uniqueid)
++int ast_pbx_outgoing_exten_uniqueid(const char *type, int format, void *data, int timeout, const char *context, const char *exten, int priority, int *reason, int sync, int callingpres, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **channel, char *uniqueid)
{
struct ast_channel *chan;
struct async_stat *as;
@@ -240,7 +232,7 @@
if (sync) {
LOAD_OH(oh);
- chan = __ast_request_and_dial(type, format, data, timeout, reason, cid_num, cid_name, &oh);
-+ chan = __ast_request_and_dial(type, format, data, timeout, reason, callingpres, cid_num, cid_name, &oh, uniqueid);
++ chan = __ast_request_and_dial_uniqueid(type, format, data, timeout, reason, callingpres, cid_num, cid_name, &oh, uniqueid);
if (channel) {
*channel = chan;
if (chan)
@@ -249,7 +241,7 @@
goto outgoing_exten_cleanup;
}
- chan = ast_request_and_dial(type, format, data, timeout, reason, cid_num, cid_name);
-+ chan = ast_request_and_dial(type, format, data, timeout, reason, callingpres, cid_num, cid_name, uniqueid);
++ chan = ast_request_and_dial_uniqueid(type, format, data, timeout, reason, callingpres, cid_num, cid_name, uniqueid);
if (channel) {
*channel = chan;
if (chan)
@@ -259,7 +251,7 @@
+int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout, const char *context, const char *exten, int priority, int *reason, int sync, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **channel)
+{
-+ return ast_pbx_outgoing_exten2(type, format, data, timeout, context, exten, priority, reason, sync, 0, cid_num, cid_name, vars, account, channel, NULL);
++ return ast_pbx_outgoing_exten_uniqueid(type, format, data, timeout, context, exten, priority, reason, sync, 0, cid_num, cid_name, vars, account, channel, NULL);
+}
struct app_tmp {
char app[256];
@@ -269,7 +261,7 @@
}
-int ast_pbx_outgoing_app(const char *type, int format, void *data, int timeout, const char *app, const char *appdata, int *reason, int sync, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **locked_channel)
-+int ast_pbx_outgoing_app2(const char *type, int format, void *data, int timeout, const char *app, const char *appdata, int *reason, int sync, int callingpres, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **locked_channel, char *uniqueid)
++int ast_pbx_outgoing_app_uniqueid(const char *type, int format, void *data, int timeout, const char *app, const char *appdata, int *reason, int sync, int callingpres, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **locked_channel, char *uniqueid)
{
struct ast_channel *chan;
struct app_tmp *tmp;
@@ -278,7 +270,7 @@
}
if (sync) {
- chan = __ast_request_and_dial(type, format, data, timeout, reason, cid_num, cid_name, &oh);
-+ chan = __ast_request_and_dial(type, format, data, timeout, reason, callingpres, cid_num, cid_name, &oh, uniqueid);
++ chan = __ast_request_and_dial_uniqueid(type, format, data, timeout, reason, callingpres, cid_num, cid_name, &oh, uniqueid);
if (chan) {
if (!chan->cdr) { /* check if the channel already has a cdr record, if not give it one */
chan->cdr = ast_cdr_alloc(); /* allocate a cdr for the channel */
@@ -287,7 +279,7 @@
goto outgoing_app_cleanup;
}
- chan = __ast_request_and_dial(type, format, data, timeout, reason, cid_num, cid_name, &oh);
-+ chan = __ast_request_and_dial(type, format, data, timeout, reason, callingpres, cid_num, cid_name, &oh, uniqueid);
++ chan = __ast_request_and_dial_uniqueid(type, format, data, timeout, reason, callingpres, cid_num, cid_name, &oh, uniqueid);
if (!chan) {
free(as);
res = -1;
@@ -297,7 +289,7 @@
+int ast_pbx_outgoing_app(const char *type, int format, void *data, int timeout, const char *app, const char *appdata, int *reason, int sync, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **locked_channel)
+{
-+ return ast_pbx_outgoing_app2(type, format, data, timeout, app, appdata, reason, sync, 0, cid_num, cid_name, vars, account, locked_channel, NULL);
++ return ast_pbx_outgoing_app_uniqueid(type, format, data, timeout, app, appdata, reason, sync, 0, cid_num, cid_name, vars, account, locked_channel, NULL);
+}
void __ast_context_destroy(struct ast_context *con, const char *registrar)
{
Modified: asterisk/trunk/debian/patches/bristuff/uniqueid-30-app-chanspy
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/bristuff/uniqueid-30-app-chanspy?rev=5776&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/bristuff/uniqueid-30-app-chanspy (original)
+++ asterisk/trunk/debian/patches/bristuff/uniqueid-30-app-chanspy Sun May 25 11:42:30 2008
@@ -4,7 +4,7 @@
static const char *tdesc = "Listen to a channel, and optionally whisper into it";
static const char *app_chan = "ChanSpy";
-+static const char *app_chan2 = "ChanSpyChan";
++static const char *app_chan_uniqueid = "ChanSpyChan";
static const char *desc_chan =
" ChanSpy([chanprefix][|options]): This application is used to listen to the\n"
"audio from an Asterisk channel. This includes the audio coming in and\n"
@@ -191,7 +191,7 @@
int res = 0;
res |= ast_unregister_application(app_chan);
-+ res |= ast_unregister_application(app_chan2);
++ res |= ast_unregister_application(app_chan_uniqueid);
res |= ast_unregister_application(app_ext);
- ast_module_user_hangup_all();
@@ -202,7 +202,7 @@
res |= ast_register_application(app_chan, chanspy_exec, tdesc, desc_chan);
res |= ast_register_application(app_ext, extenspy_exec, tdesc, desc_ext);
-+ res |= ast_register_application(app_chan2, chanspychan_exec, tdesc, desc_uniqueid);
++ res |= ast_register_application(app_chan_uniqueid, chanspychan_exec, tdesc, desc_uniqueid);
return res;
}
Modified: asterisk/trunk/debian/patches/bristuff/uniqueid-40-manager
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/bristuff/uniqueid-40-manager?rev=5776&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/bristuff/uniqueid-40-manager (original)
+++ asterisk/trunk/debian/patches/bristuff/uniqueid-40-manager Sun May 25 11:42:30 2008
@@ -1,5 +1,5 @@
---- a/main/manager.c
-+++ b/main/manager.c
+--- asterisk.orig/main/manager.c
++++ asterisk/main/manager.c
@@ -87,6 +87,8 @@ struct fast_originate_helper {
char idtext[AST_MAX_EXTENSION];
char account[AST_MAX_ACCOUNT_CODE];
@@ -91,14 +91,14 @@
if (!ast_strlen_zero(in->app)) {
- res = ast_pbx_outgoing_app(in->tech, AST_FORMAT_SLINEAR, in->data, in->timeout, in->app, in->appdata, &reason, 1,
-+ res = ast_pbx_outgoing_app2(in->tech, AST_FORMAT_SLINEAR, in->data, in->timeout, in->app, in->appdata, &reason, 1, in->callingpres,
++ res = ast_pbx_outgoing_app_uniqueid(in->tech, AST_FORMAT_SLINEAR, in->data, in->timeout, in->app, in->appdata, &reason, 1, in->callingpres,
S_OR(in->cid_num, NULL),
S_OR(in->cid_name, NULL),
- in->vars, in->account, &chan);
+ in->vars, in->account, &chan, in->uniqueid);
} else {
- res = ast_pbx_outgoing_exten(in->tech, AST_FORMAT_SLINEAR, in->data, in->timeout, in->context, in->exten, in->priority, &reason, 1,
-+ res = ast_pbx_outgoing_exten2(in->tech, AST_FORMAT_SLINEAR, in->data, in->timeout, in->context, in->exten, in->priority, &reason, 1, in->callingpres,
++ res = ast_pbx_outgoing_exten_uniqueid(in->tech, AST_FORMAT_SLINEAR, in->data, in->timeout, in->context, in->exten, in->priority, &reason, 1, in->callingpres,
S_OR(in->cid_num, NULL),
S_OR(in->cid_name, NULL),
- in->vars, in->account, &chan);
@@ -159,11 +159,11 @@
}
} else if (!ast_strlen_zero(app)) {
- res = ast_pbx_outgoing_app(tech, AST_FORMAT_SLINEAR, data, to, app, appdata, &reason, 1, l, n, vars, account, NULL);
-+ res = ast_pbx_outgoing_app2(tech, AST_FORMAT_SLINEAR, data, to, app, appdata, &reason, 1, cpresi, l, n, vars, account, NULL, uniqueid);
++ res = ast_pbx_outgoing_app_uniqueid(tech, AST_FORMAT_SLINEAR, data, to, app, appdata, &reason, 1, cpresi, l, n, vars, account, NULL, uniqueid);
} else {
if (exten && context && pi)
- res = ast_pbx_outgoing_exten(tech, AST_FORMAT_SLINEAR, data, to, context, exten, pi, &reason, 1, l, n, vars, account, NULL);
-+ res = ast_pbx_outgoing_exten2(tech, AST_FORMAT_SLINEAR, data, to, context, exten, pi, &reason, 1, cpresi, l, n, vars, account, NULL, uniqueid);
++ res = ast_pbx_outgoing_exten_uniqueid(tech, AST_FORMAT_SLINEAR, data, to, context, exten, pi, &reason, 1, cpresi, l, n, vars, account, NULL, uniqueid);
else {
astman_send_error(s, m, "Originate with 'Exten' requires 'Context' and 'Priority'");
return 0;
@@ -188,8 +188,8 @@
return 0;
}
---- a/include/asterisk/channel.h
-+++ b/include/asterisk/channel.h
+--- asterisk.orig/include/asterisk/channel.h
++++ asterisk/include/asterisk/channel.h
@@ -89,6 +89,9 @@
#include "asterisk/abstract_jb.h"
@@ -200,7 +200,7 @@
#include <unistd.h>
#ifdef POLLCOMPAT
#include "asterisk/poll-compat.h"
-@@ -1022,6 +1025,8 @@ int ast_waitfordigit_full(struct ast_cha
+@@ -1026,6 +1029,8 @@ int ast_waitfordigit_full(struct ast_cha
int ast_readstring(struct ast_channel *c, char *s, int len, int timeout, int rtimeout, char *enders);
int ast_readstring_full(struct ast_channel *c, char *s, int len, int timeout, int rtimeout, char *enders, int audiofd, int ctrlfd);
@@ -209,8 +209,8 @@
/*! \brief Report DTMF on channel 0 */
#define AST_BRIDGE_DTMF_CHANNEL_0 (1 << 0)
/*! \brief Report DTMF on channel 1 */
---- a/main/channel.c
-+++ b/main/channel.c
+--- asterisk.orig/main/channel.c
++++ asterisk/main/channel.c
@@ -706,6 +706,15 @@ static const struct ast_channel_tech nul
.description = "Null channel (should not see this)",
};
More information about the Pkg-voip-commits
mailing list