<?php

 namespace Informunity\Classes; use Informunity\Contexts\Routes\Iub24Dids; use Informunity\Contexts\Routes\Outrt; use Informunity\Rest\Rest; use Informunity\Rest\App\CheckRegistration; class Dialplan { private $config; private $autorized; private $ajaxHandler; private $ext; public function __construct($iub24, &$ext, $ajaxHandler) { goto imaDg; QBI4I: global $amp_conf; goto kCrEG; yCdib: empty($this->config["\x74\157\x6b\x65\x6e"]) && empty($this->config["\162\x65\x66\x72\x65\x73\x68\137\x74\x6f\153\x65\156"]) ? '' : ($this->autorized = true); goto XOBOV; imaDg: $this->ext = $ext; goto x5vDh; x5vDh: $this->config = $iub24->config; goto ietMY; kCrEG: $this->config["\146\x5f\x70\141\x74\150"] = empty($amp_conf["\115\x49\x58\115\x4f\x4e\x5f\104\x49\122"]) ? $amp_conf["\x41\123\124\x53\120\x4f\x4f\x4c\x44\111\x52"] . "\57\x6d\x6f\x6e\x69\164\157\x72\x2f\44\x7b\x59\x45\x41\x52\x7d\x2f\44\173\x4d\x4f\x4e\x54\110\175\x2f\x24\x7b\104\x41\131\x7d\57" : $amp_conf["\x4d\x49\x58\115\117\116\137\x44\111\x52"] . "\57\44\x7b\131\105\101\122\x7d\57\44\173\x4d\117\x4e\x54\110\175\57\x24\173\104\101\131\x7d\x2f"; goto owaMk; eNrZ3: if (!$this->autorized) { goto LaUD1; } goto QBI4I; XOBOV: iB3qQ: goto eNrZ3; oG9Z5: $REST = new Rest($this->config); goto OfNQO; ietMY: $this->ajaxHandler = $ajaxHandler; goto iOO3a; iOO3a: if (!isset($this->config["\154\x69\x63\x65\x6e\163\x65"])) { goto iB3qQ; } goto oG9Z5; pU9Rt: LaUD1: goto thjpg; OfNQO: $this->autorized = CheckRegistration::load($REST)->Run(); goto yCdib; owaMk: $this->config["\154\x69\156\x6b"] = fpbx_which("\146\167\143\x6f\156\x73\x6f\154\x65"); goto pU9Rt; thjpg: } public function getContexts() { goto ZgCqE; ZgCqE: if (!$this->autorized) { goto FQz31; } goto J8jv4; eUYd8: $className = "\x49\156\146\x6f\162\x6d\165\156\x69\164\x79\x5c\103\157\156\x74\145\x78\x74\x73\x5c" . $context["\x66\x69\154\145\x6e\141\x6d\145"]; goto tK4WC; DGvU6: bp9q4: goto UuhnK; tK4WC: $className::make($this->ext, $this->config); goto LXNQp; ASSIY: $context = pathinfo(array_shift($Contexts)); goto eUYd8; ZmbdS: L72N7: goto zf9Hu; zf9Hu: FQz31: goto mr7bP; UuhnK: if (empty($Contexts)) { goto L72N7; } goto ASSIY; J8jv4: $Contexts = glob(__DIR__ . "\x2f\56\x2e\x2f\103\x6f\156\164\145\170\x74\x73\57\52\56\x70\x68\x70"); goto DGvU6; LXNQp: goto bp9q4; goto ZmbdS; mr7bP: } public function getRoutesContexts() { goto F9n8s; PDn3r: oQitu: goto Z61ev; egFxz: foreach ($outrouting as $val) { goto ro1tY; R9ycV: Outrt::make($this->ext, $this->config); goto Sv0FE; ro1tY: $this->config["\x72\x6f\x75\x74\x65"] = $val; goto R9ycV; Sv0FE: omGel: goto AzlYp; AzlYp: } goto Iz7If; UwIBu: $outrouting = $this->ajaxHandler->getOutboundRoutesList(true); goto d4mp6; r5s6j: if (!(!empty($this->config["\x64\x69\144\163"]) && is_array($this->config["\144\151\x64\163"]))) { goto Am_CJ; } goto c19Yq; c8RCF: $this->config["\144\x69\144\x73"] = $this->ajaxHandler->get_dids(); goto r5s6j; Iz7If: HBmj0: goto PDn3r; cyy8M: $this->config["\x65\170\143\145\x70\x74\x69\x6f\156\x73"] = $this->ajaxHandler->getExceptionsList(true); goto c8RCF; d4mp6: if (!is_array($outrouting)) { goto oQitu; } goto S07Uk; F9n8s: if (!$this->autorized) { goto CRIJI; } goto cyy8M; vTbHw: Am_CJ: goto UwIBu; c19Yq: Iub24Dids::make($this->ext, $this->config); goto vTbHw; S07Uk: $this->config["\x70\x72\x65\x66\x69\170\145\163"] = $this->ajaxHandler->GetOutboundRoutesPrefixes(); goto egFxz; Z61ev: CRIJI: goto Q8cDw; Q8cDw: } public static function spliceAfter(&$ext, $context, $exten, $tag, $string, $offset = 0) { goto Ql1Yt; t_YwP: foreach ($contData as $line_num => $row) { goto Jv44b; Jv44b: if (!(!empty($row["\164\x61\147"]) && $row["\164\141\147"] == $tag)) { goto MVV7x; } goto sypKc; sypKc: $row_count = $line_num + 1 + $offset; goto SKdZg; R6hU4: kslvf: goto BP0sa; sk1dh: MVV7x: goto R6hU4; SKdZg: goto kslvf; goto sk1dh; BP0sa: } goto EnCQI; Ql1Yt: $contData = $ext->_exts[$context]["\x20" . $exten . "\40"]; goto m66ii; m66ii: if (empty($contData)) { goto EY7mA; } goto t_YwP; yuowJ: EY7mA: goto Xy7ra; qr09j: if (empty($row_count)) { goto vT5dH; } goto Ush0B; Xy7ra: unset($contData); goto gfjbV; tYoBf: vT5dH: goto yuowJ; Ush0B: $ext->splice($context, $exten, $row_count, $string); goto tYoBf; EnCQI: LWjfC: goto qr09j; gfjbV: } }
