Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Tue Mar 19, 2024 4:00 am
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: A2Billing in a boarding school integrated with voicemail
PostPosted: Tue Feb 05, 2008 2:10 pm 
Offline

Joined: Mon Oct 15, 2007 9:39 am
Posts: 12
Location: Israel
We have just finished installing a voicemail application written with PHPAGI in a boarding school with 500 students.

The Asterisk/A2Billing computer is a front end to a regular PBX. The students call from the PBX as they dial to a regular number, and A2Billing asks for their card number. The offices and faxes have cards assigned to their extensions, and they dial out without knowing that they are going through A2Billing.

The voicemail system is integrated with A2Billing, so when you call an office extension, the message is directed to the appropriate card. When you call an extension which is used by everyone and you get to the voicemail (busy/no answer), you are asked to enter the card ID (ID field in the table). To retrieve the messages you must enter your card number. Last but not least, when you make a call, A2Billing will check your voicemail messages, and if it finds out you have new messages it will notify you before starting the outbound call.

Except for the few bugs we encountered with A2Billing, it works very smooth. The system is on a pay-per-use basis, which means they clients don't pay for the installation but only for the minutes the use, so for us the low cost of the system is what enabled this solution, and we are very happy with how it works.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 05, 2008 5:36 pm 
Offline

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

Many many thanks for the writeup - The success stories really help when people are assessing A2Billing for their own applications, and shows those unfamiliar with A2Billing that it can work well in a commercial environment, and because of it's open nature, what you can do with it is only limited by your imagination.

Thanks again.

Yours

Joe Roper

ps. anyone else got any good A2Billing success stories.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 08, 2008 4:55 pm 
Offline

Joined: Fri Feb 08, 2008 4:54 pm
Posts: 6
Would you care to share the code of the agi you used???


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 10, 2008 9:35 pm 
Offline

Joined: Sun Mar 12, 2006 2:49 pm
Posts: 954
Location: Barcelona
Excellent Success story!
I implemented the voicemail ability on our trunk 2 weeks ago with an integration of ARI over the Customer interface so that users can see their message and listen to them from the web UI.
it will be cool you look at it so that we can strength our voicemail solution and do something great for the good of all !

All the best,
/Areski


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 13, 2008 3:00 pm 
Offline

Joined: Mon Oct 15, 2007 9:39 am
Posts: 12
Location: Israel
The voicemail solution is composed of many elements, I have to compile a documentation for it and post it here. I hope I will be able to it next week.


Top
 Profile  
 
 Post subject: Voicemail solution
PostPosted: Sun Feb 24, 2008 4:07 pm 
Offline

Joined: Mon Oct 15, 2007 9:39 am
Posts: 12
Location: Israel
I just finished the documentation for the voicemail solution, attached with the ZIP file. Enjoy!


Attachments:
Adding_voicemail_to_A2Billing.zip [13.89 KiB]
Downloaded 2813 times
Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 01, 2008 3:14 pm 
Offline

Joined: Sat Mar 01, 2008 4:09 am
Posts: 37
Thank you very much, I think this is worth a lot, and should be a sticky.

Something I was not able to find out was, where did you place the Macro on th last page ?

Thanks for the great work.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 02, 2008 3:27 am 
Offline

Joined: Sat Mar 01, 2008 4:09 am
Posts: 37
I was just thinking, wouldn't it be nice to add the turn on/off part also to the user so he can decide to turn it on/off ?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 02, 2008 11:46 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
MatBoy wrote:
wouldn't it be nice to add the turn on/off part also to the user
The voicemail feature in A2Billing's 'trunk' branch already works this way. 'trunk' will be A2Billing v1.4 when it's released. This may be some time away yet.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 02, 2008 2:53 pm 
Offline

Joined: Sat Mar 01, 2008 4:09 am
Posts: 37
stavros wrote:
MatBoy wrote:
wouldn't it be nice to add the turn on/off part also to the user
The voicemail feature in A2Billing's 'trunk' branch already works this way. 'trunk' will be A2Billing v1.4 when it's released. This may be some time away yet.


I have read it somwhere indeed, for the time being, this might be a solution ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 12, 2008 1:51 pm 
Offline

Joined: Mon Oct 15, 2007 9:39 am
Posts: 12
Location: Israel
MatBOy, as far as I remember macros go before the context definitions. I really depends on your setup.

Turning on and off the voicemail should be easy with this PHP script. To turn voicemail on call it from the diaplan with the parameter 1, to turn off use the parameter 0. Also don't forget to record the files "voicemail_turned_on" and "voicemail_turned_off".

