Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Tue Apr 16, 2024 5:20 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: problem with followme
PostPosted: Sat Mar 14, 2009 11:35 am 
Offline

Joined: Sun Aug 17, 2008 1:52 pm
Posts: 93
Hi guys,

I noticed in our setup which we are using followme to forward the call to the user's secondary phone number if the sip phone is not available,

in case the caller cancel the call before (means hangup) before it goes to second phone, it will still dial the user's mobile/landline

for this reason I edit this file: Class.A2Billingdid.php

ORIGINAL:
Code:
                  if ($this -> callingcard_ivr_authorize($agi, $RateEngine, 0)==1){
                        
                     // PERFORM THE CALL   
                     $result_callperf = $RateEngine->rate_engine_performcall ($agi, $this -> destination, $this);
                     if (!$result_callperf) {
                        $prompt="prepaid-noanswer";
                        $agi-> stream_file($prompt, '#');
                        continue;
                     }


                  
                     if (($RateEngine->dialstatus == "NOANSWER") || ($RateEngine->dialstatus == "CANCEL") || ($RateEngine->dialstatus == "BUSY") || ($RateEngine->dialstatus == "CHANUNAVAIL") || ($RateEngine->dialstatus == "CONGESTION")) continue;
                        
                     // INSERT CDR  & UPDATE SYSTEM
                     $RateEngine->rate_engine_updatesystem($this, $agi, $this-> destination, $doibill, 1);
                     // CC_DID & CC_DID_DESTINATION - cc_did.id, cc_did_destination.id                     
                     $QUERY = "UPDATE cc_did SET secondusedreal = secondusedreal + ".$RateEngine->answeredtime." WHERE id='".$inst_listdestination[0]."'";
                     $result = $this->instance_table -> SQLExec ($this -> DBHandle, $QUERY, 0);
                     $this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "[UPDATE DID: SQL: $QUERY]:[result:$result]");
                     
                     $QUERY = "UPDATE cc_did_destination SET secondusedreal = secondusedreal + ".$RateEngine->answeredtime." WHERE id='".$inst_listdestination[1]."'";
                     $result = $this->instance_table -> SQLExec ($this -> DBHandle, $QUERY, 0);
                     $this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "[UPDATE DID_DESTINATION: SQL: $QUERY]:[result:$result]");
                     
                     // THEN STATUS IS ANSWER
                     break;
                  }
                  




to:




Code:
                  if ($this -> callingcard_ivr_authorize($agi, $RateEngine, 0)==1){
                        
                     // PERFORM THE CALL   
                     $result_callperf = $RateEngine->rate_engine_performcall ($agi, $this -> destination, $this);
                     if (!$result_callperf) {
                        $prompt="prepaid-noanswer";
                        $agi-> stream_file($prompt, '#');
                        continue;
                     }


                     //in case caller cancelled to call we must drop the call
                     if (($RateEngine->dialstatus == "CANCEL")) break;
                        
                     if (($RateEngine->dialstatus == "NOANSWER") || ($RateEngine->dialstatus == "CANCEL") || ($RateEngine->dialstatus == "BUSY") || ($RateEngine->dialstatus == "CHANUNAVAIL") || ($RateEngine->dialstatus == "CONGESTION")) continue;
                        
                     // INSERT CDR  & UPDATE SYSTEM
                     $RateEngine->rate_engine_updatesystem($this, $agi, $this-> destination, $doibill, 1);
                     // CC_DID & CC_DID_DESTINATION - cc_did.id, cc_did_destination.id                     
                     $QUERY = "UPDATE cc_did SET secondusedreal = secondusedreal + ".$RateEngine->answeredtime." WHERE id='".$inst_listdestination[0]."'";
                     $result = $this->instance_table -> SQLExec ($this -> DBHandle, $QUERY, 0);
                     $this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "[UPDATE DID: SQL: $QUERY]:[result:$result]");
                     
                     $QUERY = "UPDATE cc_did_destination SET secondusedreal = secondusedreal + ".$RateEngine->answeredtime." WHERE id='".$inst_listdestination[1]."'";
                     $result = $this->instance_table -> SQLExec ($this -> DBHandle, $QUERY, 0);
                     $this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "[UPDATE DID_DESTINATION: SQL: $QUERY]:[result:$result]");
                     
                     // THEN STATUS IS ANSWER
                     break;
                  }
                  


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 
Hosted Voice Broadcast


All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group