День добрый!
Проблема заключается в том, что в switch не срабатывает ни один case, а сразу же default. Пробовал различными способами, ничего не помогло.
Вот код:
switch ($internalNumber) :
case "12345678":
$param = ['USER_PHONE_INNER' => $innerNumber, 'PHONE_NUMBER' => $phoneNumber, "CALL_START_DATE" => $call['call_start_date'],
'CRM_CREATE' => 1, "CRM_SOURCE" => "32", 'TYPE' => 2, 'SHOW' => 1,];
$result = $this->getEntity('bodxjh0epssyofow', 'telephony.externalcall.register', $param)['result'];
break;
case "4522345243":
$param = ['USER_PHONE_INNER' => $innerNumber, 'PHONE_NUMBER' => $phoneNumber, "CALL_START_DATE" => $call['call_start_date'],
'CRM_CREATE' => 1, "CRM_SOURCE" => "CALL", 'TYPE' => 2, 'SHOW' => 1,];
$result = $this->getEntity('bodxjh0epssyofow', 'telephony.externalcall.register', $param)['result'];
break;
case "23452335":
$param = ['USER_PHONE_INNER' => $innerNumber, 'PHONE_NUMBER' => $phoneNumber, "CALL_START_DATE" => $call['call_start_date'],
'CRM_CREATE' => 1, "CRM_SOURCE" => "29", 'TYPE' => 2, 'SHOW' => 1,];
$result = $this->getEntity('bodxjh0epssyofow', 'telephony.externalcall.register', $param)['result'];
break;
default:
$param = ['USER_PHONE_INNER' => $innerNumber, 'PHONE_NUMBER' => $phoneNumber, "CALL_START_DATE" => $call['call_start_date'],
'CRM_CREATE' => 1, "CRM_SOURCE" => "ADVERTISING", 'TYPE' => 2, 'SHOW' => 1,];
$result = $this->getEntity('bodxjh0epssyofow', 'telephony.externalcall.register', $param)['result'];
endswitch;