[asterisk-commits] dvossel: branch 1.6.2 r283594 - /branches/1.6.2/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Aug 25 17:56:46 CDT 2010
Author: dvossel
Date: Wed Aug 25 17:56:42 2010
New Revision: 283594
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=283594
Log:
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.
Modified:
branches/1.6.2/channels/chan_sip.c
Modified: branches/1.6.2/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/channels/chan_sip.c?view=diff&rev=283594&r1=283593&r2=283594
==============================================================================
--- branches/1.6.2/channels/chan_sip.c (original)
+++ branches/1.6.2/channels/chan_sip.c Wed Aug 25 17:56:42 2010
@@ -11361,8 +11361,14 @@
}
/* 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, "<dialog id=\"%s\" call-id=\"pickup-%s\" local-tag=\"%s\" remote-tag=\"%s\" direction=\"recipient\">\n",
+ p->exten, p->callid, p->theirtag, p->tag);
+ } else {
+ ast_str_append(&tmp, 0, "<dialog id=\"%s\" call-id=\"pickup-%s\" direction=\"recipient\">\n",
+ p->exten, p->callid);
+ }
ast_str_append(&tmp, 0,
- "<dialog id=\"%s\" call-id=\"pickup-%s\" direction=\"recipient\">\n"
"<remote>\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 @@
"<identity>%s</identity>\n"
"<target uri=\"%s\"/>\n"
"</local>\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, "<dialog id=\"%s\" direction=\"recipient\">\n", p->exten);
}
@@ -20018,7 +20024,7 @@
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;
More information about the asterisk-commits
mailing list