mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
Fix editing accounts and add more descriptive information of why it fails.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16504 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -346,30 +346,38 @@ void FSHost::generalEventHandler(switch_event_t *event)
|
||||
return;
|
||||
|
||||
if (state == "TRYING") {
|
||||
acc.data()->setStatusPhrase(switch_event_get_header_nil(event, "Phrase"));
|
||||
acc.data()->setState(FSCOMM_GW_STATE_TRYING);
|
||||
emit accountStateChange(acc);
|
||||
} else if (state == "REGISTER") {
|
||||
acc.data()->setStatusPhrase(switch_event_get_header_nil(event, "Phrase"));
|
||||
acc.data()->setState(FSCOMM_GW_STATE_REGISTER);
|
||||
emit accountStateChange(acc);
|
||||
} else if (state == "REGED") {
|
||||
acc.data()->setStatusPhrase(switch_event_get_header_nil(event, "Phrase"));
|
||||
acc.data()->setState(FSCOMM_GW_STATE_REGED);
|
||||
emit accountStateChange(acc);
|
||||
} else if (state == "UNREGED") {
|
||||
acc.data()->setStatusPhrase(switch_event_get_header_nil(event, "Phrase"));
|
||||
acc.data()->setState(FSCOMM_GW_STATE_UNREGED);
|
||||
emit accountStateChange(acc);
|
||||
} else if (state == "UNREGISTER") {
|
||||
acc.data()->setStatusPhrase(switch_event_get_header_nil(event, "Phrase"));
|
||||
acc.data()->setState(FSCOMM_GW_STATE_UNREGISTER);
|
||||
emit accountStateChange(acc);
|
||||
} else if (state =="FAILED") {
|
||||
acc.data()->setStatusPhrase(switch_event_get_header_nil(event, "Phrase"));
|
||||
acc.data()->setState(FSCOMM_GW_STATE_FAILED);
|
||||
emit accountStateChange(acc);
|
||||
} else if (state == "FAIL_WAIT") {
|
||||
acc.data()->setState(FSCOMM_GW_STATE_FAIL_WAIT);
|
||||
emit accountStateChange(acc);
|
||||
} else if (state == "EXPIRED") {
|
||||
acc.data()->setStatusPhrase(switch_event_get_header_nil(event, "Phrase"));
|
||||
acc.data()->setState(FSCOMM_GW_STATE_EXPIRED);
|
||||
emit accountStateChange(acc);
|
||||
} else if (state == "NOREG") {
|
||||
acc.data()->setStatusPhrase(switch_event_get_header_nil(event, "Phrase"));
|
||||
acc.data()->setState(FSCOMM_GW_STATE_NOREG);
|
||||
emit accountStateChange(acc);
|
||||
}
|
||||
|
Reference in New Issue
Block a user