freetdm: use ftdm_channel_hangup_with_cause for CAS channels (ftmod_r2)

This commit is contained in:
Moises Silva 2011-03-01 12:10:18 -05:00
parent 4793c697bd
commit 7e5befc2ba
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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;
}