Beispiel #1
0
	function call () 
	{
		$this->load->library('Asterisk');

		$tel = $this->input->get_post('tel');
		
		if (strlen($tel) > 3) $tel = tel_dialstring($tel);

		if ($this->input->get_post('ext') !== false)
		{
			$ext = $this->input->get_post('ext');
		}
		elseif (isset($this->profile->current()->meta->pbx_callback) === true)
		{
			$ext = $this->profile->current()->meta->pbx_callback;
		}
		elseif (isset($this->profile->current()->meta->pbx_ext) === true)
		{
			$ext = $this->profile->current()->meta->pbx_ext;
		}
		else
		{
			show_error('No callback number or extension set in preferences.');
		}
		
		$this->asterisk->call($tel,$ext);
	}	
Beispiel #2
0
	private function _formValue($call,$p_eid,$c_eid=null) {
		
		$this->load->helper('number');
		
		$data['num'] = tel_dialstring($call['CallerIDNum']);
		$data['channel'] = $call['Channel'];
		$data['uniqueid'] = $call['Uniqueid'];
		$data['parent'] = $p_eid;
		if (is_numeric($c_eid)) $data['child'] = $c_eid;
		else $data['child'] = $p_eid;
		
		return serialize($data);
	}