[asterisk-commits] mmichelson: branch mmichelson/sip_attended_transfer r387625 - /team/mmichelso...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri May 3 17:04:54 CDT 2013
Author: mmichelson
Date: Fri May 3 17:04:53 2013
New Revision: 387625
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=387625
Log:
Handle transfer failure cases for attended transfers.
Modified:
team/mmichelson/sip_attended_transfer/channels/chan_sip.c
Modified: team/mmichelson/sip_attended_transfer/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/sip_attended_transfer/channels/chan_sip.c?view=diff&rev=387625&r1=387624&r2=387625
==============================================================================
--- team/mmichelson/sip_attended_transfer/channels/chan_sip.c (original)
+++ team/mmichelson/sip_attended_transfer/channels/chan_sip.c Fri May 3 17:04:53 2013
@@ -26122,13 +26122,25 @@
switch (transfer_res) {
case AST_BRIDGE_TRANSFER_SUCCESS:
+ transferer->refer->status = REFER_200OK;
transmit_notify_with_sipfrag(transferer, seqno, "200 OK", TRUE);
append_history(transferer, "Xfer", "Refer succeeded");
- transferer->refer->status = REFER_200OK;
- break;
+ return 1;
case AST_BRIDGE_TRANSFER_FAIL:
+ transferer->refer->status = REFER_FAILED;
+ transmit_notify_with_sipfrag(transferer, seqno, "500 Internal Server Error", TRUE);
+ append_history(transferer, "Xfer", "Refer failed (internal error)");
+ return -1;
case AST_BRIDGE_TRANSFER_INVALID:
+ transferer->refer->status = REFER_FAILED;
+ transmit_notify_with_sipfrag(transferer, seqno, "503 Service Unavailable", TRUE);
+ append_history(transferer, "Xfer", "Refer failed (invalid bridge state)");
+ return -1;
case AST_BRIDGE_TRANSFER_NOT_PERMITTED:
+ transferer->refer->status = REFER_FAILED;
+ transmit_notify_with_sipfrag(transferer, seqno, "403 Forbidden", TRUE);
+ append_history(transferer, "Xfer", "Refer failed (operation not permitted)");
+ return -1;
default:
break;
}
More information about the asterisk-commits
mailing list