git-svn-id: http://svn.openzap.org/svn/openzap/trunk@484 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Michael Jerris 2008-05-26 01:51:11 +00:00
parent 0fed9a582c
commit c0d5af7804
3 changed files with 9 additions and 9 deletions

View File

@ -1351,6 +1351,7 @@ static ZIO_SIGNAL_CB_FUNCTION(on_clear_channel_signal)
} }
break; break;
case ZAP_SIGEVENT_STOP: case ZAP_SIGEVENT_STOP:
case ZAP_SIGEVENT_RESTART:
{ {
while((session = zap_channel_get_session(sigmsg->channel, 0))) { while((session = zap_channel_get_session(sigmsg->channel, 0))) {
//switch_core_session_signal_lock(session); //switch_core_session_signal_lock(session);

View File

@ -599,13 +599,10 @@ static __inline__ void state_advance(zap_channel_t *zchan)
break; break;
case ZAP_CHANNEL_STATE_RESTART: case ZAP_CHANNEL_STATE_RESTART:
{ {
if (zchan->last_state != ZAP_CHANNEL_STATE_HANGUP && zchan->last_state != ZAP_CHANNEL_STATE_DOWN) { zchan->caller_data.hangup_cause = ZAP_CAUSE_NORMAL_UNSPECIFIED;
zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_HANGUP); sig.event_id = ZAP_SIGEVENT_RESTART;
} else { status = isdn_data->sig_cb(&sig);
sig.event_id = ZAP_SIGEVENT_RESTART; zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_DOWN);
status = isdn_data->sig_cb(&sig);
zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_DOWN);
}
} }
break; break;
case ZAP_CHANNEL_STATE_PROGRESS_MEDIA: case ZAP_CHANNEL_STATE_PROGRESS_MEDIA:

View File

@ -296,9 +296,9 @@ static void handle_call_start_ack(ss7bc_connection_t *mcon, ss7bc_event_t *event
} }
} }
printf("WTF BAD ACK CSid=%d span=%d chan=%d\n", event->call_setup_id, event->span+1,event->chan+1); //printf("WTF BAD ACK CSid=%d span=%d chan=%d\n", event->call_setup_id, event->span+1,event->chan+1);
if ((zchan = find_zchan(OUTBOUND_REQUESTS[event->call_setup_id].span, event, 1))) { if ((zchan = find_zchan(OUTBOUND_REQUESTS[event->call_setup_id].span, event, 1))) {
printf("WTF BAD ACK2 %d:%d (%d:%d) CSid=%d xtra_id=%d out=%d state=%s\n", zchan->span_id, zchan->chan_id, event->span+1,event->chan+1, event->call_setup_id, zchan->extra_id, zap_test_flag(zchan, ZAP_CHANNEL_OUTBOUND), zap_channel_state2str(zchan->state)); //printf("WTF BAD ACK2 %d:%d (%d:%d) CSid=%d xtra_id=%d out=%d state=%s\n", zchan->span_id, zchan->chan_id, event->span+1,event->chan+1, event->call_setup_id, zchan->extra_id, zap_test_flag(zchan, ZAP_CHANNEL_OUTBOUND), zap_channel_state2str(zchan->state));
} }
@ -448,9 +448,11 @@ static void handle_call_answer(zap_span_t *span, ss7bc_connection_t *mcon, ss7bc
} }
zap_mutex_unlock(zchan->mutex); zap_mutex_unlock(zchan->mutex);
} }
#if 0
if (!r) { if (!r) {
printf("WTF BAD ANSWER %d:%d (%d:%d) CSid=%d xtra_id=%d out=%d state=%s\n", zchan->span_id, zchan->chan_id, event->span+1,event->chan+1, event->call_setup_id, zchan->extra_id, zap_test_flag(zchan, ZAP_CHANNEL_OUTBOUND), zap_channel_state2str(zchan->state)); printf("WTF BAD ANSWER %d:%d (%d:%d) CSid=%d xtra_id=%d out=%d state=%s\n", zchan->span_id, zchan->chan_id, event->span+1,event->chan+1, event->call_setup_id, zchan->extra_id, zap_test_flag(zchan, ZAP_CHANNEL_OUTBOUND), zap_channel_state2str(zchan->state));
} }
#endif
} else { } else {
zap_log(ZAP_LOG_CRIT, "ANSWER CANT FIND A CHAN %d:%d\n", event->span+1,event->chan+1); zap_log(ZAP_LOG_CRIT, "ANSWER CANT FIND A CHAN %d:%d\n", event->span+1,event->chan+1);
} }