Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Sun Apr 28, 2024 8:14 am
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: A2Billing DID Voicemail, An Open Discussion
PostPosted: Sun Nov 29, 2009 2:41 pm 
Offline

Joined: Wed Feb 13, 2008 11:11 am
Posts: 224
Hi All,
First let me thank all the founders of this forum , there is mass info that has made me understand and appreciate A2b. All the users Kudos and when Asterisk will take over the world as the main Telecom application, i have no doubt A2Billing will be the main billing application.
The "big" Areski, Maestro Joe Ropper, Stavros,razametal oh! just to name but a few. Thank you all A2B community.
OH! i hated doing this on a Sunday while fighting a hangover, but nevertheless a few more beers will sort it out and it had to be done.
To the Topic, voicemail for A2B-DID's let me call it intercustomer-voicemail.
Heavily borrowed from http://forum.asterisk2billing.org/viewtopic.php?f=14&t=3167&hilit=voicemail
And Joe's thread http://forum.asterisk2billing.org/viewtopic.php?f=21&t=6246&p=24811&hilit=voicemail#p24811
I have managed to get voicemail working for inter customer calls without SIP/IAX friends enabled.

Caveat,
Am using PIAF, A2billing 1.4.3.1 and this may break follow_me, not sure. am not a programmer myself and i have not done this on a production server, and am using asterisk-realtime. i have only tested this on a fake DID but i believe real DID should work the same way.
A Piece of cake now, This is How to.
Thanks razametal for sharing your knowledge
First open the attached file and do as it says, am too lazy to write the inst.

Next we edit Class.A2Billing.php i will use (s) not (u) as i don't want the accountcode to be announced by astersik, otherwise anybody would know the pin numbers.
Code:
line 1476 // IF VOIP CALL

line 1546 replace if ($dialstatus == "BUSY") {

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

                       $answeredtime=0;
                        //$agi-> stream_file('prepaid-isbusy', '#');
                        //if (count($listdestination)>$callcount) continue;
            // Modificado para permitir VoiceMail entre SIP/IAX friends
                                //$agi-> stream_file('prepaid-noanswer', '#');
                                $buddyu="s".$this->accountcode;
                                $agi-> exec(VoiceMail,$buddyu);


Line 1543 } elseif ($this->dialstatus == "NOANSWER") {
Replace
Code:
} elseif ($this->dialstatus == "NOANSWER") {
                      $answeredtime=0;
                        //$agi-> stream_file('prepaid-isbusy', '#');
                        //if (count($listdestination)>$callcount) continue;
            // Modificado para permitir VoiceMail entre SIP/IAX friends
                                //$agi-> stream_file('prepaid-noanswer', '#');
                                $buddyu="s".$this->accountcode;
                                $agi-> exec(VoiceMail,$buddyu);


Line 1561 } elseif (($dialstatus == "CHANUNAVAIL") || ($dialstatus == "CONGESTION")) {
Replace
Code:
} elseif (($dialstatus  == "CHANUNAVAIL") || ($dialstatus  == "CONGESTION")) {
                        $answeredtime=0;
                        //$agi-> stream_file('prepaid-isbusy', '#');
                        //if (count($listdestination)>$callcount) continue;
            // Modificado para permitir VoiceMail entre SIP/IAX friends
                                //$agi-> stream_file('prepaid-noanswer', '#');
                                $buddyu="s".$this->accountcode;
                                $agi-> exec(VoiceMail,$buddyu);


Next edit voicemail.conf. mine looks like this
Code:
[default]
1234567890=> ,Name,[email protected],|sayduration=yes|forcename=yes|forcename=yes|forcegreetings=no|review=yes|operator=yes


you have to add an account for every SIP client using voicemail. i dont ask for password as am using accountcode,

Next. make sure ext.conf has an entry like this
Code:
voicemail =>mysql,mya2billing,voicemail_users


Oh i forgot the context,
My a2billing context looks like this
Code:
[a2billing]
exten => _X.,1,GotoIf($["${EXTEN}" = "6245"]? 6)
exten => _X.,2,GotoIf($["${EXTEN}" = "150"]? 7)
exten => _X.,3,GotoIf($["${EXTEN}" = "867"]? 8)
exten => _X.,4,DeadAGI(a2billing.php|1)
exten => _X.,5,Hangup
exten => _X.,6,VoiceMailMain(${CDR(accountcode)}@default)
exten => _X.,7,DeadAGI(a2billing.php|4)
exten => _X.,8,DeadAGI(a2billing.php|1|voucher)
exten => _X.,9,Hangup


a call to (MAIL) 6245 will authenticate the users using accountcode and as thus we don't need password auth.
150 announces the balance and 867 wont tell.

Help Required,
1. I want to have a standard greetings for those customers who have not recorded an available,busy message using asterisk (u) option not (s) without announcing the exten number, which with this setup is the accountcode? or forcing users to record their unavailable massage on account creation.
2. is it possible to automate writing voicemail.conf instead of hard coding.

Rgds
Eamonn


Attachments:
a2b_table.txt [1.96 KiB]
Downloaded 545 times
Top
 Profile  
 
 Post subject: Re: A2Billing DID Voicemail, An Open Discussion
PostPosted: Sun Dec 06, 2009 2:27 pm 
Offline

Joined: Wed Feb 13, 2008 11:11 am
Posts: 224
I have spent sometime trying to tidy up voice mail and a couple of things came up.
First,
The above setup is not using realtime although capable. To use real time we delete all entries in voicemail.conf or create an empty voicemail.conf file. Mine looks like this
Code:
[general]
#include vm_general.inc
#include vm_email.inc

i keep this two entries so i can customize.
i also dropped vocemail_users table and created it with null password so we dont ask the customers for password
Code:
`password` varchar(4) NOT NULL default '',


Second i understand the cront job provided in the doc doesn't run. so we change it to this, to run every minuete.
Code:
*/1 * * * * sh /etc/asterisk/a2billingvoicemail.sh


Last we will remove s flag so asterisk can play voicemail instructions.
Code:
$buddyu="s".$this->accountcode;


to
Code:
$buddyu="".$this->accountcode;


Dont forget to add
Code:
rtcachefriends=yes

in both sip.conf and iax.conf i have seen this to massively improve MWI.

Rgds
Eamonn


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 
VoIP Billing solution


All times are UTC


Who is online

Users browsing this forum: No registered users and 36 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group