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=voicemailAnd Joe's thread
http://forum.asterisk2billing.org/viewtopic.php?f=21&t=6246&p=24811&hilit=voicemail#p24811I 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