merged 956:1023 (partial merge - anything non-boost related)

git-svn-id: http://svn.openzap.org/svn/openzap/branches/sangoma_boost@1026 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Moises Silva committed 2010-02-09 22:01:15 +00:00
1 parent 0900125be4
commit 0d392527dc
13 files changed
+177 -66

No files matched your search

@@ -285,6 +285,15 @@ static unsigned wp_open_range(ftdm_span_t *span, unsigned spanno, unsigned start
//}
}
#ifdef LIBSANGOMA_VERSION
if (type == FTDM_CHAN_TYPE_FXS) {
if (sangoma_tdm_disable_ring_trip_detect_events(chan->sockfd, &tdm_api)) {
/* we had problems of on-hook/off-hook detection due to how ring trip events were handled
* if this fails, I believe we will still work ok as long as we dont handle them incorrectly */
ftdm_log(FTDM_LOG_WARNING, "Failed to disable ring trip events in channel s%dc%d\n", spanno, x);
}
}
#endif
#if 0
if (type == FTDM_CHAN_TYPE_FXS || type == FTDM_CHAN_TYPE_FXO) {
/* Enable FLASH/Wink Events */
@@ -379,6 +388,20 @@ static FIO_CONFIGURE_FUNCTION(wanpipe_configure)
} else {
wp_globals.flash_ms = num;
}
} else if (!strcasecmp(var, "ring_on_ms")) {
num = atoi(val);
if (num < 500 || num > 5000) {
ftdm_log(FTDM_LOG_WARNING, "invalid ring_on_ms at line %d (valid range 500 to 5000)\n", lineno);
} else {
wp_globals.ring_on_ms = num;
}
} else if (!strcasecmp(var, "ring_off_ms")) {
num = atoi(val);
if (num < 500 || num > 5000) {
ftdm_log(FTDM_LOG_WARNING, "invalid ring_off_ms at line %d (valid range 500 to 5000)\n", lineno);
} else {
wp_globals.ring_off_ms = num;
}
}
}
@@ -1003,11 +1026,14 @@ FIO_SPAN_NEXT_EVENT_FUNCTION(wanpipe_next_event)
event_id = tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_ring_state == WP_TDMAPI_EVENT_RING_PRESENT ? FTDM_OOB_RING_START : FTDM_OOB_RING_STOP;
}
break;
/*
disabled this ones when configuring, we don't need them, do we?
case WP_TDMAPI_EVENT_RING_TRIP_DETECT:
{
event_id = tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_ring_state == WP_TDMAPI_EVENT_RING_PRESENT ? FTDM_OOB_ONHOOK : FTDM_OOB_OFFHOOK;
}
break;
*/
case WP_TDMAPI_EVENT_RBS:
{
event_id = FTDM_OOB_CAS_BITS_CHANGE;