Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Mon Dec 10, 2018 3:56 am
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 32 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: DID forwarding to voicemail if not answered by SIP_FRIEND.
PostPosted: Sun Apr 02, 2006 11:25 pm 
Offline
User avatar

Joined: Sun Apr 02, 2006 5:29 am
Posts: 97
How do I setup asterisk2billing to forward the DID calls to voice mail if the SIP_FRIEND does not answer the DID call.

Thanks

Mohamed


Top
 Profile  
 
 Post subject: Forwarding DID calls to Voice mail.
PostPosted: Thu Apr 13, 2006 1:56 am 
Offline
User avatar

Joined: Sun Apr 02, 2006 5:29 am
Posts: 97
I had ask this question sometime back and I would like to share my solution. I created a voice mail with the same number as the DID. I then editted the a2billing.php and commented this command $agi->hangup(); to prevent the script from disconnecting the call so that we can forward the calls to voice mail in the dial plan.

// $agi->hangup();

In the Extensions.conf dial plan I added the voicemail part in the a2billing-did context as shown below.

[a2billing-did]
exten => _X.,1,DeadAGI(a2billing.php|1|did)
exten => _X.,2,Voicemail(u${EXTEN})
exten => _X.,3,Hangup


Top
 Profile  
 
 Post subject: Alternate Forwarding method ?
PostPosted: Thu Apr 27, 2006 1:38 pm 
Offline

Joined: Thu Apr 27, 2006 1:23 pm
Posts: 1
I decided to edit the Class.A2billing.php and call it from there. Figured that way i could put some database stuff in for whether or not the user wants VoiceMail active or not and what action to take accordingly. (around line 886). The same prinicple could be used in the BUSY status.

Find the following:

} 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{

Change To :

} 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;

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

} else {


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 25, 2006 10:43 pm 
Offline

Joined: Thu May 11, 2006 12:34 pm
Posts: 28
Hi jono_fowler,

Quote:
I decided to edit the Class.A2billing.php and call it from there. Figured that way i could put some database stuff in for whether or not the user wants VoiceMail active or not and what action to take accordingly. (around line 886). The same prinicple could be used in the BUSY status.


Did you get this working ok? I assume you had to add similar lines for other conditions like busy (as you mentioned), no answer, etc. You still have to add the voicmail.conf manually, right?

Please let us know if you come across any bugs - I'm sure many others want to implement this also.

Thanks


Top
 Profile  
 
 Post subject: display card (pin) number instead of callerID in voicemail
PostPosted: Mon Sep 04, 2006 4:25 am 
Offline

Joined: Mon Sep 04, 2006 2:43 am
Posts: 7
I want a little more..............

My calls are coming from outside PSTN as IP calls and many calls do not have caller ID.

Using a2billing I can bill the call using the PIN (card) number and then using localhost as the trunk I can transfer the call to an asterisk extention.

At no answer, call goes to the voice mail of that entention and email is generated. When there is a caller ID, the caller ID is mentioned in the subject line of the email.

In case of no caller ID, I would like to pass an unique identifier, such as the PIN number (card number) or anything. So that I can trace back who has called.

Is it possible to pass the CARD NUMBER via the voice mail email?

Thanks a lot for the help.

SZ


Top
 Profile  
 
 Post subject: Re: Alternate Forwarding method ?
PostPosted: Tue Oct 17, 2006 2:50 am 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
jono_fowler wrote:
I decided to edit the Class.A2billing.php and call it from there. Figured that way i could put some database stuff in for whether or not the user wants VoiceMail active or not and what action to take accordingly. (around line 886). The same prinicple could be used in the BUSY status.
...
// The following section will send the caller to VoiceMail with the unavailable priority.
$did_number = "u".$agi->request['agi_extension'];
$this -> write_log("[STATUS] CHANNEL UNAVAILABLE - DIVERT TO VOICEMAIL ($did_number)");
$agi-> exec(VoiceMail,$did_number);

} else {


Areski, since now DID is more and more a part of the system, trying to build a Vonage type solution seems more and more realistic. Voice mail for people dialing our SIP clients seems like a good option to include in base system. Is the above method the best choice to use and do you have plans to include voicemail options in A2B config?

Any other thoughts / opinions on it ??


Top
 Profile  
 
 Post subject: Re: Alternate Forwarding method ?
PostPosted: Sun Dec 03, 2006 10:12 pm 
Offline

Joined: Fri Sep 22, 2006 1:56 pm
Posts: 5
jono_fowler wrote:
I decided to edit the Class.A2billing.php and call it from there. Figured that way i could put some database stuff in for whether or not the user wants VoiceMail active or not and what action to take accordingly. (around line 886). The same prinicple could be used in the BUSY status.

Find the following:

} 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{

Change To :

} 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;

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

} else {


Do we have to manually create the voicemail.conf entry?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 20, 2006 6:32 am 
Offline

Joined: Thu May 04, 2006 6:14 am
Posts: 76
Location: Manta - Ecuador
I've done making voicemail possible between sip/iax friends,

Edit:
Code:
/var/lib/asterisk/agi-bin/libs_a2billing/Class.A2Billing.php


Find:
Code:
} elseif ($k+1 == $sip_buddies+$iax_buddies){
                                $prompt="prepaid-dest-unreachable";
                                $agi-> stream_file($prompt, '#');
                        }