Code:
#!/usr/bin/php -q
<?php   

    declare(ticks = 1);
    if (function_exists('pcntl_signal')) {
         pcntl_signal(SIGHUP,  SIG_IGN);
    }

        error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
      
   include (dirname(__FILE__)."/libs_a2billing/db_php_lib/Class.Table.php");
   include (dirname(__FILE__)."/libs_a2billing/Class.A2Billing.php");
   include (dirname(__FILE__)."/libs_a2billing/Class.RateEngine.php");      
   include (dirname(__FILE__)."/libs_a2billing/phpagi_2_14/phpagi.php");
   include (dirname(__FILE__)."/libs_a2billing/phpagi_2_14/phpagi-asmanager.php");


   $charge_callback=0;
   $G_startime = time();
   $agi_date = "Release : 13 August 2006";
   $agi_version = "1.2.3 (BrainCoral)";
   
   /**********     CREATE THE AGI INSTANCE + ANSWER THE CALL      **********/
   $agi = new AGI();
   
   
   $idconfig = 1;
   $agi->verbose('line:'.__LINE__.' - '."IDCONFIG : $idconfig \n");
   
   
   if ($argc > 2 && strlen($argv[2]) > 0 && $argv[2] == 'did')         $mode = 'did';
   elseif ($argc > 2 && strlen($argv[2]) > 0 && $argv[2] == 'callback')      $mode = 'callback';
   elseif ($argc > 2 && strlen($argv[2]) > 0 && $argv[2] == 'cid-callback')   $mode = 'cid-callback';   
   elseif ($argc > 2 && strlen($argv[2]) > 0 && $argv[2] == 'all-callback')   $mode = 'all-callback';
   elseif ($argc > 2 && strlen($argv[2]) > 0 && $argv[2] == 'predictivedialer')   $mode = 'predictivedialer';
   else $mode = 'standard';
   $agi->verbose('line:'.__LINE__.' - '."MODE : $mode \n");
   
   // get the area code for the cid-callback & all-callback
   if ($argc > 3 && strlen($argv[3]) > 0) $caller_areacode = $argv[3];
   
   
   $A2B = new A2Billing();
   $A2B -> load_conf($agi, NULL, 0, $idconfig);
   
   $A2B -> CC_TESTING = isset($A2B->agiconfig['debugshell']) && $A2B->agiconfig['debugshell'];   
   
   // TEST DID
   // if ($A2B -> CC_TESTING) $mode = 'did';
   
   //-- Print header
   if ($A2B->agiconfig['debug']>=1) $agi->verbose ('AGI Request:');
   if ($A2B->agiconfig['debug']>=1) $agi->verbose (print_r($agi->request, true));
   
   
   /* GET THE AGI PARAMETER */
   $A2B -> get_agi_request_parameter ($agi);
   
   //$A2B -> accountcode = '2222222222';
   
   if (!$A2B -> DbConnect()){                  
      $agi-> stream_file('prepaid-final', '#');
      exit;               
   }
   
   $instance_table = new Table();
   $A2B -> set_instance_table ($instance_table);
      
// Ask the caller to enter his password
$ok = false;
$errorCount = 0;
while (!$ok)
{
    $errorCount++;
    $resDTMF = $agi->get_data ("a2billing/voicemail/enter_password", 5000, 5);
    $password = $resDTMF ["result"];
    if ($password . ";" != ";")
    {
        $query = "SELECT id,voicemail FROM cc_card WHERE (userpass='" . $password . "')";
        $result = $A2B -> instance_table -> SQLExec ($A2B->DBHandle, $query);
        $ok = (is_array($result));
    }
    if ($ok)
        $cardID = $result[0][0];
    else
    {
        $agi->stream_file ("a2billing/voicemail/wrong_password");
        if ($errorCount < 3)
            $agi->stream_file ("a2billing/voicemail/try_again");
        else
        {
            $agi->stream_file ("a2billing/voicemail/too_many_errors");
            exit ();
        }
    }
}

// Turn voicemail feature on/off
$query = "UPDATE cc_card SET voicemail=" . argv[1] . " WHERE (id=${cardID})";
$result = $A2B -> instance_table -> SQLExec ($A2B->DBHandle, $query);
if (argv[1] == "1")
   $agi->stream_file ("a2billing/voicemail/voicemail_turned_on");
else
   $agi->stream_file ("a2billing/voicemail/voicemail_turned_off");

?>


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 13, 2008 3:14 pm 
Offline

Joined: Fri Feb 08, 2008 4:54 pm
Posts: 6
i am looking for a similar solution, but i would like to be able to charge for voice mail - and was wondering what changes would be needed to implement as follows

1. rate plans can be set with voicemail (a y/n)
2. use realtime for voicemail
3. the cron would be set to update only those who are part of a specific call plan (the plan which has voice mail)
4. dial plan could be set to change to a different call plan - i.e. the one which charges for voicemail

(i'm currently thinking of a solution where the are only two call plans)

any ideas?

is there a better way to do this??

also i'm want to disable vm when balance falls below a certain threshhold


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 19, 2008 2:12 am 
Offline

Joined: Fri Feb 08, 2008 4:54 pm
Posts: 6
i have a solution - is anybody interested???


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 19, 2008 10:08 am 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
Yes and I'm sure many are. Post it !! :D


Top
 Profile  
 
 Post subject: Voicemail billing
PostPosted: Wed Mar 19, 2008 12:02 pm 
Offline

Joined: Mon Oct 15, 2007 9:39 am
Posts: 12
Location: Israel
voip-geek, we thought about charging for the voicemail, but it is not implemented yet. The solution I thought of was using cron to decrease x amount of money for every user that has voicemail once a month and add a line to the logs with "voicemail charge" as the destination. I didn't do it yet so I can't tell you if it works well.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Voice Broadcast System


All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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