[asterisk-commits] sgriepentrog: trunk r410158 - in /trunk: ./ addons/ apps/ apps/confbridge/ ch...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Mar 7 09:48:00 CST 2014
Author: sgriepentrog
Date: Fri Mar 7 09:47:55 2014
New Revision: 410158
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=410158
Log:
uniqueid: channel linkedid, ami, ari object creation with id's
Much needed was a way to assign id to objects on creation, and
much change was necessary to accomplish it. Channel uniqueids
and linkedids are split into separate string and creation time
components without breaking linkedid propgation. This allowed
the uniqueid to be specified by the user interface - and those
values are now carried through to channel creation, adding the
assignedids value to every function in the chain including the
channel drivers. For local channels, the second channel can be
specified or left to default to a ;2 suffix of first. In ARI,
bridge, playback, and snoop objects can also be created with a
specified uniqueid.
Along the way, the args order to allocating channels was fixed
in chan_mgcp and chan_gtalk, and linkedid is no longer lost as
masquerade occurs.
(closes issue ASTERISK-23120)
Review: https://reviewboard.asterisk.org/r/3191/
........
Merged revisions 410157 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/addons/chan_mobile.c
trunk/addons/chan_ooh323.c
trunk/apps/app_agent_pool.c
trunk/apps/app_bridgewait.c
trunk/apps/app_chanisavail.c
trunk/apps/app_confbridge.c
trunk/apps/app_dial.c
trunk/apps/app_followme.c
trunk/apps/app_meetme.c
trunk/apps/app_originate.c
trunk/apps/app_page.c
trunk/apps/app_queue.c
trunk/apps/app_voicemail.c
trunk/apps/confbridge/conf_chan_announce.c
trunk/apps/confbridge/conf_chan_record.c
trunk/channels/chan_alsa.c
trunk/channels/chan_bridge_media.c
trunk/channels/chan_console.c
trunk/channels/chan_dahdi.c
trunk/channels/chan_gtalk.c
trunk/channels/chan_h323.c
trunk/channels/chan_iax2.c
trunk/channels/chan_jingle.c
trunk/channels/chan_mgcp.c
trunk/channels/chan_misdn.c
trunk/channels/chan_motif.c
trunk/channels/chan_multicast_rtp.c
trunk/channels/chan_nbs.c
trunk/channels/chan_oss.c
trunk/channels/chan_phone.c
trunk/channels/chan_pjsip.c
trunk/channels/chan_sip.c
trunk/channels/chan_skinny.c
trunk/channels/chan_unistim.c
trunk/channels/chan_vpb.cc
trunk/include/asterisk/bridge.h
trunk/include/asterisk/bridge_internal.h
trunk/include/asterisk/channel.h
trunk/include/asterisk/channel_internal.h
trunk/include/asterisk/core_unreal.h
trunk/include/asterisk/dial.h
trunk/include/asterisk/pbx.h
trunk/include/asterisk/stasis_app.h
trunk/include/asterisk/stasis_app_playback.h
trunk/include/asterisk/stasis_app_snoop.h
trunk/main/bridge.c
trunk/main/bridge_basic.c
trunk/main/bridge_channel.c
trunk/main/ccss.c
trunk/main/cel.c
trunk/main/channel.c
trunk/main/channel_internal_api.c
trunk/main/core_local.c
trunk/main/core_unreal.c
trunk/main/dial.c
trunk/main/manager.c
trunk/main/message.c
trunk/main/pbx.c
trunk/pbx/pbx_spool.c
trunk/res/ari/resource_bridges.c
trunk/res/ari/resource_bridges.h
trunk/res/ari/resource_channels.c
trunk/res/ari/resource_channels.h
trunk/res/parking/parking_applications.c
trunk/res/parking/parking_bridge.c
trunk/res/parking/parking_bridge_features.c
trunk/res/parking/parking_tests.c
trunk/res/res_ari_bridges.c
trunk/res/res_ari_channels.c
trunk/res/res_calendar.c
trunk/res/res_calendar_caldav.c
trunk/res/res_calendar_ews.c
trunk/res/res_calendar_exchange.c
trunk/res/res_calendar_icalendar.c
trunk/res/res_clioriginate.c
trunk/res/res_stasis.c
trunk/res/res_stasis_playback.c
trunk/res/res_stasis_snoop.c
trunk/res/stasis/control.c
trunk/rest-api/api-docs/bridges.json
trunk/rest-api/api-docs/channels.json
trunk/tests/test_app.c
trunk/tests/test_cdr.c
trunk/tests/test_cel.c
trunk/tests/test_stasis_channels.c
trunk/tests/test_stasis_endpoints.c
trunk/tests/test_substitution.c
trunk/tests/test_voicemail_api.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.
Modified: trunk/addons/chan_mobile.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/chan_mobile.c?view=diff&rev=410158&r1=410157&r2=410158
==============================================================================
--- trunk/addons/chan_mobile.c (original)
+++ trunk/addons/chan_mobile.c Fri Mar 7 09:47:55 2014
@@ -209,9 +209,9 @@
" Message - text of the message\n";
static struct ast_channel *mbl_new(int state, struct mbl_pvt *pvt, char *cid_num,
- const struct ast_channel *requestor);
+ const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor);
static struct ast_channel *mbl_request(const char *type, struct ast_format_cap *cap,
- const struct ast_channel *requestor, const char *data, int *cause);
+ const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause);
static int mbl_call(struct ast_channel *ast, const char *dest, int timeout);
static int mbl_hangup(struct ast_channel *ast);
static int mbl_answer(struct ast_channel *ast);
@@ -838,7 +838,7 @@
*/
static struct ast_channel *mbl_new(int state, struct mbl_pvt *pvt, char *cid_num,
- const struct ast_channel *requestor)
+ const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor)
{
struct ast_channel *chn;
@@ -855,7 +855,7 @@
ast_dsp_digitreset(pvt->dsp);
chn = ast_channel_alloc(1, state, cid_num, pvt->id, 0, 0, pvt->context,
- requestor ? ast_channel_linkedid(requestor) : "", 0,
+ assignedids, requestor, 0,
"Mobile/%s-%04lx", pvt->id, ast_random() & 0xffff);
if (!chn) {
goto e_return;
@@ -887,7 +887,7 @@
}
static struct ast_channel *mbl_request(const char *type, struct ast_format_cap *cap,
- const struct ast_channel *requestor, const char *data, int *cause)
+ const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause)
{
struct ast_channel *chn = NULL;
@@ -946,7 +946,7 @@
}
ast_mutex_lock(&pvt->lock);
- chn = mbl_new(AST_STATE_DOWN, pvt, NULL, requestor);
+ chn = mbl_new(AST_STATE_DOWN, pvt, NULL, assignedids, requestor);
ast_mutex_unlock(&pvt->lock);
if (!chn) {
ast_log(LOG_WARNING, "Unable to allocate channel structure.\n");
@@ -3591,7 +3591,7 @@
ast_debug(1, "[%s] error parsing CLIP: %s\n", pvt->id, buf);
}
- if (!(chan = mbl_new(AST_STATE_RING, pvt, clip, NULL))) {
+ if (!(chan = mbl_new(AST_STATE_RING, pvt, clip, NULL, NULL))) {
ast_log(LOG_ERROR, "[%s] unable to allocate channel for incoming call\n", pvt->id);
hfp_send_chup(pvt->hfp);
msg_queue_push(pvt, AT_OK, AT_CHUP);
@@ -3681,7 +3681,7 @@
pvt->incoming_sms = 0;
/* XXX this channel probably does not need to be associated with this pvt */
- if (!(chan = mbl_new(AST_STATE_DOWN, pvt, NULL, NULL))) {
+ if (!(chan = mbl_new(AST_STATE_DOWN, pvt, NULL, NULL, NULL))) {
ast_debug(1, "[%s] error creating sms message channel, disconnecting\n", pvt->id);
return -1;
}
@@ -4140,7 +4140,7 @@
pvt->incoming = 1;
- if (!(chan = mbl_new(AST_STATE_UP, pvt, NULL, NULL))) {
+ if (!(chan = mbl_new(AST_STATE_UP, pvt, NULL, NULL, NULL))) {
ast_log(LOG_ERROR, "[%s] unable to allocate channel for incoming call\n", pvt->id);
ast_mutex_unlock(&pvt->lock);
goto e_cleanup;
Modified: trunk/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/chan_ooh323.c?view=diff&rev=410158&r1=410157&r2=410158
==============================================================================
--- trunk/addons/chan_ooh323.c (original)
+++ trunk/addons/chan_ooh323.c Fri Mar 7 09:47:55 2014
@@ -71,7 +71,7 @@
/* Channel Definition */
static struct ast_channel *ooh323_request(const char *type, struct ast_format_cap *cap,
- const struct ast_channel *requestor, const char *data, int *cause);
+ const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause);
static int ooh323_digit_begin(struct ast_channel *ast, char digit);
static int ooh323_digit_end(struct ast_channel *ast, char digit, unsigned int duration);
static int ooh323_call(struct ast_channel *ast, const char *dest, int timeout);
@@ -363,7 +363,8 @@
static struct ast_channel *ooh323_new(struct ooh323_pvt *i, int state,
- const char *host, struct ast_format_cap *cap, const char *linkedid)
+ const char *host, struct ast_format_cap *cap,
+ const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor)
{
struct ast_channel *ch = NULL;
struct ast_format tmpfmt;
@@ -378,7 +379,7 @@
ast_mutex_unlock(&i->lock);
ast_mutex_lock(&ooh323c_cn_lock);
ch = ast_channel_alloc(1, state, i->callerid_num, i->callerid_name,
- i->accountcode, i->exten, i->context, linkedid, i->amaflags,
+ i->accountcode, i->exten, i->context, assignedids, requestor, i->amaflags,
"OOH323/%s-%ld", host, callnumber);
callnumber++;
ast_mutex_unlock(&ooh323c_cn_lock);
@@ -569,7 +570,7 @@
Possible data values - peername, exten/peername, exten at ip
*/
static struct ast_channel *ooh323_request(const char *type, struct ast_format_cap *cap,
- const struct ast_channel *requestor, const char *data, int *cause)
+ const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause)
{
struct ast_channel *chan = NULL;
@@ -718,7 +719,7 @@
chan = ooh323_new(p, AST_STATE_DOWN, p->username, cap,
- requestor ? ast_channel_linkedid(requestor) : NULL);
+ assignedids, requestor);
ast_mutex_unlock(&p->lock);
@@ -1918,7 +1919,7 @@
ooh323c_set_capability_for_call(call, &p->prefs, p->cap, p->dtmfmode, p->dtmfcodec,
p->t38support, p->g729onlyA);
/* Incoming call */
- c = ooh323_new(p, AST_STATE_RING, p->username, 0, NULL);
+ c = ooh323_new(p, AST_STATE_RING, p->username, 0, NULL, NULL);
if(!c) {
ast_mutex_unlock(&p->lock);
ast_log(LOG_ERROR, "Could not create ast_channel\n");
Modified: trunk/apps/app_agent_pool.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_agent_pool.c?view=diff&rev=410158&r1=410157&r2=410158
==============================================================================
--- trunk/apps/app_agent_pool.c (original)
+++ trunk/apps/app_agent_pool.c Fri Mar 7 09:47:55 2014
@@ -1367,7 +1367,7 @@
bridge = bridge_base_init(bridge, AST_BRIDGE_CAPABILITY_HOLDING,
AST_BRIDGE_FLAG_MERGE_INHIBIT_TO | AST_BRIDGE_FLAG_MERGE_INHIBIT_FROM
| AST_BRIDGE_FLAG_SWAP_INHIBIT_FROM | AST_BRIDGE_FLAG_TRANSFER_PROHIBITED,
- "AgentPool", NULL);
+ "AgentPool", NULL, NULL);
bridge = bridge_register(bridge);
return bridge;
}
Modified: trunk/apps/app_bridgewait.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_bridgewait.c?view=diff&rev=410158&r1=410157&r2=410158
==============================================================================
--- trunk/apps/app_bridgewait.c (original)
+++ trunk/apps/app_bridgewait.c Fri Mar 7 09:47:55 2014
@@ -361,7 +361,7 @@
AST_BRIDGE_FLAG_MERGE_INHIBIT_TO | AST_BRIDGE_FLAG_MERGE_INHIBIT_FROM
| AST_BRIDGE_FLAG_SWAP_INHIBIT_TO | AST_BRIDGE_FLAG_SWAP_INHIBIT_FROM
| AST_BRIDGE_FLAG_TRANSFER_PROHIBITED | AST_BRIDGE_FLAG_DISSOLVE_EMPTY,
- APP_NAME, bridge_name);
+ APP_NAME, bridge_name, NULL);
if (!bridge) {
return NULL;
Modified: trunk/apps/app_chanisavail.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_chanisavail.c?view=diff&rev=410158&r1=410157&r2=410158
==============================================================================
--- trunk/apps/app_chanisavail.c (original)
+++ trunk/apps/app_chanisavail.c Fri Mar 7 09:47:55 2014
@@ -171,7 +171,7 @@
}
snprintf(tmp, sizeof(tmp), "%d", status);
ast_str_append(&tmp_availstat, 0, "%s%s", ast_str_strlen(tmp_availstat) ? "&" : "", tmp);
- if ((inuse <= 1) && (tempchan = ast_request(tech, ast_channel_nativeformats(chan), chan, number, &status))) {
+ if ((inuse <= 1) && (tempchan = ast_request(tech, ast_channel_nativeformats(chan), NULL, chan, number, &status))) {
ast_str_append(&tmp_availchan, 0, "%s%s", ast_str_strlen(tmp_availchan) ? "&" : "", ast_channel_name(tempchan));
snprintf(tmp, sizeof(tmp), "%s/%s", tech, number);
Modified: trunk/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_confbridge.c?view=diff&rev=410158&r1=410157&r2=410158
==============================================================================
--- trunk/apps/app_confbridge.c (original)
+++ trunk/apps/app_confbridge.c Fri Mar 7 09:47:55 2014
@@ -691,7 +691,7 @@
ast_format_cap_add(cap, ast_format_set(&format, AST_FORMAT_SLINEAR, 0));
- conference->record_chan = ast_request("CBRec", cap, NULL,
+ conference->record_chan = ast_request("CBRec", cap, NULL, NULL,
conference->name, NULL);
cap = ast_format_cap_destroy(cap);
if (!conference->record_chan) {
@@ -1219,7 +1219,7 @@
/* Create an actual bridge that will do the audio mixing */
conference->bridge = ast_bridge_base_new(AST_BRIDGE_CAPABILITY_MULTIMIX,
AST_BRIDGE_FLAG_MASQUERADE_ONLY | AST_BRIDGE_FLAG_TRANSFER_BRIDGE_ONLY,
- app, conference_name);
+ app, conference_name, NULL);
if (!conference->bridge) {
ao2_ref(conference, -1);
conference = NULL;
@@ -1371,7 +1371,7 @@
return -1;
}
ast_format_cap_add(cap, ast_format_set(&format, AST_FORMAT_SLINEAR, 0));
- conference->playback_chan = ast_request("CBAnn", cap, NULL,
+ conference->playback_chan = ast_request("CBAnn", cap, NULL, NULL,
conference->name, NULL);
cap = ast_format_cap_destroy(cap);
if (!conference->playback_chan) {
Modified: trunk/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_dial.c?view=diff&rev=410158&r1=410157&r2=410158
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Fri Mar 7 09:47:55 2014
@@ -873,7 +873,7 @@
cause = AST_CAUSE_BUSY;
} else {
/* Setup parameters */
- c = o->chan = ast_request(tech, ast_channel_nativeformats(in), in, stuff, &cause);
+ c = o->chan = ast_request(tech, ast_channel_nativeformats(in), NULL, in, stuff, &cause);
if (c) {
if (single && !caller_entertained) {
ast_channel_make_compatible(in, o->chan);
@@ -2429,7 +2429,7 @@
AST_LIST_UNLOCK(dialed_interfaces);
}
- tc = ast_request(tmp->tech, ast_channel_nativeformats(chan), chan, tmp->number, &cause);
+ tc = ast_request(tmp->tech, ast_channel_nativeformats(chan), NULL, chan, tmp->number, &cause);
if (!tc) {
/* If we can't, just go on to the next call */
ast_log(LOG_WARNING, "Unable to create channel of type '%s' (cause %d - %s)\n",
Modified: trunk/apps/app_followme.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_followme.c?view=diff&rev=410158&r1=410157&r2=410158
==============================================================================
--- trunk/apps/app_followme.c (original)
+++ trunk/apps/app_followme.c Fri Mar 7 09:47:55 2014
@@ -1056,7 +1056,7 @@
? "/n" : "/m");
}
- outbound = ast_request("Local", ast_channel_nativeformats(caller), caller,
+ outbound = ast_request("Local", ast_channel_nativeformats(caller), NULL, caller,
tmpuser->dialarg, &dg);
if (!outbound) {
ast_log(LOG_WARNING, "Unable to allocate a channel for Local/%s cause: %s\n",
Modified: trunk/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_meetme.c?view=diff&rev=410158&r1=410157&r2=410158
==============================================================================
--- trunk/apps/app_meetme.c (original)
+++ trunk/apps/app_meetme.c Fri Mar 7 09:47:55 2014
@@ -1667,7 +1667,7 @@
cnf->dahdiconf = dahdic.confno;
/* Setup a new channel for playback of audio files */
- cnf->chan = ast_request("DAHDI", cap_slin, chan, "pseudo", NULL);
+ cnf->chan = ast_request("DAHDI", cap_slin, NULL, chan, "pseudo", NULL);
if (cnf->chan) {
ast_set_read_format_by_id(cnf->chan, AST_FORMAT_SLINEAR);
ast_set_write_format_by_id(cnf->chan, AST_FORMAT_SLINEAR);
@@ -3087,7 +3087,7 @@
}
ast_mutex_lock(&conf->recordthreadlock);
- if ((conf->recordthread == AST_PTHREADT_NULL) && ast_test_flag64(confflags, CONFFLAG_RECORDCONF) && ((conf->lchan = ast_request("DAHDI", cap_slin, chan, "pseudo", NULL)))) {
+ if ((conf->recordthread == AST_PTHREADT_NULL) && ast_test_flag64(confflags, CONFFLAG_RECORDCONF) && ((conf->lchan = ast_request("DAHDI", cap_slin, NULL, chan, "pseudo", NULL)))) {
ast_set_read_format_by_id(conf->lchan, AST_FORMAT_SLINEAR);
ast_set_write_format_by_id(conf->lchan, AST_FORMAT_SLINEAR);
dahdic->chan = 0;
@@ -3341,7 +3341,7 @@
ast_mutex_lock(&conf->recordthreadlock);
if ((conf->recordthread == AST_PTHREADT_NULL) && ast_test_flag64(confflags, CONFFLAG_RECORDCONF) &&
- ((conf->lchan = ast_request("DAHDI", cap_slin, chan, "pseudo", NULL)))) {
+ ((conf->lchan = ast_request("DAHDI", cap_slin, NULL, chan, "pseudo", NULL)))) {
ast_set_read_format_by_id(conf->lchan, AST_FORMAT_SLINEAR);
ast_set_write_format_by_id(conf->lchan, AST_FORMAT_SLINEAR);
dahdic.chan = 0;
@@ -6344,7 +6344,7 @@
tech_data = ast_strdupa(station->device);
tech = strsep(&tech_data, "/");
- if (ast_dial_append(dial, tech, tech_data) == -1) {
+ if (ast_dial_append(dial, tech, tech_data, NULL) == -1) {
ast_dial_destroy(dial);
return -1;
}
@@ -6850,7 +6850,7 @@
tech_data = ast_strdupa(trunk_ref->trunk->device);
tech = strsep(&tech_data, "/");
- if (ast_dial_append(dial, tech, tech_data) == -1) {
+ if (ast_dial_append(dial, tech, tech_data, NULL) == -1) {
ast_mutex_lock(args->cond_lock);
ast_cond_signal(args->cond);
ast_mutex_unlock(args->cond_lock);
@@ -8132,7 +8132,7 @@
break;
}
- chan = ast_channel_alloc(0, AST_STATE_DOWN, NULL, NULL, NULL, NULL, NULL, 0, 0, "MeetMeTest");
+ chan = ast_channel_alloc(0, AST_STATE_DOWN, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, "MeetMeTest");
if (!chan) {
ast_test_status_update(test, "Channel allocation failed\n");
return AST_TEST_FAIL;
Modified: trunk/apps/app_originate.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_originate.c?view=diff&rev=410158&r1=410157&r2=410158
==============================================================================
--- trunk/apps/app_originate.c (original)
+++ trunk/apps/app_originate.c Fri Mar 7 09:47:55 2014
@@ -178,14 +178,14 @@
ast_pbx_outgoing_exten(chantech, cap_slin, chandata,
timeout * 1000, args.arg1, exten, priority, &outgoing_status, 0, NULL,
- NULL, NULL, NULL, NULL, 0);
+ NULL, NULL, NULL, NULL, 0, NULL);
} else if (!strcasecmp(args.type, "app")) {
ast_debug(1, "Originating call to '%s/%s' and connecting them to %s(%s)\n",
chantech, chandata, args.arg1, S_OR(args.arg2, ""));
ast_pbx_outgoing_app(chantech, cap_slin, chandata,
timeout * 1000, args.arg1, args.arg2, &outgoing_status, 0, NULL,
- NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL);
} else {
ast_log(LOG_ERROR, "Incorrect type, it should be 'exten' or 'app': %s\n",
args.type);
Modified: trunk/apps/app_page.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_page.c?view=diff&rev=410158&r1=410157&r2=410158
==============================================================================
--- trunk/apps/app_page.c (original)
+++ trunk/apps/app_page.c Fri Mar 7 09:47:55 2014
@@ -351,7 +351,7 @@
}
/* Append technology and resource */
- if (ast_dial_append(dial, tech, resource) == -1) {
+ if (ast_dial_append(dial, tech, resource, NULL) == -1) {
ast_log(LOG_ERROR, "Failed to add %s to outbound dial\n", tech);
ast_dial_destroy(dial);
continue;
Modified: trunk/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_queue.c?view=diff&rev=410158&r1=410157&r2=410158
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Fri Mar 7 09:47:55 2014
@@ -4058,7 +4058,7 @@
}
/* Request the peer */
- tmp->chan = ast_request(tech, ast_channel_nativeformats(qe->chan), qe->chan, location, &status);
+ tmp->chan = ast_request(tech, ast_channel_nativeformats(qe->chan), NULL, qe->chan, location, &status);
if (!tmp->chan) { /* If we can't, just go on to the next call */
ao2_lock(qe->parent);
qe->parent->rrpos++;
@@ -4586,7 +4586,7 @@
ast_verb(3, "Now forwarding %s to '%s/%s' (thanks to %s)\n", inchan_name, tech, stuff, ochan_name);
/* Setup parameters */
- o->chan = ast_request(tech, ast_channel_nativeformats(in), in, stuff, &status);
+ o->chan = ast_request(tech, ast_channel_nativeformats(in), NULL, in, stuff, &status);
if (!o->chan) {
ast_log(LOG_NOTICE,
"Forwarding failed to create channel to dial '%s/%s'\n",
Modified: trunk/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=410158&r1=410157&r2=410158
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Fri Mar 7 09:47:55 2014
@@ -13779,7 +13779,7 @@
break;
}
- if (!(test_channel1 = ast_channel_alloc(0, AST_STATE_DOWN, NULL, NULL, NULL,
+ if (!(test_channel1 = ast_channel_alloc(0, AST_STATE_DOWN, NULL, NULL, NULL, NULL,
NULL, NULL, 0, 0, "TestChannel1"))) {
goto exit_vmsayname_test;
}
Modified: trunk/apps/confbridge/conf_chan_announce.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/confbridge/conf_chan_announce.c?view=diff&rev=410158&r1=410157&r2=410158
==============================================================================
--- trunk/apps/confbridge/conf_chan_announce.c (original)
+++ trunk/apps/confbridge/conf_chan_announce.c Fri Mar 7 09:47:55 2014
@@ -77,7 +77,7 @@
doomed->bridge = NULL;
}
-static struct ast_channel *announce_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
+static struct ast_channel *announce_request(const char *type, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause)
{
struct ast_channel *chan;
const char *conf_name = data;
@@ -102,7 +102,7 @@
ao2_ref(pvt->bridge, +1);
chan = ast_unreal_new_channels(&pvt->base, conf_announce_get_tech(),
- AST_STATE_UP, AST_STATE_UP, NULL, NULL, requestor, NULL);
+ AST_STATE_UP, AST_STATE_UP, NULL, NULL, assignedids, requestor, NULL);
if (chan) {
ast_answer(pvt->base.owner);
ast_answer(pvt->base.chan);
Modified: trunk/apps/confbridge/conf_chan_record.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/confbridge/conf_chan_record.c?view=diff&rev=410158&r1=410157&r2=410158
==============================================================================
--- trunk/apps/confbridge/conf_chan_record.c (original)
+++ trunk/apps/confbridge/conf_chan_record.c Fri Mar 7 09:47:55 2014
@@ -53,13 +53,13 @@
return 0;
}
-static struct ast_channel *rec_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
+static struct ast_channel *rec_request(const char *type, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause)
{
struct ast_channel *chan;
struct ast_format format;
const char *conf_name = data;
- chan = ast_channel_alloc(1, AST_STATE_UP, NULL, NULL, NULL, NULL, NULL, NULL, 0,
+ chan = ast_channel_alloc(1, AST_STATE_UP, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0,
"CBRec/conf-%s-uid-%d",
conf_name, (int) ast_random());
if (!chan) {
Modified: trunk/channels/chan_alsa.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_alsa.c?view=diff&rev=410158&r1=410157&r2=410158
==============================================================================
--- trunk/channels/chan_alsa.c (original)
+++ trunk/channels/chan_alsa.c Fri Mar 7 09:47:55 2014
@@ -141,7 +141,7 @@
static int mute = 0;
static int noaudiocapture = 0;
-static struct ast_channel *alsa_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause);
+static struct ast_channel *alsa_request(const char *type, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause);
static int alsa_digit(struct ast_channel *c, char digit, unsigned int duration);
static int alsa_text(struct ast_channel *c, const char *text);
static int alsa_hangup(struct ast_channel *c);
@@ -574,11 +574,11 @@
return res;
}
-static struct ast_channel *alsa_new(struct chan_alsa_pvt *p, int state, const char *linkedid)
+static struct ast_channel *alsa_new(struct chan_alsa_pvt *p, int state, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor)
{
struct ast_channel *tmp = NULL;
- if (!(tmp = ast_channel_alloc(1, state, 0, 0, "", p->exten, p->context, linkedid, 0, "ALSA/%s", indevname)))
+ if (!(tmp = ast_channel_alloc(1, state, 0, 0, "", p->exten, p->context, assignedids, requestor, 0, "ALSA/%s", indevname)))
return NULL;
ast_channel_stage_snapshot(tmp);
@@ -614,7 +614,7 @@
return tmp;
}
-static struct ast_channel *alsa_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
+static struct ast_channel *alsa_request(const char *type, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause)
{
struct ast_format tmpfmt;
char buf[256];
@@ -632,7 +632,7 @@
if (alsa.owner) {
ast_log(LOG_NOTICE, "Already have a call on the ALSA channel\n");
*cause = AST_CAUSE_BUSY;
- } else if (!(tmp = alsa_new(&alsa, AST_STATE_DOWN, requestor ? ast_channel_linkedid(requestor) : NULL))) {
+ } else if (!(tmp = alsa_new(&alsa, AST_STATE_DOWN, assignedids, requestor))) {
ast_log(LOG_WARNING, "Unable to create new ALSA channel\n");
}
@@ -881,7 +881,7 @@
ast_copy_string(alsa.exten, mye, sizeof(alsa.exten));
ast_copy_string(alsa.context, myc, sizeof(alsa.context));
hookstate = 1;
- alsa_new(&alsa, AST_STATE_RINGING, NULL);
+ alsa_new(&alsa, AST_STATE_RINGING, NULL, NULL);
} else
ast_cli(a->fd, "No such extension '%s' in context '%s'\n", mye, myc);
}
Modified: trunk/channels/chan_bridge_media.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_bridge_media.c?view=diff&rev=410158&r1=410157&r2=410158
==============================================================================
--- trunk/channels/chan_bridge_media.c (original)
+++ trunk/channels/chan_bridge_media.c Fri Mar 7 09:47:55 2014
@@ -65,10 +65,10 @@
}
static struct ast_channel *announce_request(const char *type, struct ast_format_cap *cap,
- const struct ast_channel *requestor, const char *data, int *cause);
+ const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause);
static struct ast_channel *record_request(const char *type, struct ast_format_cap *cap,
- const struct ast_channel *requestor, const char *data, int *cause);
+ const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause);
static struct ast_channel_tech announce_tech = {
.type = "Announcer",
@@ -114,7 +114,7 @@
.properties = AST_CHAN_TP_INTERNAL,
};
-static struct ast_channel *media_request_helper(struct ast_format_cap *cap,
+static struct ast_channel *media_request_helper(struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids,
const struct ast_channel *requestor, const char *data, struct ast_channel_tech *tech, const char *role)
{
struct ast_channel *chan;
@@ -133,7 +133,7 @@
callid = ast_read_threadstorage_callid();
chan = ast_unreal_new_channels(pvt, tech,
- AST_STATE_UP, AST_STATE_UP, NULL, NULL, requestor, callid);
+ AST_STATE_UP, AST_STATE_UP, NULL, NULL, assignedids, requestor, callid);
if (!chan) {
return NULL;
}
@@ -150,15 +150,15 @@
}
static struct ast_channel *announce_request(const char *type, struct ast_format_cap *cap,
- const struct ast_channel *requestor, const char *data, int *cause)
-{
- return media_request_helper(cap, requestor, data, &announce_tech, "announcer");
+ const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause)
+{
+ return media_request_helper(cap, assignedids, requestor, data, &announce_tech, "announcer");
}
static struct ast_channel *record_request(const char *type, struct ast_format_cap *cap,
- const struct ast_channel *requestor, const char *data, int *cause)
-{
- return media_request_helper(cap, requestor, data, &record_tech, "recorder");
+ const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause)
+{
+ return media_request_helper(cap, assignedids, requestor, data, &record_tech, "recorder");
}
static void cleanup_capabilities(void)
Modified: trunk/channels/chan_console.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_console.c?view=diff&rev=410158&r1=410157&r2=410158
==============================================================================
--- trunk/channels/chan_console.c (original)
+++ trunk/channels/chan_console.c Fri Mar 7 09:47:55 2014
@@ -195,7 +195,7 @@
/*! Channel Technology Callbacks @{ */
static struct ast_channel *console_request(const char *type, struct ast_format_cap *cap,
- const struct ast_channel *requestor, const char *data, int *cause);
+ const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause);
static int console_digit_begin(struct ast_channel *c, char digit);
static int console_digit_end(struct ast_channel *c, char digit, unsigned int duration);
static int console_text(struct ast_channel *c, const char *text);
@@ -419,12 +419,12 @@
/*!
* \note Called with the pvt struct locked
*/
-static struct ast_channel *console_new(struct console_pvt *pvt, const char *ext, const char *ctx, int state, const char *linkedid)
+static struct ast_channel *console_new(struct console_pvt *pvt, const char *ext, const char *ctx, int state, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor)
{
struct ast_channel *chan;
if (!(chan = ast_channel_alloc(1, state, pvt->cid_num, pvt->cid_name, NULL,
- ext, ctx, linkedid, 0, "Console/%s", pvt->name))) {
+ ext, ctx, assignedids, requestor, 0, "Console/%s", pvt->name))) {
return NULL;
}
@@ -458,7 +458,7 @@
return chan;
}
-static struct ast_channel *console_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
+static struct ast_channel *console_request(const char *type, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause)
{
struct ast_channel *chan = NULL;
struct console_pvt *pvt;
@@ -481,7 +481,7 @@
}
console_pvt_lock(pvt);
- chan = console_new(pvt, NULL, NULL, AST_STATE_DOWN, requestor ? ast_channel_linkedid(requestor) : NULL);
+ chan = console_new(pvt, NULL, NULL, AST_STATE_DOWN, assignedids, requestor);
console_pvt_unlock(pvt);
if (!chan)
@@ -844,7 +844,7 @@
if (ast_exists_extension(NULL, myc, mye, 1, NULL)) {
console_pvt_lock(pvt);
pvt->hookstate = 1;
- console_new(pvt, mye, myc, AST_STATE_RINGING, NULL);
+ console_new(pvt, mye, myc, AST_STATE_RINGING, NULL, NULL);
console_pvt_unlock(pvt);
} else
ast_cli(a->fd, "No such extension '%s' in context '%s'\n", mye, myc);
Modified: trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=410158&r1=410157&r2=410158
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Fri Mar 7 09:47:55 2014
@@ -969,7 +969,7 @@
}
-static struct ast_channel *dahdi_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause);
+static struct ast_channel *dahdi_request(const char *type, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause);
static int dahdi_digit_begin(struct ast_channel *ast, char digit);
static int dahdi_digit_end(struct ast_channel *ast, char digit, unsigned int duration);
static int dahdi_sendtext(struct ast_channel *c, const char *text);
@@ -2103,9 +2103,9 @@
*
* \param callid_created value returned from ast_callid_threadstorage_auto()
*/
-static struct ast_channel *dahdi_new_callid_clean(struct dahdi_pvt *i, int state, int startpbx, int idx, int law, const char *linked, struct ast_callid *callid, int callid_created);
-
-static struct ast_channel *dahdi_new(struct dahdi_pvt *i, int state, int startpbx, int idx, int law, const char *linkedid, struct ast_callid *callid);
+static struct ast_channel *dahdi_new_callid_clean(struct dahdi_pvt *i, int state, int startpbx, int idx, int law, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, struct ast_callid *callid, int callid_created);
+
+static struct ast_channel *dahdi_new(struct dahdi_pvt *i, int state, int startpbx, int idx, int law, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, struct ast_callid *callid);
static struct ast_channel *my_new_analog_ast_channel(void *pvt, int state, int startpbx, enum analog_sub sub, const struct ast_channel *requestor)
{
@@ -2114,7 +2114,7 @@
struct dahdi_pvt *p = pvt;
int dsub = analogsub_to_dahdisub(sub);
- return dahdi_new_callid_clean(p, state, startpbx, dsub, 0, requestor ? ast_channel_linkedid(requestor) : "", callid, callid_created);
+ return dahdi_new_callid_clean(p, state, startpbx, dsub, 0, NULL, requestor, callid, callid_created);
}
#if defined(HAVE_PRI) || defined(HAVE_SS7)
@@ -2129,7 +2129,7 @@
#endif /* defined(HAVE_PRI) || defined(HAVE_SS7) */
#if defined(HAVE_PRI)
-static struct ast_channel *my_new_pri_ast_channel(void *pvt, int state, enum sig_pri_law law, char *exten, const struct ast_channel *requestor)
+static struct ast_channel *my_new_pri_ast_channel(void *pvt, int state, enum sig_pri_law law, char *exten, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor)
{
struct dahdi_pvt *p = pvt;
int audio;
@@ -2172,7 +2172,7 @@
break;
}
- return dahdi_new_callid_clean(p, state, 0, SUB_REAL, newlaw, requestor ? ast_channel_linkedid(requestor) : "", callid, callid_created);
+ return dahdi_new_callid_clean(p, state, 0, SUB_REAL, newlaw, assignedids, requestor, callid, callid_created);
}
#endif /* defined(HAVE_PRI) */
@@ -3030,7 +3030,7 @@
* \retval ast_channel on success.
* \retval NULL on error.
*/
-static struct ast_channel *my_new_ss7_ast_channel(void *pvt, int state, enum sig_ss7_law law, char *exten, const struct ast_channel *requestor)
+static struct ast_channel *my_new_ss7_ast_channel(void *pvt, int state, enum sig_ss7_law law, char *exten, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor)
{
struct dahdi_pvt *p = pvt;
int audio;
@@ -3063,7 +3063,7 @@
newlaw = DAHDI_LAW_MULAW;
break;
}
- return dahdi_new_callid_clean(p, state, 0, SUB_REAL, newlaw, requestor ? ast_channel_linkedid(requestor) : "", callid, callid_created);
+ return dahdi_new_callid_clean(p, state, 0, SUB_REAL, newlaw, assignedids, requestor, callid, callid_created);
}
#endif /* defined(HAVE_SS7) */
@@ -3553,7 +3553,7 @@
}
if (!p->mfcr2_accept_on_offer) {
/* The user wants us to start the PBX thread right away without accepting the call first */
- c = dahdi_new(p, AST_STATE_RING, 1, SUB_REAL, DAHDI_LAW_ALAW, NULL, callid);
+ c = dahdi_new(p, AST_STATE_RING, 1, SUB_REAL, DAHDI_LAW_ALAW, NULL, NULL, callid);
if (c) {
/* Done here, don't disable reading now since we still need to generate MF tones to accept
the call or reject it and detect the tone off condition of the other end, all of this
@@ -3607,7 +3607,7 @@
}
goto dahdi_r2_on_call_accepted_cleanup;
}
- c = dahdi_new(p, AST_STATE_RING, 1, SUB_REAL, DAHDI_LAW_ALAW, NULL, callid);
+ c = dahdi_new(p, AST_STATE_RING, 1, SUB_REAL, DAHDI_LAW_ALAW, NULL, NULL, callid);
if (c) {
/* chan_dahdi will take care of reading from now on in the PBX thread, tell the
library to forget about it */
@@ -7784,7 +7784,7 @@
*/
ast_mutex_unlock(&p->lock);
ast_channel_unlock(ast);
- chan = dahdi_new(p, AST_STATE_RESERVED, 0, SUB_THREEWAY, 0, NULL, callid);
+ chan = dahdi_new(p, AST_STATE_RESERVED, 0, SUB_THREEWAY, 0, NULL, NULL, callid);
ast_channel_lock(ast);
ast_mutex_lock(&p->lock);
if (p->dahditrcallerid) {
@@ -8860,16 +8860,16 @@
return chan_name;
}
-static struct ast_channel *dahdi_new_callid_clean(struct dahdi_pvt *i, int state, int startpbx, int idx, int law, const char *linkedid, struct ast_callid *callid, int callid_created)
-{
- struct ast_channel *new_channel = dahdi_new(i, state, startpbx, idx, law, linkedid, callid);
+static struct ast_channel *dahdi_new_callid_clean(struct dahdi_pvt *i, int state, int startpbx, int idx, int law, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, struct ast_callid *callid, int callid_created)
+{
+ struct ast_channel *new_channel = dahdi_new(i, state, startpbx, idx, law, assignedids, requestor, callid);
ast_callid_threadstorage_auto_clean(callid, callid_created);
return new_channel;
}
-static struct ast_channel *dahdi_new(struct dahdi_pvt *i, int state, int startpbx, int idx, int law, const char *linkedid, struct ast_callid *callid)
+static struct ast_channel *dahdi_new(struct dahdi_pvt *i, int state, int startpbx, int idx, int law, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, struct ast_callid *callid)
{
struct ast_channel *tmp;
struct ast_format deflaw;
@@ -8899,7 +8899,7 @@
return NULL;
}
- tmp = ast_channel_alloc(0, state, i->cid_num, i->cid_name, i->accountcode, i->exten, i->context, linkedid, i->amaflags, "DAHDI/%s", ast_str_buffer(chan_name));
+ tmp = ast_channel_alloc(0, state, i->cid_num, i->cid_name, i->accountcode, i->exten, i->context, assignedids, requestor, i->amaflags, "DAHDI/%s", ast_str_buffer(chan_name));
ast_free(chan_name);
if (!tmp) {
return NULL;
@@ -10502,7 +10502,7 @@
restore_gains(mtd->pvt);
mtd->pvt->ringt = mtd->pvt->ringt_base;
- if ((chan = dahdi_new(mtd->pvt, AST_STATE_RING, 0, SUB_REAL, 0, NULL, callid))) {
+ if ((chan = dahdi_new(mtd->pvt, AST_STATE_RING, 0, SUB_REAL, 0, NULL, NULL, callid))) {
int result;
if (dahdi_analog_lib_handles(mtd->pvt->sig, mtd->pvt->radio, mtd->pvt->oprmode)) {
@@ -10929,7 +10929,7 @@
dahdi_ec_enable(i);
/* The channel is immediately up. Start right away */
res = tone_zone_play_tone(i->subs[SUB_REAL].dfd, DAHDI_TONE_RINGTONE);
- chan = dahdi_new(i, AST_STATE_RING, 1, SUB_REAL, 0, NULL, callid);
+ chan = dahdi_new(i, AST_STATE_RING, 1, SUB_REAL, 0, NULL, NULL, callid);
if (!chan) {
ast_log(LOG_WARNING, "Unable to start PBX on channel %d\n", i->channel);
[... 5047 lines stripped ...]
More information about the asterisk-commits
mailing list