mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -137,7 +137,7 @@ static const char tdesc[] = "Local Proxy Channel Driver";
|
||||
|
||||
static struct ao2_container *locals;
|
||||
|
||||
static struct ast_channel *local_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause);
|
||||
static struct ast_channel *local_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 local_call(struct ast_channel *ast, const char *dest, int timeout);
|
||||
static int local_hangup(struct ast_channel *ast);
|
||||
static int local_devicestate(const char *data);
|
||||
@@ -869,7 +869,7 @@ static struct local_pvt *local_alloc(const char *data, struct ast_format_cap *ca
|
||||
}
|
||||
|
||||
/*! \brief Part of PBX interface */
|
||||
static struct ast_channel *local_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
|
||||
static struct ast_channel *local_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 local_pvt *p;
|
||||
struct ast_channel *chan;
|
||||
@@ -882,7 +882,7 @@ static struct ast_channel *local_request(const char *type, struct ast_format_cap
|
||||
}
|
||||
callid = ast_read_threadstorage_callid();
|
||||
chan = ast_unreal_new_channels(&p->base, &local_tech, AST_STATE_DOWN, AST_STATE_RING,
|
||||
p->exten, p->context, requestor, callid);
|
||||
p->exten, p->context, assignedids, requestor, callid);
|
||||
if (chan) {
|
||||
ao2_link(locals, p);
|
||||
}
|
||||
|
Reference in New Issue
Block a user