Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Mar 29, 2024 2:09 am
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: VoiceMail after call forward failure
PostPosted: Tue May 25, 2010 2:59 pm 
Offline

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

I modified the a2billing to forward A2billing DID incoming call after it is failed on VoIP phone to be transfered to a chosen forward number.

however if the forward failed after N seconds .

However I don't know why it is not working,

I placed it under the function : function call_did($agi, &$RateEngine, $listdestination){


between these codes:

Code:
               //# Ooh, something actually happend!
               if ($dialstatus  == "BUSY") {
                  $answeredtime=0;
                  $agi-> stream_file('prepaid-isbusy', '#');
                  // FOR FOLLOWME IF THERE IS MORE WE PASS TO THE NEXT ONE OTHERWISE WE NEED TO LOG THE CALL MADE
                  if (count($listdestination)>$callcount) continue;
               } elseif ($this->dialstatus == "NOANSWER") {
                  $answeredtime=0;
                  $agi-> stream_file('prepaid-noanswer', '#');
                  // FOR FOLLOWME IF THERE IS MORE WE PASS TO THE NEXT ONE OTHERWISE WE NEED TO LOG THE CALL MADE
                  if (count($listdestination)>$callcount) continue;
               } elseif ($dialstatus == "CANCEL") {
                  $answeredtime=0;
                  // FOR FOLLOWME IF THERE IS MORE WE PASS TO THE NEXT ONE OTHERWISE WE NEED TO LOG THE CALL MADE
                  if (count($listdestination)>$callcount) continue;
               } elseif ($dialstatus == "ANSWER") {
                  $this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "[A2Billing] DID call friend: dialstatus : $dialstatus, answered time is ".$answeredtime." \n");
               } elseif (($dialstatus  == "CHANUNAVAIL") || ($dialstatus  == "CONGESTION")) {
                  $answeredtime=0;
                  // FOR FOLLOWME IF THERE IS MORE WE PASS TO THE NEXT ONE OTHERWISE WE NEED TO LOG THE CALL MADE
                  if (count($listdestination)>$callcount) continue;
               } else{
                  $agi-> stream_file('prepaid-noanswer', '#');
                  // FOR FOLLOWME IF THERE IS MORE WE PASS TO THE NEXT ONE OTHERWISE WE NEED TO LOG THE CALL MADE
                  if (count($listdestination)>$callcount) continue;
               }



voicemail:
Code:
         if (($dialstatus =="CHANUNAVAIL") || ($dialstatus == "CONGESTION") ||($dialstatus == "NOANSWER") )
{

// The following section will send the caller to VoiceMail with the unavailable priority.
$did_number = "u".$this->destination;
$this -> write_log("[STATUS] CHANNEL UNAVAILABLE - DIVERT TO VOICEMAIL ($did_number)");
$agi-> exec(VoiceMail,$did_number);

}

if (($dialstatus =="BUSY") )
{

// The following section will send the caller to VoiceMail with the busy priority.
$did_number = "b".$this->destination;
$this -> write_log("[STATUS] CHANNEL UNAVAILABLE - DIVERT TO VOICEMAIL ($did_number)");
$agi-> exec(VoiceMail,$did_number);
}


//end of mod


Top
 Profile  
 
 Post subject: Re: VoiceMail after call forward failure
PostPosted: Tue May 25, 2010 3:11 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

What not use a priority 2 destination.

Joe


Top
 Profile  
 
 Post subject: Re: VoiceMail after call forward failure
PostPosted: Tue May 25, 2010 3:18 pm 
Offline

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

What not use a priority 2 destination.

Joe



I'm not sure how to do that? how to forward it to voicemail?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 
Voice Broadcast System


All times are UTC


Who is online

Users browsing this forum: No registered users and 7 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