summaryrefslogtreecommitdiff
path: root/channels/chan_skinny.c
diff options
context:
space:
mode:
authorSteve Murphy <murf@digium.com>2006-11-07 21:47:49 +0000
committerSteve Murphy <murf@digium.com>2006-11-07 21:47:49 +0000
commit908f176cf38eb1f81a3372a2ebf24ed17c75e8a6 (patch)
treec85e2036ae8d28edebee2af6cc055a51e39ba1da /channels/chan_skinny.c
parent7659f6d5240b03068adf9746b3dd2938d1ebb0fd (diff)
A fair number of changes for the sake of bug 7506
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_skinny.c')
-rw-r--r--channels/chan_skinny.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index bda495a82..cc086b0bf 100644
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -2699,7 +2699,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;
@@ -2731,11 +2731,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;
}
@@ -2757,7 +2755,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);