userarray creation
Showing
2 changed files
with
12 additions
and
10 deletions
| ... | @@ -721,14 +721,12 @@ if($action=="closecall") | ... | @@ -721,14 +721,12 @@ if($action=="closecall") |
| 721 | $userlog=UserLog::where('user_id','=',Auth::user()->id)->orderBy("id","DESC")->first(); | 721 | $userlog=UserLog::where('user_id','=',Auth::user()->id)->orderBy("id","DESC")->first(); |
| 722 | $userlog->getLastTs($crmcall->sipid_id,$nowts); | 722 | $userlog->getLastTs($crmcall->sipid_id,$nowts); |
| 723 | $userlog->save(); | 723 | $userlog->save(); |
| 724 | if(Auth::user()->username=='S32732' && $kstychCall['callnumber']=='9324046534'){ | ||
| 725 | try{ | 724 | try{ |
| 726 | $smscontroller = new SmsController(); | 725 | $smscontroller = new SmsController(); |
| 727 | $smscontroller->sendSmsBasedOnSubDisposition($kstychCall); | 726 | $smscontroller->sendSmsBasedOnSubDisposition($kstychCall); |
| 728 | } catch(Exception $e) { | 727 | } catch(Exception $e) { |
| 729 | Log::info($e->getMessage()); | 728 | Log::info($e->getMessage()); |
| 730 | } | 729 | } |
| 731 | } | ||
| 732 | } | 730 | } |
| 733 | 731 | ||
| 734 | return Response::make(""); | 732 | return Response::make(""); | ... | ... |
| ... | @@ -7,14 +7,18 @@ use Log; | ... | @@ -7,14 +7,18 @@ use Log; |
| 7 | class SmsController extends Controller | 7 | class SmsController extends Controller |
| 8 | { | 8 | { |
| 9 | public $smsUrl = 'https://10.2.55.165:443/servlet/com.aclwireless.pushconnectivity.listeners.TextListener?'; | 9 | public $smsUrl = 'https://10.2.55.165:443/servlet/com.aclwireless.pushconnectivity.listeners.TextListener?'; |
| 10 | public function sendSmsBasedOnSubDisposition($kstychCall) | 10 | public $userarray = array("A21568","admin"); |
| 11 | { | 11 | public function sendSmsBasedOnSubDisposition($kstychCall) |
| 12 | $msgText = $this->getSmsTemplate($kstychCall); | 12 | { |
| 13 | if( !empty($msgText) ) { | 13 | $users = $this->userarray; |
| 14 | $msgText = $this->fillValuesInTemplate($msgText); | 14 | if(in_array(Auth::user()->username , $users)){ |
| 15 | Log::info($msgText); | 15 | $msgText = $this->getSmsTemplate($kstychCall); |
| 16 | $this->sendSmsRequest($kstychCall, $msgText); | 16 | if( !empty($msgText) ) { |
| 17 | } | 17 | $msgText = $this->fillValuesInTemplate($msgText); |
| 18 | Log::info($msgText); | ||
| 19 | $this->sendSmsRequest($kstychCall, $msgText); | ||
| 20 | } | ||
| 21 | } | ||
| 18 | return; | 22 | return; |
| 19 | } | 23 | } |
| 20 | public function sendSmsRequest($kstychCall, $msgText) | 24 | public function sendSmsRequest($kstychCall, $msgText) | ... | ... |
-
Please register or sign in to post a comment