}
switch (bc->outgoing_colp) {
case 1:/* restricted */
- case 2:/* blocked */
bc->redirecting.to.presentation = 1;/* restricted */
break;
+ case 2:/* blocked */
+ /* Don't tell the remote party that the call was transferred. */
+ return;
default:
break;
}
bc->fac_out.u.EctInform.RedirectionPresent = 1;/* Must be present when status is active */
misdn_PresentedNumberUnscreened_fill(&bc->fac_out.u.EctInform.Redirection,
&bc->redirecting.to);
- switch (bc->outgoing_colp) {
- case 2:/* blocked */
- /* Block the number going out */
- bc->fac_out.u.EctInform.Redirection.Type = 1;/* presentationRestricted */
- break;
- default:
- break;
- }
/* Send message */
print_facility(&bc->fac_out, bc);
misdn_copy_redirecting_from_ast(bc, ast);
switch (bc->outgoing_colp) {
case 1:/* restricted */
- case 2:/* blocked */
bc->redirecting.to.presentation = 1;/* restricted */
break;
+ case 2:/* blocked */
+ /* Don't tell the remote party that the call was redirected. */
+ return;
default:
break;
}
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);
- switch (bc->outgoing_colp) {
- case 2:/* blocked */
- /* Block the number going out */
- bc->fac_out.u.DivertingLegInformation1.DivertedTo.Type = 1;/* presentationRestricted */
- break;
- default:
- break;
- }
print_facility(&bc->fac_out, bc);
misdn_lib_send_event(bc, EVENT_FACILITY);
}
}
#if defined(AST_MISDN_ENHANCEMENTS)
if (newbc->redirecting.from.number[0] && misdn_lib_is_ptp(port)) {
+ if (newbc->redirecting.count < 1) {
+ newbc->redirecting.count = 1;
+ }
+
/* Create DivertingLegInformation2 facility */
newbc->fac_out.Function = Fac_DivertingLegInformation2;
newbc->fac_out.u.DivertingLegInformation2.InvokeID = ++misdn_invoke_id;
- newbc->fac_out.u.DivertingLegInformation2.DiversionCounter =
- newbc->redirecting.count;
- newbc->fac_out.u.DivertingLegInformation2.DiversionReason =
- misdn_to_diversion_reason(newbc->redirecting.reason);
newbc->fac_out.u.DivertingLegInformation2.DivertingPresent = 1;
misdn_PresentedNumberUnscreened_fill(
&newbc->fac_out.u.DivertingLegInformation2.Diverting,
case 2:/* blocked */
/* Block the number going out */
newbc->fac_out.u.DivertingLegInformation2.Diverting.Type = 1;/* presentationRestricted */
+
+ /* Don't tell about any previous diversions or why for that matter. */
+ newbc->fac_out.u.DivertingLegInformation2.DiversionCounter = 1;
+ newbc->fac_out.u.DivertingLegInformation2.DiversionReason = 0;/* unknown */
break;
default:
+ newbc->fac_out.u.DivertingLegInformation2.DiversionCounter =
+ newbc->redirecting.count;
+ newbc->fac_out.u.DivertingLegInformation2.DiversionReason =
+ misdn_to_diversion_reason(newbc->redirecting.reason);
break;
}
newbc->fac_out.u.DivertingLegInformation2.OriginalCalledPresent = 0;
- if (1 < newbc->redirecting.count) {
+ if (1 < newbc->fac_out.u.DivertingLegInformation2.DiversionCounter) {
newbc->fac_out.u.DivertingLegInformation2.OriginalCalledPresent = 1;
newbc->fac_out.u.DivertingLegInformation2.OriginalCalled.Type = 2;/* numberNotAvailableDueToInterworking */
}