small fix to avoid annoying veto warning when trying to move state from PROGRESS_MEDIA to PROGRESS
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@794 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
a9b4b1a82f
commit
14108c5724
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue