diff options
author | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-07 23:46:41 +0000 |
---|---|---|
committer | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-07 23:46:41 +0000 |
commit | c25499d6c75ea145820465178ef982d256432bc6 (patch) | |
tree | de5d3b24e69a5cd86813ecf37bdeb5c9f87059a9 /channels/chan_mgcp.c | |
parent | b3c737f0114f072f2c01eab99cfd6265fd6a1264 (diff) |
These mods are to solve the problem in bug 7506. It's a lot of rework to solve a fairly small problem... such is life.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47303 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_mgcp.c')
-rw-r--r-- | channels/chan_mgcp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index 9c7c26e13..3ff791a6f 100644 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -1427,7 +1427,7 @@ static struct ast_channel *mgcp_new(struct mgcp_subchannel *sub, int state) struct mgcp_endpoint *i = sub->parent; int fmt; - tmp = ast_channel_alloc(1); + tmp = ast_channel_alloc(1, state, i->cid_num, i->cid_name, "MGCP/%s@%s-%d", i->name, i->parent->name, sub->id); if (tmp) { tmp->tech = &mgcp_tech; tmp->nativeformats = i->capability; @@ -1445,7 +1445,6 @@ static struct ast_channel *mgcp_new(struct mgcp_subchannel *sub, int state) } else { i->dsp = NULL; } - ast_setstate(tmp, state); if (state == AST_STATE_RING) tmp->rings = 1; tmp->writeformat = fmt; @@ -1468,7 +1467,7 @@ static struct ast_channel *mgcp_new(struct mgcp_subchannel *sub, int state) ast_copy_string(tmp->exten, i->exten, sizeof(tmp->exten)); /* Don't use ast_set_callerid() here because it will - * generate a NewCallerID event before the NewChannel event */ + * generate a needless NewCallerID event */ tmp->cid.cid_num = ast_strdup(i->cid_num); tmp->cid.cid_ani = ast_strdup(i->cid_num); tmp->cid.cid_name = ast_strdup(i->cid_name); |