]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix sangoma caller-id issue
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 10 Feb 2009 16:43:16 +0000 (16:43 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 10 Feb 2009 16:43:16 +0000 (16:43 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@658 a93c3328-9c30-0410-af19-c9cd2b2d52af

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

index 3be93f2e01b06a1d6d41a67aa94f9dba32e4f980..4efdf6dc76f65ccdc751728059c673f40cf42eeb 100644 (file)
@@ -586,8 +586,7 @@ static ZIO_COMMAND_FUNCTION(wanpipe_command)
        case ZAP_COMMAND_OFFHOOK:
                {
                        tdm_api.wp_tdm_cmd.cmd = SIOC_WP_TDM_SET_EVENT;
-                       tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_type = zchan->span->start_type == ZAP_ANALOG_START_KEWL ? 
-                               WP_TDMAPI_EVENT_TXSIG_START : WP_TDMAPI_EVENT_TXSIG_KEWL;
+                       tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_type = WP_TDMAPI_EVENT_TXSIG_OFFHOOK;
                        tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_mode = WP_TDMAPI_EVENT_ENABLE;
                        if ((err = wp_tdm_cmd_exec(zchan, &tdm_api))) {
                                snprintf(zchan->last_error, sizeof(zchan->last_error), "OFFHOOK Failed");
@@ -611,8 +610,7 @@ static ZIO_COMMAND_FUNCTION(wanpipe_command)
        case ZAP_COMMAND_GENERATE_RING_ON:
                {
                        tdm_api.wp_tdm_cmd.cmd = SIOC_WP_TDM_SET_EVENT;
-                       tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_type = WP_TDMAPI_EVENT_RING;
-                       tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_mode = WP_TDMAPI_EVENT_ENABLE;
+                       tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_type = WP_TDMAPI_EVENT_TXSIG_START;
                        if ((err = wp_tdm_cmd_exec(zchan, &tdm_api))) {
                                snprintf(zchan->last_error, sizeof(zchan->last_error), "Ring Failed");
                                return ZAP_FAIL;
@@ -625,8 +623,7 @@ static ZIO_COMMAND_FUNCTION(wanpipe_command)
        case ZAP_COMMAND_GENERATE_RING_OFF:
                {
                        tdm_api.wp_tdm_cmd.cmd = SIOC_WP_TDM_SET_EVENT;
-                       tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_type = WP_TDMAPI_EVENT_RING;
-                       tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_mode = WP_TDMAPI_EVENT_DISABLE;
+                       tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_type = WP_TDMAPI_EVENT_TXSIG_OFFHOOK;
                        if ((err = wp_tdm_cmd_exec(zchan, &tdm_api))) {
                                snprintf(zchan->last_error, sizeof(zchan->last_error), "Ring-off Failed");
                                return ZAP_FAIL;
@@ -793,7 +790,7 @@ ZIO_SPAN_POLL_EVENT_FUNCTION(wanpipe_poll_event)
                        memset(&tdm_api, 0, sizeof(tdm_api));
                        if (zap_test_pflag(zchan, WP_RINGING)) {
                                tdm_api.wp_tdm_cmd.cmd = SIOC_WP_TDM_SET_EVENT;
-                               tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_type = WP_TDMAPI_EVENT_RING;
+                               tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_type = WP_TDMAPI_EVENT_TXSIG_OFFHOOK;
                                tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_mode = WP_TDMAPI_EVENT_DISABLE;
                                if ((err = wp_tdm_cmd_exec(zchan, &tdm_api))) {
                                        snprintf(zchan->last_error, sizeof(zchan->last_error), "Ring-off Failed");
@@ -803,7 +800,7 @@ ZIO_SPAN_POLL_EVENT_FUNCTION(wanpipe_poll_event)
                                zchan->ring_time = zap_current_time_in_ms() + wp_globals.ring_off_ms;
                        } else {
                                tdm_api.wp_tdm_cmd.cmd = SIOC_WP_TDM_SET_EVENT;
-                               tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_type = WP_TDMAPI_EVENT_RING;
+                               tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_type = WP_TDMAPI_EVENT_TXSIG_START;
                                tdm_api.wp_tdm_cmd.event.wp_tdm_api_event_mode = WP_TDMAPI_EVENT_ENABLE;
                                if ((err = wp_tdm_cmd_exec(zchan, &tdm_api))) {
                                        snprintf(zchan->last_error, sizeof(zchan->last_error), "Ring Failed");