]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
small fix to avoid annoying veto warning when trying to move state from PROGRESS_MEDI...
authorMoises Silva <moy@sangoma.com>
Sat, 15 Aug 2009 19:15:49 +0000 (19:15 +0000)
committerMoises Silva <moy@sangoma.com>
Sat, 15 Aug 2009 19:15:49 +0000 (19:15 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@794 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/openzap/src/ozmod/ozmod_libpri/ozmod_libpri.c

index 195af19ed90d88c9d4b0337895dc991c713f7928..b15f2dfac7cadb3d8e0cf4fec6954e4852a84ed8 100644 (file)
@@ -726,6 +726,11 @@ static int on_ringing(lpwrap_pri_t *spri, lpwrap_pri_event_t event_type, pri_eve
        
        if (zchan) {
                zap_log(ZAP_LOG_DEBUG, "-- Ringing on channel %d:%d\n", spri->span->span_id, pevent->ringing.channel);
+               /* we may get on_ringing even when we're already in ZAP_CHANNEL_STATE_PROGRESS_MEDIA */
+               if (zchan->state == ZAP_CHANNEL_STATE_PROGRESS_MEDIA) {
+                       /* dont try to move to STATE_PROGRESS to avoid annoying veto warning */
+                       return 0;
+               }
                zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_PROGRESS);
        } else {
                zap_log(ZAP_LOG_DEBUG, "-- Ringing on channel %d:%d %s but it's not in use?\n", spri->span->span_id,