diff options
author | Steve Murphy <murf@digium.com> | 2007-04-10 05:41:34 +0000 |
---|---|---|
committer | Steve Murphy <murf@digium.com> | 2007-04-10 05:41:34 +0000 |
commit | ecaf7819337745bba5fd6a4a3a031ba2c77da331 (patch) | |
tree | 9a564f15ac25870f7fe98c097760dd5729177206 /channels/chan_sip.c | |
parent | be874b92d36bb654b80ecd74ea494d7ea5850b81 (diff) |
Merged revisions 60989 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r60989 | murf | 2007-04-09 12:32:07 -0600 (Mon, 09 Apr 2007) | 1 line
This is a big improvement over the current CDR fixes. It may still need refinement, but this won't have as many folks bothered.
This also adds the mods from 1.4/r.61136;
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 5c3cac5f5..dd363276e 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4091,8 +4091,7 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, const char *tit sip_pvt_unlock(i); /* Don't hold a sip pvt lock while we allocate a channel */ - - tmp = ast_channel_alloc(1, state, i->cid_num, i->cid_name, "SIP/%s-%08x", my_name, (int)(long) i); + tmp = ast_channel_alloc(1, state, i->cid_num, i->cid_name, i->accountcode, i->exten, i->context, i->amaflags, "SIP/%s-%08x", my_name, (int)(long) i); } if (!tmp) { @@ -4207,6 +4206,7 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, const char *tit ast_copy_string(tmp->context, i->context, sizeof(tmp->context)); ast_copy_string(tmp->exten, i->exten, sizeof(tmp->exten)); + /* Don't use ast_set_callerid() here because it will * generate an unnecessary NewCallerID event */ tmp->cid.cid_num = ast_strdup(i->cid_num); @@ -13302,8 +13302,8 @@ static int sip_park(struct ast_channel *chan1, struct ast_channel *chan2, struct /* Chan2m: The transferer, chan1m: The transferee */ pthread_t th; - transferee = ast_channel_alloc(0, AST_STATE_DOWN, 0, 0, "Parking/%s", chan1->name); - transferer = ast_channel_alloc(0, AST_STATE_DOWN, 0, 0, "SIPPeer/%s", chan2->name); + transferee = ast_channel_alloc(0, AST_STATE_DOWN, 0, 0, chan1->accountcode, chan1->exten, chan1->context, chan1->amaflags, "Parking/%s", chan1->name); + transferer = ast_channel_alloc(0, AST_STATE_DOWN, 0, 0, chan2->accountcode, chan2->exten, chan2->context, chan2->amaflags, "SIPPeer/%s", chan2->name); if ((!transferer) || (!transferee)) { if (transferee) { transferee->hangupcause = AST_CAUSE_SWITCH_CONGESTION; @@ -14116,7 +14116,6 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int /* Initialize our tag */ make_our_tag(p->tag, sizeof(p->tag)); - /* First invitation - create the channel */ c = sip_new(p, AST_STATE_DOWN, S_OR(p->username, NULL)); *recount = 1; |