From 60ab93e36c95d28530434810962ef8b102c8691c Mon Sep 17 00:00:00 2001 From: David Yat Sin Date: Thu, 2 Dec 2010 14:25:23 -0500 Subject: [PATCH] freetdm: Fix for TON/NPI from default_caller_data ignored --- libs/freetdm/src/ftdm_io.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libs/freetdm/src/ftdm_io.c b/libs/freetdm/src/ftdm_io.c index 3dd1aa9ece..c0e45853d3 100644 --- a/libs/freetdm/src/ftdm_io.c +++ b/libs/freetdm/src/ftdm_io.c @@ -314,43 +314,43 @@ static ftdm_status_t ftdm_set_caller_data(ftdm_span_t *span, ftdm_caller_data_t return FTDM_FAIL; } - if (caller_data->dnis.plan == FTDM_NPI_INVALID) { + if (caller_data->dnis.plan >= FTDM_NPI_INVALID) { caller_data->dnis.plan = span->default_caller_data.dnis.plan; } - if (caller_data->dnis.type == FTDM_TON_INVALID) { + if (caller_data->dnis.type >= FTDM_TON_INVALID) { caller_data->dnis.type = span->default_caller_data.dnis.type; } - if (caller_data->cid_num.plan == FTDM_NPI_INVALID) { + if (caller_data->cid_num.plan >= FTDM_NPI_INVALID) { caller_data->cid_num.plan = span->default_caller_data.cid_num.plan; } - if (caller_data->cid_num.type == FTDM_TON_INVALID) { + if (caller_data->cid_num.type >= FTDM_TON_INVALID) { caller_data->cid_num.type = span->default_caller_data.cid_num.type; } - if (caller_data->ani.plan == FTDM_NPI_INVALID) { + if (caller_data->ani.plan >= FTDM_NPI_INVALID) { caller_data->ani.plan = span->default_caller_data.ani.plan; } - if (caller_data->ani.type == FTDM_TON_INVALID) { + if (caller_data->ani.type >= FTDM_TON_INVALID) { caller_data->ani.type = span->default_caller_data.ani.type; } - if (caller_data->rdnis.plan == FTDM_NPI_INVALID) { + if (caller_data->rdnis.plan >= FTDM_NPI_INVALID) { caller_data->rdnis.plan = span->default_caller_data.rdnis.plan; } - if (caller_data->rdnis.type == FTDM_NPI_INVALID) { + if (caller_data->rdnis.type >= FTDM_NPI_INVALID) { caller_data->rdnis.type = span->default_caller_data.rdnis.type; } - if (caller_data->bearer_capability == FTDM_INVALID_INT_PARM) { + if (caller_data->bearer_capability >= FTDM_INVALID_INT_PARM) { caller_data->bearer_capability = span->default_caller_data.bearer_capability; } - if (caller_data->bearer_layer1 == FTDM_INVALID_INT_PARM) { + if (caller_data->bearer_layer1 >= FTDM_INVALID_INT_PARM) { caller_data->bearer_layer1 = span->default_caller_data.bearer_layer1; }