summaryrefslogtreecommitdiffstats
path: root/action_efi.cpp
diff options
context:
space:
mode:
authorAndreas Eversberg2009-06-06 23:46:21 +0200
committerAndreas Eversberg2009-06-06 23:46:21 +0200
commit6bf7c7f9db360d6031417b012dcb0e90e2251cd6 (patch)
tree82b0e6d63e5ac6d50cee422f2ff2de6dea299b62 /action_efi.cpp
parentFixed disabling of DTMF using 'n' option of chan_lcr. (diff)
downloadlcr-6bf7c7f9db360d6031417b012dcb0e90e2251cd6.tar.gz
lcr-6bf7c7f9db360d6031417b012dcb0e90e2251cd6.tar.xz
lcr-6bf7c7f9db360d6031417b012dcb0e90e2251cd6.zip
gsm improvements
code cleanup modified: README modified: action.cpp modified: action_efi.cpp modified: action_vbox.cpp modified: alawulaw.c modified: bchannel.c modified: bootstrap.c modified: callerid.c modified: cause.c modified: chan_lcr.c modified: default/gsm.conf modified: dss1.cpp modified: gsm.cpp modified: gsm.h modified: gsm_conf.c modified: message.h
Diffstat (limited to 'action_efi.cpp')
-rw-r--r--action_efi.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/action_efi.cpp b/action_efi.cpp
index 57fdcc7..b0f3cad 100644
--- a/action_efi.cpp
+++ b/action_efi.cpp
@@ -30,8 +30,7 @@ void EndpointAppPBX::action_init_efi(void)
struct port_list *portlist = ea_endpoint->ep_portlist;
/* if no caller id */
- if (e_callerinfo.id[0] == '\0')
- {
+ if (e_callerinfo.id[0] == '\0') {
/* facility rejected */
message = message_create(ea_endpoint->ep_serial, portlist->port_id, EPOINT_TO_PORT, MESSAGE_DISCONNECT);
message->param.disconnectinfo.location = LOCATION_PRIVATE_LOCAL;
@@ -68,23 +67,20 @@ void EndpointAppPBX::efi_message_eof(void)
PDEBUG(DEBUG_EPOINT, "EPOINT(%d) terminal %s end of file during state: %d\n", ea_endpoint->ep_serial, e_ext.number, e_vbox_state);
- switch(e_efi_state)
- {
+ switch(e_efi_state) {
case EFI_STATE_HELLO:
e_efi_state = EFI_STATE_DIE;
set_tone_efi("die");
break;
case EFI_STATE_DIE:
- if (e_callerinfo.screen==INFO_SCREEN_USER)
- {
+ if (e_callerinfo.screen==INFO_SCREEN_USER) {
e_efi_state = EFI_STATE_BENUTZERDEFINIERTE;
set_tone_efi("benutzerdefinierte");
break;
}
// fall through
case EFI_STATE_BENUTZERDEFINIERTE:
- if (e_callerinfo.present==INFO_PRESENT_RESTRICTED)
- {
+ if (e_callerinfo.present==INFO_PRESENT_RESTRICTED) {
e_efi_state = EFI_STATE_UNTERDRUECKTE;
set_tone_efi("unterdrueckte");
break;
@@ -101,12 +97,10 @@ void EndpointAppPBX::efi_message_eof(void)
// fall through
case EFI_STATE_DIGIT:
digit[8] = numberrize_callerinfo(e_callerinfo.id,e_callerinfo.ntype, options.national, options.international)[e_efi_digit];
- if (digit[8])
- {
+ if (digit[8]) {
set_tone_efi(digit);
e_efi_digit++;
- } else
- {
+ } else {
// e_efi_state = EFI_STATE_STOP;
e_efi_state = EFI_STATE_ICH_WIEDERHOLE;
// message = message_create(ea_endpoint->ep_serial, portlist->port_id, EPOINT_TO_PORT, MESSAGE_DISCONNECT);
@@ -146,8 +140,7 @@ void EndpointAppPBX::set_tone_efi(const char *tone)
if (tone == NULL)
tone = "";
- if (!ea_endpoint->ep_portlist)
- {
+ if (!ea_endpoint->ep_portlist) {
PERROR("EPOINT(%d) no portlist\n", ea_endpoint->ep_serial);
}
message = message_create(ea_endpoint->ep_serial, ea_endpoint->ep_portlist->port_id, EPOINT_TO_PORT, MESSAGE_VBOX_TONE);