]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
try disabling ring trip events in fxs channels to avoid issue with calls being hung...
authorMoises Silva <moy@sangoma.com>
Wed, 3 Feb 2010 01:30:06 +0000 (01:30 +0000)
committerMoises Silva <moy@sangoma.com>
Wed, 3 Feb 2010 01:30:06 +0000 (01:30 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@1021 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/openzap/src/ozmod/ozmod_wanpipe/ozmod_wanpipe.c

index 8dad35dca5a391b8cce2bc7cb5d953657f48dff1..0ef2e0228776a635f3148faca9a46f56cb9d3572 100644 (file)
@@ -274,6 +274,15 @@ static unsigned wp_open_range(zap_span_t *span, unsigned spanno, unsigned start,
                                }
                        }
 
+#ifdef LIBSANGOMA_VERSION
+                       if (type == ZAP_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 */
+                                       zap_log(ZAP_LOG_WARNING, "Failed to disable ring trip events in channel s%dc%d\n", spanno, x);
+                               }
+                       }
+#endif
 #if 0
             if (type == ZAP_CHAN_TYPE_FXS || type == ZAP_CHAN_TYPE_FXO) {
                 /* Enable FLASH/Wink Events */
@@ -990,11 +999,14 @@ ZIO_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 ? ZAP_OOB_RING_START : ZAP_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 ? ZAP_OOB_ONHOOK : ZAP_OOB_OFFHOOK;
                                }
                                break;
+                               */
                        case WP_TDMAPI_EVENT_RBS:
                                {
                                        event_id = ZAP_OOB_CAS_BITS_CHANGE;