亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? class.a2billing.php

?? asterisk用 的voip記費軟件
?? PHP
?? 第 1 頁 / 共 5 頁
字號:
	function get_agi_request_parameter($agi){			$this->CallerID 	= $agi->request['agi_callerid'];		$this->channel		= $agi->request['agi_channel'];		$this->uniqueid		= $agi->request['agi_uniqueid'];		$this->accountcode	= $agi->request['agi_accountcode'];		//$this->dnid		= $agi->request['agi_dnid'];		$this->dnid		= $agi->request['agi_extension'];				//Call function to find the cid number		$this -> isolate_cid();				$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, ' get_agi_request_parameter = '.$this->CallerID.' ; '.$this->channel.' ; '.$this->uniqueid.' ; '.$this->accountcode.' ; '.$this->dnid);	}			/*	 *	function to find the cid number	 */	function isolate_cid(){				$pos_lt = strpos($this->CallerID, '<');		$pos_gt = strpos($this->CallerID, '>');					if (($pos_lt !== false) && ($pos_gt !== false)){		   $len_gt = $pos_gt - $pos_lt - 1;		   $this->CallerID = substr($this->CallerID,$pos_lt+1,$len_gt);		}	}			/*	 *	function would set when the card is used or when it release	 */	function callingcard_acct_start_inuse($agi, $inuse){				if ($inuse){					$QUERY = "UPDATE cc_card SET inuse=inuse+1 WHERE username='".$this->username."'";			$this -> set_inuse = 1;		}else{ 						$QUERY = "UPDATE cc_card SET inuse=inuse-1 WHERE username='".$this->username."'";			$this -> set_inuse = 0;		}				$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "[CARD STATUS UPDATE : $QUERY]");		if (!$this -> CC_TESTING) $result = $this -> instance_table -> SQLExec ($this->DBHandle, $QUERY, 0);				return 0;	}				/**	 *	Function callingcard_ivr_authorize : check the dialed/dialing number and play the time to call	 *	 *  @param object $agi     *  @param float $credit     *  @return 1 if Ok ; -1 if error	**/	function callingcard_ivr_authorize($agi, &$RateEngine, $try_num){		$res=0;								/************** 	ASK DESTINATION 	******************/		$prompt_enter_dest = $this->agiconfig['file_conf_enter_destination'];				$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__,  $this->agiconfig['use_dnid']." && ".in_array ($this->dnid, $this->agiconfig['no_auth_dnid'])." && ".strlen($this->dnid)."&& $try_num");				// CHECK IF USE_DNID IF NOT GET THE DESTINATION NUMBER		if ($this->agiconfig['use_dnid']==1 && !in_array ($this->dnid, $this->agiconfig['no_auth_dnid']) && strlen($this->dnid)>2 && $try_num==0){			$this->destination = $this->dnid;		}else{			$res_dtmf = $agi->get_data($prompt_enter_dest, 6000, 20);			$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "RES DTMF : ".$res_dtmf ["result"]);			$this->destination = $res_dtmf ["result"];		}				//REDIAL FIND THE LAST DIALED NUMBER (STORED IN THE DATABASE)		if (strlen($this->destination)<=2 && is_numeric($this->destination) && $this->destination>=0){			$QUERY = "SELECT phone FROM cc_speeddial WHERE id_cc_card='".$this->id_card."' AND speeddial='".$this->destination."'";			$result = $this -> instance_table -> SQLExec ($this->DBHandle, $QUERY);			$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "QUERY = $QUERY\n RESULT : ".print_r($result,true));			if( is_array($result))	$this->destination = $result[0][0];					$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "REDIAL : DESTINATION ::> ".$this->destination);		}				// FOR TESTING : ENABLE THE DESTINATION NUMBER		if ($this->CC_TESTING) $this->destination="1800300200";		if ($this->CC_TESTING) $this->destination="3390010022";				$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "DESTINATION ::> ".$this->destination);							if ($this->removeinterprefix) $this->destination = $this -> apply_rules ($this->destination);					$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "RULES APPLY ON DESTINATION ::> ".$this->destination);				// TRIM THE "#"s IN THE END, IF ANY		// usefull for SIP or IAX friends with "use_dnid" when their device sends also the "#"		// it should be safe for normal use		$this->destination = rtrim($this->destination, "#");				// SAY BALANCE		// this is hardcoded for now but we might have a setting in a2billing.conf for the combination		if ($this->destination=='*0'){			$this -> debug( WRITELOG, $agi, __FILE__, __LINE__, "[SAY BALANCE ::> ".$this->credit."]");			$this -> fct_say_balance ($agi, $this->credit);			return -1;		}					//REDIAL FIND THE LAST DIALED NUMBER (STORED IN THE DATABASE)		if ($this->destination=='*1'){			$this->destination = $this->redial;			$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "[REDIAL : DTMF DESTINATION ::> ".$this->destination."]");				}				if ($this->destination<=0){			$prompt = "prepaid-invalid-digits";			// do not play the error message if the destination number is not numeric			// because most probably it wasn't entered by user (he has a phone keypad remember?)			// it helps with using "use_dnid" and extensions.conf routing			if (is_numeric($this->destination)) $agi-> stream_file($prompt, '#');			return -1;		}				// STRIP * FROM DESTINATION NUMBER		$this->destination = str_replace('*', '', $this->destination);				// LOOKUP RATE : FIND A RATE FOR THIS DESTINATION		$resfindrate = $RateEngine->rate_engine_findrates($this, $this->destination,$this->tariff);		if ($resfindrate==0){			$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "ERROR ::> RateEngine didnt succeed to match the dialed number over the ratecard (Please check : id the ratecard is well create ; if the removeInter_Prefix is set according to your prefix in the ratecard ; if you hooked the ratecard to the Call Plan)");		}else{			$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "OK - RESFINDRATE::> ".$resfindrate);		}						// IF DONT FIND RATE		if ($resfindrate==0){			$prompt="prepaid-dest-unreachable";			$agi-> stream_file($prompt, '#');			return -1;		}				/*$rate=$result[0][0];		if ($rate<=0){				//$prompt="prepaid-dest-blocked";				$prompt="prepaid-dest-unreachable";				continue;		}*/														// CHECKING THE TIMEOUT							$res_all_calcultimeout = $RateEngine->rate_engine_all_calcultimeout($this, $this->credit);				$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "RES_ALL_CALCULTIMEOUT ::> $res_all_calcultimeout");		if (!$res_all_calcultimeout){										$prompt="prepaid-no-enough-credit";			$agi-> stream_file($prompt, '#');			return -1;		}						// calculate timeout		//$this->timeout = intval(($this->credit * 60*100) / $rate);  // -- RATE is millime cents && credit is 1cents				$this->timeout = $RateEngine-> ratecard_obj[0]['timeout'];		// set destination and timeout		// say 'you have x minutes and x seconds'		$minutes = intval($this->timeout / 60);		$seconds = $this->timeout % 60;				$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "TIMEOUT::> ".$this->timeout."  : minutes=$minutes - seconds=$seconds");		if (!($minutes>0)){										$prompt="prepaid-no-enough-credit";			$agi-> stream_file($prompt, '#');			return -1;		}				if ($this->agiconfig['say_rateinitial']==1){			$this -> fct_say_rate ($agi, $RateEngine->ratecard_obj[0][12] * 100);   // say rate in cents		}				if ($this->agiconfig['say_timetocall']==1){			$agi-> stream_file('prepaid-you-have', '#');						if ($minutes>0){				$agi->say_number($minutes);				if ($minutes==1){					$agi-> stream_file('prepaid-minute', '#');				}else{					$agi-> stream_file('prepaid-minutes', '#');				}			}			if ($seconds>0){				if ($minutes>0) $agi-> stream_file('vm-and', '#');									$agi->say_number($seconds);				if ($seconds==1){					$agi-> stream_file('prepaid-second', '#');				}else{					$agi-> stream_file('prepaid-seconds', '#');				}			}		}		return 1;	}				/**	 *	Function call_sip_iax_buddy : make the Sip/IAX free calls	 *	 *  @param object $agi	 *  @param object $RateEngine     *  @param integer $try_num     *  @return 1 if Ok ; -1 if error	**/	function call_sip_iax_buddy($agi, &$RateEngine, $try_num){		$res=0;		if ( ($this->agiconfig['use_dnid']==1) && (!in_array ($this->dnid, $this->agiconfig['no_auth_dnid'])) && (strlen($this->dnid)>2 ))		{											$this->destination = $this->dnid;		}		else		{			$res_dtmf = $agi->get_data('prepaid-sipiax-enternumber', 6000, $this->config['global']['len_aliasnumber'], '#');						$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "RES DTMF : ".$res_dtmf ["result"]);			$this->destination = $res_dtmf ["result"];						if ($this->destination<=0){				return -1;			}		}				$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "SIP o IAX DESTINATION : ".$this->destination);				$sip_buddies = 0; $iax_buddies = 0;						//$QUERY =  "SELECT name FROM cc_iax_buddies WHERE name='".$this->destination."'";		$QUERY = "SELECT name FROM cc_iax_buddies, cc_card WHERE cc_iax_buddies.name=cc_card.username AND useralias='".$this->destination."'";					$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, $QUERY);												$result = $this -> instance_table -> SQLExec ($this->DBHandle, $QUERY);		$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, $result);						if( is_array($result)){	$iax_buddies = 1; $destiax=$result[0][0];}							//$QUERY =  "SELECT name FROM cc_sip_buddies WHERE name='".$this->destination."'";		$QUERY = "SELECT name FROM cc_sip_buddies, cc_card WHERE cc_sip_buddies.name=cc_card.username AND useralias='".$this->destination."'";		$result = $this -> instance_table -> SQLExec ($this->DBHandle, $QUERY);		$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "QUERY = $QUERY\n RESULT : ".print_r($result,true));				if( is_array($result)){	$sip_buddies = 1; $destsip=$result[0][0];}				if (!$sip_buddies && !$iax_buddies){			$agi-> stream_file('prepaid-sipiax-num-nomatch', '#');							return -1;		}				if ($this -> CC_TESTING) $this->destination="kphone";				for ($k=0;$k< $sip_buddies+$iax_buddies;$k++){			if ($k==0 && $sip_buddies){ $this->tech = 'SIP'; $this->destination= $destsip; }			else{ $this->tech = 'IAX2'; $this->destination = $destiax; }							if ($this->agiconfig['record_call'] == 1){				$myres = $agi->exec("MONITOR ".$this->agiconfig['monitor_formatfile']."|".$this->uniqueid."|mb");				$this -> debug( WRITELOG, $agi, __FILE__, __LINE__, "EXEC MONITOR ".$this->agiconfig['monitor_formatfile']."|".$this->uniqueid."|mb");			}						$agi->set_callerid($this->useralias);			$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "[EXEC SetCallerID : ".$this->useralias."]");						$dialparams = $this->agiconfig['dialcommand_param_sipiax_friend'];			$dialstr = $this->tech."/".$this->destination.$dialparams;			$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "app_callingcard sip/iax friend: Dialing '$dialstr' ".$this->tech." Friend.\n");						//# Channel: technology/number@ip_of_gw_to PSTN			// Dial(IAX2/guest@misery.digium.com/s@default) 			$myres = $agi->exec("DIAL $dialstr");			$this -> debug( WRITELOG, $agi, __FILE__, __LINE__, "DIAL");					$answeredtime = $agi->get_variable("ANSWEREDTIME");			$answeredtime = $answeredtime['data'];			$dialstatus = $agi->get_variable("DIALSTATUS");			$dialstatus = $dialstatus['data'];											if ($this->agiconfig['record_call'] == 1){				// Monitor(wav,kiki,m)									$myres = $agi->exec("STOPMONITOR");				$this -> debug( WRITELOG, $agi, __FILE__, __LINE__, "EXEC StopMonitor (".$this->uniqueid."-".$this->cardnumber.")");			}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天天做天天摸天天爽国产一区| 久久精品男人天堂av| 亚洲国产日日夜夜| 欧美视频日韩视频| 午夜精品福利一区二区蜜股av| 欧美福利一区二区| 久久国内精品视频| 国产欧美日韩卡一| 欧美在线不卡一区| 蜜桃精品在线观看| 国产欧美精品国产国产专区| www.久久久久久久久| 亚洲国产精品久久人人爱| 91精品国产免费| 国产精品影视网| 一区二区国产视频| 欧美大度的电影原声| 高清shemale亚洲人妖| 一级特黄大欧美久久久| 精品国产乱子伦一区| av亚洲产国偷v产偷v自拍| 亚洲电影中文字幕在线观看| 欧美刺激脚交jootjob| gogogo免费视频观看亚洲一| 首页欧美精品中文字幕| 精品国产不卡一区二区三区| 99久久久国产精品免费蜜臀| 午夜在线成人av| 国产精品久久久久久久久动漫 | 亚洲宅男天堂在线观看无病毒| 欧美一区在线视频| 不卡一区二区三区四区| 麻豆精品一区二区三区| 亚洲免费在线电影| 久久综合狠狠综合久久综合88 | 日韩一区二区在线观看| 99久久综合狠狠综合久久| 日韩成人免费看| 最近中文字幕一区二区三区| 日韩精品一区二区三区在线播放| 91免费在线看| 国产精品乡下勾搭老头1| 午夜欧美大尺度福利影院在线看| 欧美激情综合网| 精品999在线播放| 欧美日韩国产美| 色婷婷久久久亚洲一区二区三区| 国产一区视频导航| 青青草97国产精品免费观看无弹窗版 | 亚洲国产aⅴ天堂久久| 国产精品欧美一区喷水| www国产精品av| 日韩一区二区三区视频在线观看| 欧美在线啊v一区| 91视频免费观看| caoporm超碰国产精品| 国产高清精品在线| 国产乱理伦片在线观看夜一区| 免费久久精品视频| 美女mm1313爽爽久久久蜜臀| 亚洲午夜三级在线| 一区二区三区高清| 一区二区三区蜜桃| 亚洲综合一区二区精品导航| 亚洲精品免费在线| 亚洲精品中文在线影院| 一区免费观看视频| 亚洲欧美日韩精品久久久久| 国产精品久久久久桃色tv| 国产欧美日韩精品一区| 久久久久久久久岛国免费| 久久久久久97三级| 国产亚洲人成网站| 国产欧美日韩久久| 国产精品高潮呻吟| 国产精品视频免费看| 国产精品久久久爽爽爽麻豆色哟哟| 久久精品亚洲乱码伦伦中文| 中文字幕免费不卡| 国产精品久久精品日日| 亚洲精品视频观看| 亚洲成人tv网| 久久精品噜噜噜成人av农村| 久草这里只有精品视频| 国产真实乱对白精彩久久| 成人做爰69片免费看网站| 91免费观看视频在线| 欧美性一级生活| 7878成人国产在线观看| 久久这里只有精品视频网| 国产精品乱人伦一区二区| 亚洲乱码日产精品bd| 亚洲电影一区二区三区| 另类欧美日韩国产在线| 国产精品一区三区| 成人精品在线视频观看| 欧美性做爰猛烈叫床潮| 日韩精品中午字幕| 国产精品全国免费观看高清| 亚洲精品你懂的| 蜜臂av日日欢夜夜爽一区| 国产成人在线电影| 欧美色中文字幕| 精品电影一区二区| 亚洲精品成人少妇| 秋霞影院一区二区| 不卡的av中国片| 欧美喷水一区二区| 久久久美女毛片| 亚洲第一福利一区| 国产成人综合在线播放| 在线免费av一区| 2023国产精品视频| 亚洲综合丁香婷婷六月香| 黑人巨大精品欧美一区| 91福利视频在线| 久久精品夜色噜噜亚洲aⅴ| 伊人开心综合网| 国模一区二区三区白浆| 欧美影片第一页| 国产欧美一区二区精品久导航 | 国产乱人伦偷精品视频不卡 | 亚洲欧美在线观看| 日韩av电影免费观看高清完整版 | 成人黄色电影在线| 欧美精选一区二区| 国产精品欧美一区喷水| 男女男精品视频| 欧美亚洲禁片免费| 中文字幕欧美三区| 免费观看成人av| 精品婷婷伊人一区三区三| 国产精品色呦呦| 精品一区二区三区在线观看国产 | 99国产欧美另类久久久精品| 欧美成人精品3d动漫h| 亚洲一二三区不卡| av综合在线播放| 中文字幕精品—区二区四季| 亚洲va欧美va国产va天堂影院| 成人av影视在线观看| 欧美精品一区二区三区高清aⅴ| 亚洲一区在线观看视频| 99视频在线观看一区三区| 精品免费国产一区二区三区四区| 亚洲一二三区视频在线观看| 91在线porny国产在线看| 中文字幕 久热精品 视频在线| 久久国内精品自在自线400部| 欧美日韩精品一区二区| 一区二区三区波多野结衣在线观看 | 亚洲欧美一区二区三区久本道91| 国产河南妇女毛片精品久久久| 日韩一区二区高清| 首页亚洲欧美制服丝腿| 欧美日本乱大交xxxxx| 亚洲国产日韩综合久久精品| 色哟哟一区二区在线观看| 亚洲图片欧美激情| 91麻豆免费看| 亚洲精品你懂的| 欧美影院一区二区三区| 亚洲亚洲精品在线观看| 欧美揉bbbbb揉bbbbb| 午夜伊人狠狠久久| 日韩一区二区在线看| 精品亚洲免费视频| 久久精品欧美一区二区三区不卡 | 成人听书哪个软件好| 国产三级精品视频| 成人黄色免费短视频| 中文字幕视频一区二区三区久| 99re热这里只有精品视频| 亚洲精品视频在线观看免费 | 日韩欧美的一区| 精品夜夜嗨av一区二区三区| 久久蜜桃一区二区| 成人av资源网站| 一级日本不卡的影视| 在线综合亚洲欧美在线视频| 日本三级亚洲精品| 久久久不卡网国产精品二区| 国产成人激情av| 1024精品合集| 6080日韩午夜伦伦午夜伦| 九一九一国产精品| 国产精品美女久久久久久| 久久久久久久久蜜桃| 懂色av噜噜一区二区三区av| 国产精品国产三级国产三级人妇 | 午夜精品123| 欧美成人一区二区三区在线观看| 粉嫩欧美一区二区三区高清影视| 国产精品久久久久婷婷二区次| 欧美视频在线观看一区| 精品一二三四区| 一区二区三区在线看| 精品久久久影院| 色狠狠综合天天综合综合| 日本va欧美va精品发布|