diff options
author | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-08-25 22:59:15 +0000 |
---|---|---|
committer | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-08-25 22:59:15 +0000 |
commit | 7637df742866b016096ca0714219410cb74f1596 (patch) | |
tree | 98b6b7d64e477d1e8820a63df07ddb52759552e9 /channels/chan_sip.c | |
parent | 0ae369281a2aab6d5928494f931fcf0f2c83e4f5 (diff) |
Merged revisions 283595 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r283595 | dvossel | 2010-08-25 17:57:56 -0500 (Wed, 25 Aug 2010) | 14 lines
Merged revisions 283594 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
........
r283594 | dvossel | 2010-08-25 17:56:42 -0500 (Wed, 25 Aug 2010) | 7 lines
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: http://svn.digium.com/svn/asterisk/trunk@283596 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 9019b056b..828778ba5 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -11688,8 +11688,14 @@ static void state_notify_build_xml(int state, int full, const char *exten, const /* 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", + exten, p->callid, p->theirtag, p->tag); + } else { + ast_str_append(tmp, 0, "<dialog id=\"%s\" call-id=\"pickup-%s\" direction=\"recipient\">\n", + 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. */ @@ -11700,7 +11706,7 @@ static void state_notify_build_xml(int state, int full, const char *exten, const "<identity>%s</identity>\n" "<target uri=\"%s\"/>\n" "</local>\n", - 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", exten); } @@ -20983,7 +20989,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; |