And replace:
Code:
} elseif ($k+1 == $sip_buddies+$iax_buddies){
                                // Modificado para habilitar voicemail entre sip/iax friends
                                $prompt="prepaid-dest-unreachable";
                                //$agi-> stream_file($prompt, '#');
                                $buddy="u".$this->destination;
                                $agi-> exec(VoiceMail,$buddy);
                        }


The same will be applied to dialstatus == "NOANSWER" and BUSY.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 20, 2006 4:15 pm 
Offline

Joined: Mon May 29, 2006 7:07 pm
Posts: 287
Location: Denver
Hi we need to figure out how to combine all these settings to one voicemail for SIP friend, DID and access from your softphone-hardphone.
Now looks like we need 3 separate voicemail boxes - previous post SIP friend is using $buddy to identify voicemail, DID is using $did_number and access from softphone-hardphone( other forum topic ) is using Caller_ID. Therefore we need to create 3 separate voicemail boxes instead of one. Any ideas???


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 20, 2006 4:54 pm 
Offline

Joined: Thu May 04, 2006 6:14 am
Posts: 76
Location: Manta - Ecuador
You need only one "voicemail account". $buddy and $did_number are going to these voicemail box. To access from you hardphone to the mailbox you need to create one context to join VoiceMail, for example to join to the mail box of the card 1234567890 you need to create the voicemail at voicemail.conf for the user/card 1234567890 and from your phone dial *97 to access the voicemail:

Code:
vi /etc/asterisk/voicemail.conf
1234567890 => 1234567890,Name of User,[email protected],|sayduration=yes|forcename=yes|forcename=yes|forcegreetings=no|review=yes|operator=yes


And:
Code:
vi /etc/asterisk/extensions.conf
[vmmain]
exten => *97,1,Answer
exten => *97,n,Wait(1)
exten => *97,n,VoiceMailMain(${CALLERID(num)}@default)
exten => *97,n,Hangup

[a2billing]
include => vmmain
exten => _X.,1,Answer
exten => _X.,2,Wait(1)
exten => _X.,3,DeadAGI(a2billing.php|1)
exten => _X.,4,Hangup


This settings are working fine for me for did and sip/iax friends voicemail.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 20, 2006 5:05 pm 
Offline

Joined: Mon May 29, 2006 7:07 pm
Posts: 287
Location: Denver
Thanks for quick reply. i'll try those settings.
But if 1234567890 is cardnumber and we use $did_number ( for example 970xxxxxxx) for DID to voicemail then to Voicemail will be 970xxxxxxx

970xxxxxxx - > voicemail settings in voicemail.conf
and not
1234567890 - > voicemail settings in voicemail.conf

i tried $did_number = "u".$this->username;
so $did_number is 1234567890 instead of 970xxxxxxx.


Also i guess we need to add card number 1234567890 into caller id section below in order work, right?

vi /etc/asterisk/extensions.conf
[vmmain]
exten => *97,1,Answer
exten => *97,n,Wait(1)
exten => *97,n,VoiceMailMain(${CALLERID(num)}@default)
exten => *97,n,Hangup


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 20, 2006 5:15 pm 
Offline

Joined: Thu May 04, 2006 6:14 am
Posts: 76
Location: Manta - Ecuador
Quote:
i tried $did_number = "u".$this->username;
so $did_number is 1234567890 instead of 970xxxxxxx.


Try with :
Code:
$did_number = "u".$agi->request['agi_extension']


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 20, 2006 5:46 pm 
Offline

Joined: Mon May 29, 2006 7:07 pm
Posts: 287
Location: Denver
Hi, my agi_extension = DID number ( 970xxxxx ) and not the card number ( 1234567890 ). i can see it when i debug it.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 20, 2006 6:00 pm 
Offline

Joined: Thu May 04, 2006 6:14 am
Posts: 76
Location: Manta - Ecuador
Humm.. what about using useralias? In example 1234567890 have the card alias 1234 and the sip/iax2 friend are using 1234 as username.

You can define
Code:
$did_number = "u".$this->useralias;


In the vmmain the caller ID will be the user alias.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 20, 2006 11:53 pm 
Offline

Joined: Mon May 29, 2006 7:07 pm
Posts: 287
Location: Denver
Actually username will work fine. for DID
$did_number = "u".$this->username; ( Card number )

for access from softphone+hardphone
exten => *97,n,VoiceMailMain(${CALLERID(num)}@default)

for sip/iax friends
$agi-> exec(VoiceMail,$buddy);

So add caller id as cardnumber and it should be working.
----------------
Question off topic -> can you call SIP friend from PSTN???


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 32 posts ]  Go to page 1, 2, 3  Next
VoIP Billing solution


All times are UTC


Who is online

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