aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-17 01:16:59 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-17 01:16:59 +0000
commit3e0babd92c8559b713b2fa97487ae1992407fee4 (patch)
tree00aae052987b161a9e26dcca713e85ec186810e6 /channels
parent51fa205e0ad24641cfb0e7c3e12803c932266724 (diff)
Merged revisions 55073 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r55073 | file | 2007-02-16 20:09:50 -0500 (Fri, 16 Feb 2007) | 2 lines Allow chan_sip to handle attended transfers from a SIP phone that is sitting behind chan_agent. Yes folks, all it took was one line of code. (issue #8784 reported by pzieba) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@55086 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index f8d357dda..0eb2c270c 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -12413,7 +12413,11 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
} else if (sipmethod == SIP_NOTIFY) {
/* They got the notify, this is the end */
if (p->owner) {
- ast_log(LOG_WARNING, "Notify answer on an owned channel?\n");
+ if (p->refer) {
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Got 200 OK on NOTIFY for transfer\n");
+ } else
+ ast_log(LOG_WARNING, "Notify answer on an owned channel?\n");
/* ast_queue_hangup(p->owner); Disabled */
} else {
if (!p->subscribed && !p->refer)
@@ -12708,7 +12712,7 @@ static int attempt_transfer(struct sip_dual *transferer, struct sip_dual *target
ast_log(LOG_DEBUG, "-- No target second channel ---\n");
ast_log(LOG_DEBUG, "-- END Sip transfer:--------------------\n");
}
- if (transferer->chan2) { /* We have a bridge on the transferer's channel */
+ if (transferer->chan2 && (ast_bridged_channel(transferer->chan2) == transferer->chan2->_bridge)) { /* We have a bridge on the transferer's channel */
peera = transferer->chan1; /* Transferer - PBX -> transferee channel * the one we hangup */
peerb = target->chan1; /* Transferer - PBX -> target channel - This will get lost in masq */
peerc = transferer->chan2; /* Asterisk to Transferee */