mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-12 23:40:04 +00:00
NC:
Added a sanity check on call start. In case of know sangoma_isupd boost errors Added Loop command to enable channel looping on CCR tests in ss7. Added hwec enable disable commands that are available in CLI git-svn-id: http://svn.openzap.org/svn/openzap/trunk@1053 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
82f46fd7f3
commit
d6fcb65606
@ -728,6 +728,21 @@ static void handle_call_start(zap_span_t *span, sangomabc_connection_t *mcon, sa
|
||||
zap_channel_t *zchan;
|
||||
|
||||
if (!(zchan = find_zchan(span, (sangomabc_short_event_t*)event, 0))) {
|
||||
if ((zchan = find_zchan(span, (sangomabc_short_event_t*)event, 1))) {
|
||||
int r;
|
||||
if (zchan->state == ZAP_CHANNEL_STATE_UP) {
|
||||
zap_log(ZAP_LOG_CRIT, "ZCHAN STATE UP -> Changed to TERMINATING %d:%d\n", event->span+1,event->chan+1);
|
||||
zap_set_state_r(zchan, ZAP_CHANNEL_STATE_TERMINATING, 0, r);
|
||||
} else if (zap_test_sflag(zchan, SFLAG_HANGUP)) {
|
||||
zap_log(ZAP_LOG_CRIT, "ZCHAN STATE HANGUP -> Changed to HANGUP COMPLETE %d:%d\n", event->span+1,event->chan+1);
|
||||
zap_set_state_r(zchan, ZAP_CHANNEL_STATE_HANGUP_COMPLETE, 0, r);
|
||||
} else {
|
||||
zap_log(ZAP_LOG_CRIT, "ZCHAN STATE INVALID %s on IN CALL %d:%d\n", zap_channel_state2str(zchan->state),event->span+1,event->chan+1);
|
||||
|
||||
}
|
||||
zap_set_sflag(zchan, SFLAG_SENT_FINAL_MSG);
|
||||
zchan=NULL;
|
||||
}
|
||||
zap_log(ZAP_LOG_CRIT, "START CANT FIND CHAN %d:%d\n", event->span+1,event->chan+1);
|
||||
goto error;
|
||||
}
|
||||
|
@ -585,21 +585,41 @@ static ZIO_COMMAND_FUNCTION(wanpipe_command)
|
||||
break;
|
||||
case ZAP_COMMAND_ENABLE_ECHOCANCEL:
|
||||
{
|
||||
//code me
|
||||
err=sangoma_tdm_enable_hwec(zchan->sockfd, &tdm_api);
|
||||
if (err) {
|
||||
snprintf(zchan->last_error, sizeof(zchan->last_error), "HWEC Enable Failed");
|
||||
return ZAP_FAIL;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ZAP_COMMAND_DISABLE_ECHOCANCEL:
|
||||
{
|
||||
//code me
|
||||
err=sangoma_tdm_disable_hwec(zchan->sockfd, &tdm_api);
|
||||
if (err) {
|
||||
snprintf(zchan->last_error, sizeof(zchan->last_error), "HWEC Disable Failed");
|
||||
return ZAP_FAIL;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ZAP_COMMAND_ENABLE_LOOP:
|
||||
{
|
||||
// code me
|
||||
#ifdef WP_API_FEATURE_LOOP
|
||||
err=sangoma_tdm_enable_loop(zchan->sockfd, &tdm_api);
|
||||
if (err) {
|
||||
snprintf(zchan->last_error, sizeof(zchan->last_error), "Loop Enable Failed");
|
||||
return ZAP_FAIL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
case ZAP_COMMAND_DISABLE_LOOP:
|
||||
{
|
||||
// code me
|
||||
#ifdef WP_API_FEATURE_LOOP
|
||||
err=sangoma_tdm_disable_loop(zchan->sockfd, &tdm_api);
|
||||
if (err) {
|
||||
snprintf(zchan->last_error, sizeof(zchan->last_error), "Loop Disable Failed");
|
||||
return ZAP_FAIL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
case ZAP_COMMAND_SET_INTERVAL:
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user