diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-20 20:45:05 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-20 20:45:05 +0000 |
commit | b8d22b76a5bce8790167109268afb5f5872c29f7 (patch) | |
tree | 5560e4cc81079683cceadbe8611f50673c448a28 /channels | |
parent | 2691874d8358dd3e03cc5ce34699737feb058756 (diff) |
Get rid of some duplicated code and correct a connected line error.
When receiving a 200 OK response to an INVITE, it was possible to transmit two
connected line updates instead of a single one. Furthermore, the second did not
have the proper information present.
Now the two have been combined into a single update and the correct information
is presented.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@195798 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index b2ad586dd..1f3f1554b 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -17466,7 +17466,7 @@ static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, stru ast_set_flag(&p->flags[0], SIP_PENDINGBYE); } - if (!req->ignore && p->owner && get_rpid(p, req)) { + if (!req->ignore && p->owner && (get_rpid(p, req) || !reinvite)) { /* Queue a connected line update */ ast_party_connected_line_init(&connected); connected.id.number = (char *) p->cid_num; @@ -17497,9 +17497,6 @@ static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, stru if (!req->ignore && p->owner) { if (!reinvite) { - struct ast_party_connected_line connected; - ast_party_connected_line_collect_caller(&connected, &p->owner->cid); - ast_channel_queue_connected_line_update(p->owner, &connected); ast_queue_control(p->owner, AST_CONTROL_ANSWER); if (sip_cfg.callevents) manager_event(EVENT_FLAG_SYSTEM, "ChannelUpdate", |