summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2009-05-20 20:45:05 +0000
committerMark Michelson <mmichelson@digium.com>2009-05-20 20:45:05 +0000
commit56903a748528db95c5ef22fbc1a0ee0b94bab090 (patch)
tree5560e4cc81079683cceadbe8611f50673c448a28 /channels
parent8139c8ed4e15c5315b659208b4b3af0b153f77d2 (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: https://origsvn.digium.com/svn/asterisk/trunk@195798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c5
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",