]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
push progress event up to mod_openzap on analog ring
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 11 Sep 2008 17:55:27 +0000 (17:55 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 11 Sep 2008 17:55:27 +0000 (17:55 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@555 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/openzap/mod_openzap/mod_openzap.c
libs/openzap/src/ozmod/ozmod_analog/ozmod_analog.c

index 9a1ac3423f1ac67172300f37b7d08525b4f7e7d6..ea57d8568820b6f8c515a25d7236a30f262555cc 100644 (file)
@@ -1158,6 +1158,15 @@ static ZIO_SIGNAL_CB_FUNCTION(on_fxs_signal)
                        }
                }
                break;
+    case ZAP_SIGEVENT_PROGRESS:
+               {
+                       if ((session = zap_channel_get_session(sigmsg->channel, 0))) {
+                               channel = switch_core_session_get_channel(session);
+                               switch_channel_mark_ring_ready(channel);
+                               switch_core_session_rwunlock(session);
+                       }
+               }
+               break;
     case ZAP_SIGEVENT_START:
                {
                        zap_clear_flag_locked(sigmsg->channel, ZAP_CHANNEL_HOLD);
index 167c230220c95c9dfa166be016ad71f7ee7a3910..a17d70e85ca1ff5072470a766ea2972285d374c8 100644 (file)
@@ -477,8 +477,18 @@ static void *zap_analog_channel_run(zap_thread_t *me, void *obj)
                                break;
                        case ZAP_CHANNEL_STATE_GENRING:
                                {
+                                       zap_sigmsg_t sig;
+
                                        send_caller_id(zchan);
                                        zap_channel_command(zchan, ZAP_COMMAND_GENERATE_RING_ON, NULL);
+
+                                       memset(&sig, 0, sizeof(sig));
+                                       sig.chan_id = zchan->chan_id;
+                                       sig.span_id = zchan->span_id;
+                                       sig.channel = zchan;
+                                       sig.event_id = ZAP_SIGEVENT_PROGRESS;
+                                       analog_data->sig_cb(&sig);
+                                       
                                }
                                break;
                        case ZAP_CHANNEL_STATE_GET_CALLERID: