From: David Vossel Date: Wed, 25 Aug 2010 22:56:42 +0000 (+0000) Subject: Add to and from tags to NOTIFY dialog-info xml body so pickup can occur. X-Git-Tag: 1.6.2.14-rc1~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8aa02d419f68a5b237c35cc9e0a6306e068c2cf8;p=thirdparty%2Fasterisk.git Add to and from tags to NOTIFY dialog-info xml body so pickup can occur. When pedantic mode is used, the dialog-info xml generated during a ringing event must contain the to and from tag values. Otherwise if a pickup occurs using INVITE with replaces, Astrisk will not be able to locate the subscription. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@283594 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 99c5aa095d..b70bff0ee8 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -11361,8 +11361,14 @@ static int transmit_state_notify(struct sip_pvt *p, int state, int full, int tim } /* We create a fake call-id which the phone will send back in an INVITE * Replaces header which we can grab and do some magic with. */ + if (sip_cfg.pedanticsipchecking) { + ast_str_append(&tmp, 0, "\n", + p->exten, p->callid, p->theirtag, p->tag); + } else { + ast_str_append(&tmp, 0, "\n", + p->exten, p->callid); + } ast_str_append(&tmp, 0, - "\n" "\n" /* See the limitations of this above. Luckily the phone seems to still be happy when these values are not correct. */ @@ -11373,7 +11379,7 @@ static int transmit_state_notify(struct sip_pvt *p, int state, int full, int tim "%s\n" "\n" "\n", - p->exten, p->callid, local_display, local_target, local_target, mto, mto); + local_display, local_target, local_target, mto, mto); } else { ast_str_append(&tmp, 0, "\n", p->exten); } @@ -20018,7 +20024,7 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int struct sip_pvt *subscription = NULL; replace_id += 7; /* Worst case we are looking at \0 */ - if ((subscription = get_sip_pvt_byid_locked(replace_id, NULL, NULL)) == NULL) { + if ((subscription = get_sip_pvt_byid_locked(replace_id, totag, fromtag)) == NULL) { ast_log(LOG_NOTICE, "Unable to find subscription with call-id: %s\n", replace_id); transmit_response_reliable(p, "481 Call Leg Does Not Exist (Replaces)", req); error = 1;