From 4ff821ef766e4b5015f211281e3e851eb461a245 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 21 Feb 2006 19:36:51 +0000 Subject: [PATCH] wanpipe work git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@645 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_wanpipe/mod_wanpipe.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c b/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c index db6c41b3f6..d5ca077941 100644 --- a/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c +++ b/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c @@ -990,16 +990,20 @@ static int config_wanpipe(int reload) for(current_span = 1; current_span < MAX_SPANS; current_span++) { if (SPANS[current_span]) { - switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Launch span %d\n", current_span); + if (!SPANS[current_span]->l1) { SPANS[current_span]->l1 = PRI_LAYER_1_ULAW; } - sangoma_init_pri(&SPANS[current_span]->spri, - current_span, - SPANS[current_span]->dchan, - SPANS[current_span]->pswitch, - SPANS[current_span]->node, - globals.debug); + if (sangoma_init_pri(&SPANS[current_span]->spri, + current_span, + SPANS[current_span]->dchan, + SPANS[current_span]->pswitch, + SPANS[current_span]->node, + globals.debug)) { + switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Cannot launch span %d\n", current_span); + continue; + } + switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Launch span %d\n", current_span); pri_thread_launch(&SPANS[current_span]->spri); } }