From c0d5af780403cfb92a29087b3fae0bf22e424235 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 26 May 2008 01:51:11 +0000 Subject: [PATCH] update git-svn-id: http://svn.openzap.org/svn/openzap/trunk@484 a93c3328-9c30-0410-af19-c9cd2b2d52af --- libs/freetdm/mod_openzap/mod_openzap.c | 1 + libs/freetdm/src/zap_isdn.c | 11 ++++------- libs/freetdm/src/zap_ss7_boost.c | 6 ++++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libs/freetdm/mod_openzap/mod_openzap.c b/libs/freetdm/mod_openzap/mod_openzap.c index 24d093f49e..318ed6e4a9 100644 --- a/libs/freetdm/mod_openzap/mod_openzap.c +++ b/libs/freetdm/mod_openzap/mod_openzap.c @@ -1351,6 +1351,7 @@ static ZIO_SIGNAL_CB_FUNCTION(on_clear_channel_signal) } break; case ZAP_SIGEVENT_STOP: + case ZAP_SIGEVENT_RESTART: { while((session = zap_channel_get_session(sigmsg->channel, 0))) { //switch_core_session_signal_lock(session); diff --git a/libs/freetdm/src/zap_isdn.c b/libs/freetdm/src/zap_isdn.c index f6f254627a..c0811fb9dd 100644 --- a/libs/freetdm/src/zap_isdn.c +++ b/libs/freetdm/src/zap_isdn.c @@ -599,13 +599,10 @@ static __inline__ void state_advance(zap_channel_t *zchan) break; case ZAP_CHANNEL_STATE_RESTART: { - if (zchan->last_state != ZAP_CHANNEL_STATE_HANGUP && zchan->last_state != ZAP_CHANNEL_STATE_DOWN) { - zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_HANGUP); - } else { - sig.event_id = ZAP_SIGEVENT_RESTART; - status = isdn_data->sig_cb(&sig); - zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_DOWN); - } + zchan->caller_data.hangup_cause = ZAP_CAUSE_NORMAL_UNSPECIFIED; + sig.event_id = ZAP_SIGEVENT_RESTART; + status = isdn_data->sig_cb(&sig); + zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_DOWN); } break; case ZAP_CHANNEL_STATE_PROGRESS_MEDIA: diff --git a/libs/freetdm/src/zap_ss7_boost.c b/libs/freetdm/src/zap_ss7_boost.c index 30979daefb..17a2cd7ed7 100644 --- a/libs/freetdm/src/zap_ss7_boost.c +++ b/libs/freetdm/src/zap_ss7_boost.c @@ -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))) { - 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); } +#if 0 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)); } +#endif } else { zap_log(ZAP_LOG_CRIT, "ANSWER CANT FIND A CHAN %d:%d\n", event->span+1,event->chan+1); }