]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tweak
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 22 Mar 2006 20:55:58 +0000 (20:55 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 22 Mar 2006 20:55:58 +0000 (20:55 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@901 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_channel.h
src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
src/switch_channel.c
src/switch_ivr.c

index 0884bbe7eb2c16c32d22b0ea02c93a3e11e75484..762f610708f25610fbc955232ddb5520896d7a6f 100644 (file)
@@ -275,9 +275,9 @@ SWITCH_DECLARE(char *) switch_channel_get_name(switch_channel *channel);
 /*!
   \brief Hangup a channel flagging it's state machine to end
   \param channel channel to hangup
-  \return SWITCH_STATUS_SUCCESS if channel state was set to hangup
+  \return the resulting channel state.
 */
-SWITCH_DECLARE(switch_status) switch_channel_hangup(switch_channel *channel);
+SWITCH_DECLARE(switch_channel_state) switch_channel_hangup(switch_channel *channel);
 
 /*!
   \brief Test for presence of DTMF on a given channel
index 14c2d9bcf8bb2d6e808241332a4b1dc047555384..266fadad00b48850909cbaf476e2b881e5becab6 100644 (file)
@@ -551,7 +551,8 @@ static switch_status wanpipe_outgoing_channel(switch_core_session *session, swit
                                                pri_sr_free(sr);
                                                return SWITCH_STATUS_GENERR;
                                        }
-                                       if ((tech_pvt->socket = sangoma_create_socket_intr(spri->span, channo)) < 0) {
+
+                                       if ((tech_pvt->socket = sangoma_open_tdmapi_span_chan(spri->span, channo)) < 0) {
                                                switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Can't open fd!\n");
                                                switch_core_session_destroy(new_session);
                                                pri_sr_free(sr);
@@ -1060,7 +1061,7 @@ static int on_ring(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri
                        memset(tech_pvt, 0, sizeof(*tech_pvt));
                        channel = switch_core_session_get_channel(session);
                        switch_core_session_set_private(session, tech_pvt);
-                       sprintf(name, "w%dg%d", spri->span, event->ring.channel);
+                       sprintf(name, "s%dc%d", spri->span, event->ring.channel);
                        switch_channel_set_name(channel, name);
 
                } else {
@@ -1095,7 +1096,7 @@ static int on_ring(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri
                tech_pvt->callno = event->ring.channel;
                tech_pvt->span = spri->span;
 
-               if ((fd = sangoma_create_socket_intr(spri->span, event->ring.channel)) < 0) {
+               if ((fd = sangoma_open_tdmapi_span_chan(spri->span, event->ring.channel)) < 0) {
                        switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Can't open fd!\n");
                }
                //sangoma_tdm_set_hw_period(fd, &tdm_api, 480);
@@ -1142,7 +1143,7 @@ static int on_restart(struct sangoma_pri *spri, sangoma_pri_event_t event_type,
                switch_channel_hangup(channel);
        }
        
-       if ((fd = sangoma_create_socket_intr(spri->span, event->restart.channel)) < 0) {
+       if ((fd = sangoma_open_tdmapi_span_chan(spri->span, event->restart.channel)) < 0) {
                switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Can't open fd [%s]!\n", strerror(errno));
        } else {
                close(fd);
index ea738f49387ac4913b706284730d112e63c15ed5..3acbdd81048fd89dee8358c031374a6907847a25 100644 (file)
@@ -556,7 +556,7 @@ SWITCH_DECLARE(switch_caller_extension *) switch_channel_get_caller_extension(sw
 }
 
 
-SWITCH_DECLARE(switch_status) switch_channel_hangup(switch_channel *channel)
+SWITCH_DECLARE(switch_channel_state) switch_channel_hangup(switch_channel *channel)
 {
        assert(channel != NULL);
        if (channel->state < CS_HANGUP) {
index 35758f1c50cef6fe60fa0d611ed1b178a35ed807..98853073623866c10aba695c9591605a9bea9428 100644 (file)
@@ -877,7 +877,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_multi_threaded_bridge(switch_core_sessi
        other_audio_thread.objs[0] = session;
        other_audio_thread.objs[1] = peer_session;
        other_audio_thread.objs[2] = &stream_id;
-       other_audio_thread.objs[3] = dtmf_callback;
+       other_audio_thread.objs[3] = (void *) dtmf_callback;
        other_audio_thread.objs[4] = session_data;
        other_audio_thread.objs[5] = &this_audio_thread.running;
        other_audio_thread.running = 5;
@@ -885,7 +885,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_multi_threaded_bridge(switch_core_sessi
        this_audio_thread.objs[0] = peer_session;
        this_audio_thread.objs[1] = session;
        this_audio_thread.objs[2] = &stream_id;
-       this_audio_thread.objs[3] = dtmf_callback;
+       this_audio_thread.objs[3] = (void *) dtmf_callback;
        this_audio_thread.objs[4] = peer_session_data;
        this_audio_thread.objs[5] = &other_audio_thread.running;
        this_audio_thread.running = 2;