diff options
Diffstat (limited to 'channels/chan_local.c')
-rw-r--r-- | channels/chan_local.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c index 329b9828e..df1a2c454 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -60,7 +60,7 @@ static struct ast_jb_conf g_jb_conf = { .impl = "", }; -static struct ast_channel *local_request(const char *type, int format, void *data, int *cause); +static struct ast_channel *local_request(const char *type, int format, const struct ast_channel *requestor, void *data, int *cause); static int local_digit_begin(struct ast_channel *ast, char digit); static int local_digit_end(struct ast_channel *ast, char digit, unsigned int duration); static int local_call(struct ast_channel *ast, char *dest, int timeout); @@ -780,7 +780,7 @@ static struct local_pvt *local_alloc(const char *data, int format) } /*! \brief Start new local channel */ -static struct ast_channel *local_new(struct local_pvt *p, int state) +static struct ast_channel *local_new(struct local_pvt *p, int state, const char *linkedid) { struct ast_channel *tmp = NULL, *tmp2 = NULL; int randnum = ast_random() & 0xffff, fmt = 0; @@ -798,8 +798,8 @@ static struct ast_channel *local_new(struct local_pvt *p, int state) ama = p->owner->amaflags; else ama = 0; - if (!(tmp = ast_channel_alloc(1, state, 0, 0, t, p->exten, p->context, ama, "Local/%s@%s-%04x;1", p->exten, p->context, randnum)) - || !(tmp2 = ast_channel_alloc(1, AST_STATE_RING, 0, 0, t, p->exten, p->context, ama, "Local/%s@%s-%04x;2", p->exten, p->context, randnum))) { + if (!(tmp = ast_channel_alloc(1, state, 0, 0, t, p->exten, p->context, linkedid, ama, "Local/%s@%s-%04x;1", p->exten, p->context, randnum)) + || !(tmp2 = ast_channel_alloc(1, AST_STATE_RING, 0, 0, t, p->exten, p->context, linkedid, ama, "Local/%s@%s-%04x;2", p->exten, p->context, randnum))) { if (tmp) { tmp = ast_channel_release(tmp); } @@ -843,14 +843,14 @@ static struct ast_channel *local_new(struct local_pvt *p, int state) } /*! \brief Part of PBX interface */ -static struct ast_channel *local_request(const char *type, int format, void *data, int *cause) +static struct ast_channel *local_request(const char *type, int format, const struct ast_channel *requestor, void *data, int *cause) { struct local_pvt *p = NULL; struct ast_channel *chan = NULL; /* Allocate a new private structure and then Asterisk channel */ if ((p = local_alloc(data, format))) { - if (!(chan = local_new(p, AST_STATE_DOWN))) { + if (!(chan = local_new(p, AST_STATE_DOWN, requestor ? requestor->linkedid : NULL))) { AST_LIST_LOCK(&locals); AST_LIST_REMOVE(&locals, p, list); AST_LIST_UNLOCK(&locals); |