aboutsummaryrefslogtreecommitdiffstats
path: root/channels/misdn
diff options
context:
space:
mode:
authorcrichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-12 09:45:36 +0000
committercrichter <crichter@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-12 09:45:36 +0000
commit0a43dfc9b04638ce189d3c97030ae1d87d3fd838 (patch)
treeaa8e2721463061be5c8e9f9ac1d3c1a29c48854a /channels/misdn
parent6e4c3714c8b8f476cb2f177d672af5b381e2920c (diff)
aded ntkeepcalls option, to avoid droƃpping calls when the L2 goes down on a PTP link. There are some pbx which do turn off the L1 for a very short while and restart it immediately. normally T310 should be started and after 10 seconds or so the calls should be dropped, this is a simple fix wihtout this timer.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89169 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/misdn')
-rw-r--r--channels/misdn/chan_misdn_config.h1
-rw-r--r--channels/misdn/isdn_lib.c18
-rw-r--r--channels/misdn/isdn_lib.h2
3 files changed, 20 insertions, 1 deletions
diff --git a/channels/misdn/chan_misdn_config.h b/channels/misdn/chan_misdn_config.h
index 5ced27158..f675704c0 100644
--- a/channels/misdn/chan_misdn_config.h
+++ b/channels/misdn/chan_misdn_config.h
@@ -97,6 +97,7 @@ enum misdn_cfg_elements {
MISDN_GEN_DYNAMIC_CRYPT, /* int (bool) */
MISDN_GEN_CRYPT_PREFIX, /* char[] */
MISDN_GEN_CRYPT_KEYS, /* char[] */
+ MISDN_GEN_NTKEEPCALLS, /* int (bool) */
MISDN_GEN_NTDEBUGFLAGS, /* int */
MISDN_GEN_NTDEBUGFILE, /* char[] */
MISDN_GEN_LAST
diff --git a/channels/misdn/isdn_lib.c b/channels/misdn/isdn_lib.c
index 959a2a888..ae87a0e94 100644
--- a/channels/misdn/isdn_lib.c
+++ b/channels/misdn/isdn_lib.c
@@ -2743,12 +2743,14 @@ static int handle_l1(msg_t *msg)
case PH_DEACTIVATE | CONFIRM:
case PH_DEACTIVATE | INDICATION:
cb_log (3, stack->port, "L1: PH L1Link Down! \n");
-
+
+#if 0
for (i=0; i<=stack->b_num; i++) {
if (global_state == MISDN_INITIALIZED) {
cb_event(EVENT_CLEANUP, &stack->bc[i], glob_mgr->user_data);
}
}
+#endif
if (stack->nt) {
if (stack->nst.l1_l2(&stack->nst, msg))
@@ -2850,7 +2852,9 @@ static int handle_mgmt(msg_t *msg)
case SSTATUS_L1_DEACTIVATED:
cb_log(3, 0, "MGMT: SSTATUS: L1_DEACTIVATED \n");
stack->l1link=0;
+#if 0
clear_l3(stack);
+#endif
break;
case SSTATUS_L2_ESTABLISHED:
@@ -3857,6 +3861,18 @@ int misdn_lib_maxports_get() { /** BE AWARE WE HAVE NO CB_LOG HERE! **/
}
+void misdn_lib_nt_keepcalls( int kc)
+{
+#ifdef FEATURE_NET_KEEPCALLS
+ if (kc) {
+ struct misdn_stack *stack=get_misdn_stack();
+ for ( ; stack; stack=stack->next) {
+ stack->nst.feature |= FEATURE_NET_KEEPCALLS;
+ }
+ }
+#endif
+}
+
void misdn_lib_nt_debug_init( int flags, char *file )
{
int static init=0;
diff --git a/channels/misdn/isdn_lib.h b/channels/misdn/isdn_lib.h
index f8deb910f..22f5d9ff6 100644
--- a/channels/misdn/isdn_lib.h
+++ b/channels/misdn/isdn_lib.h
@@ -381,6 +381,8 @@ struct misdn_lib_iface {
/***** USER IFACE **********/
+void misdn_lib_nt_keepcalls(int kc);
+
void misdn_lib_nt_debug_init( int flags, char *file );
int misdn_lib_init(char *portlist, struct misdn_lib_iface* iface, void *user_data);