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_skinny.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_skinny.c')
-rw-r--r-- | channels/chan_skinny.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index 2fb6d1203..599101286 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -2700,7 +2700,7 @@ static struct ast_channel *skinny_new(struct skinny_line *l, int state) struct skinny_device *d = l->parent; int fmt; - tmp = ast_channel_alloc(1); + tmp = ast_channel_alloc(1, state, l->cid_num, l->cid_name, "Skinny/%s@%s-%d", l->name, d->name, callnums); if (!tmp) { ast_log(LOG_WARNING, "Unable to allocate channel structure\n"); return NULL; @@ -2732,11 +2732,9 @@ static struct ast_channel *skinny_new(struct skinny_line *l, int state) fmt = ast_best_codec(tmp->nativeformats); if (skinnydebug) ast_verbose("skinny_new: tmp->nativeformats=%d fmt=%d\n", tmp->nativeformats, fmt); - ast_string_field_build(tmp, name, "Skinny/%s@%s-%d", l->name, d->name, sub->callid); if (sub->rtp) { tmp->fds[0] = ast_rtp_fd(sub->rtp); } - ast_setstate(tmp, state); if (state == AST_STATE_RING) { tmp->rings = 1; } @@ -2762,7 +2760,7 @@ static struct ast_channel *skinny_new(struct skinny_line *l, int state) ast_copy_string(tmp->exten, l->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(l->cid_num); tmp->cid.cid_ani = ast_strdup(l->cid_num); tmp->cid.cid_name = ast_strdup(l->cid_name); |