]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
enable RBS events when CAS signaling is configured
authorMoises Silva <moy@sangoma.com>
Sun, 6 Sep 2009 05:28:26 +0000 (05:28 +0000)
committerMoises Silva <moy@sangoma.com>
Sun, 6 Sep 2009 05:28:26 +0000 (05:28 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@826 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/freetdm/src/ozmod/ozmod_wanpipe/ozmod_wanpipe.c

index afabfb0a0f478818e0fdcbd2187f77181ac6c653..3ac980f4b454c0230a0456e22a88f52c3ce0d966 100644 (file)
@@ -300,6 +300,17 @@ static unsigned wp_open_range(zap_span_t *span, unsigned spanno, unsigned start,
                                /* probably done by the driver but lets write defensive code this time */
                                sangoma_flush_bufs(chan->sockfd, &tdm_api);
 #else
+                               /* 
+                                * With wanpipe 3.4.4.2 I get failure even though the events are enabled, /var/log/messages said:
+                                * wanpipe4: WARNING: Event type 9 is already pending!
+                                * wanpipe4: Failed to add new fe event 09 ch_map=FFFFFFFF!
+                                * may be we should not send an error until that is fixed in the driver
+                                */
+                               if (sangoma_tdm_enable_rbs_events(chan->sockfd, &tdm_api, 100)) {
+                                       zap_log(ZAP_LOG_ERROR, "Failed to enable RBS/CAS events in device %d:%d fd:%d\n", chan->span_id, chan->chan_id, sockfd);
+                               }
+                               /* probably done by the driver but lets write defensive code this time */
+                               sangoma_tdm_flush_bufs(chan->sockfd, &tdm_api);
                                sangoma_tdm_write_rbs(chan->sockfd,&tdm_api, wanpipe_swap_bits(cas_bits));
 #endif
                        }
@@ -1093,5 +1104,5 @@ EX_DECLARE_DATA zap_module_t zap_module = {
  * c-basic-offset:4
  * End:
  * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 
  */