[asterisk-commits] rmudgett: branch rmudgett/misdn_facility r167530 - /team/rmudgett/misdn_facil...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jan 7 14:04:23 CST 2009
Author: rmudgett
Date: Wed Jan 7 14:04:22 2009
New Revision: 167530
URL: http://svn.digium.com/view/asterisk?view=rev&rev=167530
Log:
Merged from:
https://origsvn.digium.com/svn/asterisk/be/branches/C.2...
..........
r167526 | rmudgett | 2009-01-07 13:30:35 -0600 (Wed, 07 Jan 2009) | 4 lines
* Updated use of enum AST_CONNECTED_LINE_UPDATE_SOURCE values for
call transfer.
* Removed AST_CONNECTED_LINE_UPDATE_SOURCE_DIVERSION support.
Modified:
team/rmudgett/misdn_facility/channels/chan_misdn.c
Modified: team/rmudgett/misdn_facility/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/rmudgett/misdn_facility/channels/chan_misdn.c?view=diff&rev=167530&r1=167529&r2=167530
==============================================================================
--- team/rmudgett/misdn_facility/channels/chan_misdn.c (original)
+++ team/rmudgett/misdn_facility/channels/chan_misdn.c Wed Jan 7 14:04:22 2009
@@ -6091,6 +6091,7 @@
Is_PTMP = !misdn_lib_is_ptp(bc->port);
switch (ast->connected.source) {
+ case AST_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER:
case AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER:
ch = MISDN_ASTERISK_TECH_PVT(ast);
if (ch->state == MISDN_CONNECTED
@@ -6121,41 +6122,7 @@
}
}
break;
- case AST_CONNECTED_LINE_UPDATE_SOURCE_DIVERSION:
- /*
- * We should never get this, because it is not needed.
- * We should get an AST_CONTROL_REDIRECTING instead. .
- * However, it is defined so we will attempt to handle it.
- */
- if (Is_PTMP) {
- /* Send NOTIFY(call-is-diverting, redirecting.to data) */
- bc->redirecting.to_changed = 1;
- bc->notify_description_code = mISDN_NOTIFY_CODE_CALL_IS_DIVERTING;
- misdn_lib_send_event(bc, EVENT_NOTIFY);
-#if defined(AST_MISDN_ENHANCEMENTS)
- } else {
- /* Send DivertingLegInformation1 */
- bc->fac_out.Function = Fac_DivertingLegInformation1;
- bc->fac_out.u.DivertingLegInformation1.InvokeID = ++misdn_invoke_id;
- bc->fac_out.u.DivertingLegInformation1.DiversionReason = 0;/* unknown */
- bc->fac_out.u.DivertingLegInformation1.SubscriptionOption = 2;/* notificationWithDivertedToNr */
- bc->fac_out.u.DivertingLegInformation1.DivertedToPresent = 1;
- misdn_PresentedNumberUnscreened_fill(&bc->fac_out.u.DivertingLegInformation1.DivertedTo,
- &bc->redirecting.to);
- print_facility(&bc->fac_out, bc);
- misdn_lib_send_event(bc, EVENT_FACILITY);
-
- /* Send DivertingLegInformation3 */
- bc->fac_out.Function = Fac_DivertingLegInformation3;
- bc->fac_out.u.DivertingLegInformation3.InvokeID = ++misdn_invoke_id;
- bc->fac_out.u.DivertingLegInformation3.PresentationAllowedIndicator =
- bc->redirecting.to.presentation == 0 ? 1 : 0;
- print_facility(&bc->fac_out, bc);
- misdn_lib_send_event(bc, EVENT_FACILITY);
-#endif /* defined(AST_MISDN_ENHANCEMENTS) */
- }
- break;
- case AST_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER:
+ case AST_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER_ALERTING:
if (Is_PTMP) {
/* Send NOTIFY(transfer-alerting, redirecting.to data) */
bc->redirecting.to_changed = 1;
@@ -8870,8 +8837,8 @@
misdn_queue_connected_line_update(ch->ast, &party_id,
(bc->fac_in.u.EctInform.Status == 0 /* alerting */)
- ? AST_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER
- : AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER);
+ ? AST_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER_ALERTING
+ : AST_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER);
}
break;
#if 0 /* We don't handle this yet */
@@ -10114,7 +10081,6 @@
if (bc->redirecting.to_changed) {
bc->redirecting.to_changed = 0;
if (ch && ch->ast) {
-#if 1
switch (ch->state) {
case MISDN_ALERTING:
/* Call is deflecting after we have seen an ALERTING message */
@@ -10127,10 +10093,6 @@
} /* end switch */
misdn_copy_redirecting_to_ast(ch->ast, &bc->redirecting);
ast_queue_redirecting_update(ch->ast, &ch->ast->redirecting);
-#else
- misdn_queue_connected_line_update(ch->ast, &bc->redirecting.to,
- AST_CONNECTED_LINE_UPDATE_SOURCE_DIVERSION);
-#endif
}
}
break;
@@ -10139,7 +10101,7 @@
bc->redirecting.to_changed = 0;
if (ch && ch->ast) {
misdn_queue_connected_line_update(ch->ast, &bc->redirecting.to,
- AST_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER);
+ AST_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER_ALERTING);
}
}
break;
@@ -10148,7 +10110,7 @@
bc->redirecting.to_changed = 0;
if (ch && ch->ast) {
misdn_queue_connected_line_update(ch->ast, &bc->redirecting.to,
- AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER);
+ AST_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER);
}
}
break;
More information about the asterisk-commits
mailing list