diff --git a/libs/freetdm/mod_freetdm/mod_freetdm.c b/libs/freetdm/mod_freetdm/mod_freetdm.c index a52abc0cec..4c8c12432a 100755 --- a/libs/freetdm/mod_freetdm/mod_freetdm.c +++ b/libs/freetdm/mod_freetdm/mod_freetdm.c @@ -493,7 +493,6 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session) switch (chantype) { case FTDM_CHAN_TYPE_FXO: case FTDM_CHAN_TYPE_EM: - case FTDM_CHAN_TYPE_CAS: { ftdm_channel_call_hangup(tech_pvt->ftdmchan); } @@ -510,6 +509,7 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session) } } break; + case FTDM_CHAN_TYPE_CAS: case FTDM_CHAN_TYPE_B: { ftdm_call_cause_t hcause = switch_channel_get_cause_q850(channel); @@ -521,8 +521,7 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session) break; default: { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Unhandled channel type %d for channel %s\n", chantype, - switch_channel_get_name(channel)); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Unhandled channel type %d for channel %s\n", chantype, switch_channel_get_name(channel)); } break; } diff --git a/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c b/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c index 46eb92fede..c47f97a50b 100755 --- a/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c +++ b/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c @@ -307,6 +307,7 @@ static openr2_call_disconnect_cause_t ftdm_r2_ftdm_cause_to_openr2_cause(ftdm_ch return OR2_CAUSE_NORMAL_CLEARING; case FTDM_CAUSE_USER_BUSY: + case FTDM_CAUSE_CALL_REJECTED: return OR2_CAUSE_BUSY_NUMBER; case FTDM_CAUSE_SWITCH_CONGESTION: @@ -334,7 +335,7 @@ static openr2_call_disconnect_cause_t ftdm_r2_ftdm_cause_to_openr2_cause(ftdm_ch return OR2_CAUSE_GLARE; } - ftdm_log_chan(fchan, FTDM_LOG_WARNING, "freetdm hangup cause %d mapped to openr2 cause %s\n", + ftdm_log_chan(fchan, FTDM_LOG_NOTICE, "freetdm hangup cause %d mapped to openr2 cause %s\n", fchan->caller_data.hangup_cause, openr2_proto_get_disconnect_string(OR2_CAUSE_UNSPECIFIED)); return OR2_CAUSE_UNSPECIFIED; }