Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 4:11 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Direct RTP connection
PostPosted: Thu Nov 13, 2008 9:57 pm 
Offline

Joined: Wed Nov 12, 2008 1:26 am
Posts: 6
Hello,

I have very simple dial plan like that:
exten => _1514XXXXXXX, 5, DeadAGI(a2billing.php)
exten => _1514XXXXXXX, 6, Hangup

I have canreinvite=yes and nat=no for both incoming and outgoing legs.
I expected that upon call establishment Asterisk will send reINVITE ob both legs to remove itself from RTP path.
It doesn't happen. I don't have SDP in initial incoming INVITE (SDP coming later in ACK as SDP answer). Can it be a reason, that Asteisk doesn't try to renegotiate media upon call establishment? Is there any way to solve that, assuming that I can not provide SDP in initial INVITE?

Thank you,
Boris


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 13, 2008 11:20 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
As described in this ticket, this is due to using the L parameter to Asterisk's dial command.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 14, 2008 4:09 pm 
Offline

Joined: Wed Nov 12, 2008 1:26 am
Posts: 6
Thanks, I changed it to
dialcommand_param = "|60|gS(%timeout%)"


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 14, 2008 11:03 pm 
Offline

Joined: Wed Mar 15, 2006 8:46 am
Posts: 109
stavros, thanks, but is this call still billed correctly by hangup time?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 01, 2008 8:33 pm 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
borisat2billing wrote:
Thanks, I changed it to
dialcommand_param = "|60|gL(%timeout%)"


That worked for you? You now are out of the RTP layer? and the only issue is that there is no voice prompts for 60 seconds remaining, etc?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 15, 2008 4:03 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
borisat2billing wrote:
Thanks, I changed it to
dialcommand_param = "|60|gS(%timeout%)"
That's good, but the Dial() command's L option takes milliseconds whereas S takes seconds; you need to also change the code in /var/lib/asterisk/agi-bin/libs_a2billing/Class.RateEngine.php line 1099 to remove the '*1000':
Quote:
$dialparams = str_replace("%timeout%", min($timeout * 1000, $max_long), $A2B->agiconfig['dialcommand_param']);


Last edited by stavros on Mon Apr 06, 2009 5:54 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Hi Stayros,
PostPosted: Wed Mar 18, 2009 5:13 pm 
Offline

Joined: Fri Feb 13, 2009 10:33 am
Posts: 17
Following this conversation i would like to ask the following:

In my scenario I try to setup A2B for WholeSale use. In this case I don't need to play any file to the caller concerning the time left from L paramater of Dial() command. So in this case if I use:

dialcommand_param = "|60|rRgS(%timeout%)"

and NOT

dialcommand_param = "|60|rRgL(%timeout%)"

Is that ok??
From documentation in voip-info i found that with S(x:seconds) parameter I can do the same job (disconnecting the call when there are no more credits) and NOT doing transcoding and NOT passing the RTP media through my A2B server.

How all these things sound? They are correct?

Thanks in advance for any help

P.S. I believe that your previus answer is given having as parameter the S and not the L parameter , as is spelled there. I just wont to be sure also that there is nothing else to change except the dial command and the script that your are mentioning above.

BR

rebel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 19, 2009 4:12 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
The use of the r or R option will also disable the reinvite and keep your asterisk in the RTP path.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 19, 2009 7:50 am 
Offline

Joined: Fri Feb 13, 2009 10:33 am
Posts: 17
hey asiby,

Thanks for the (r,R) note.

The first thing is to change the Dial command. The second thing is to change line 1099 in the file and path /var/lib/asterisk/agi-bin/libs_a2billing/Class.RateEngine.php. To remove the *1000 from that line.
My question is this:
I'm finding the same file and in an other path. In lib of A2Billing_UI witch contain the same line of code as the previous file mentioned before. This second file should be changed also or is not used by the system ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 19, 2009 4:25 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
The should be same. I am not sure why there are different on your machine. One thing is certain, that part of the code is more relevant to the AGI script than it is to the UI.

Cheers


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 22, 2009 11:18 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
rebel wrote:
I'm finding the same file and in an other path. In lib of A2Billing_UI witch contain the same line of code as the previous file mentioned before. This second file should be changed also or is not used by the system ?
It is used, but only by the Admin UI. You'll find another copy in the Customer UI folder.
Strictly, you only need to modify the copy in the AGI's folder. It's good form to keep the Class.* synchronised across these three folders.
V1.4 uses symlinks instead, so there would be only one file in need of modification.


Top
 Profile  
 
 Post subject: Hey guys,
PostPosted: Mon Mar 23, 2009 9:03 am 
Offline

Joined: Fri Feb 13, 2009 10:33 am
Posts: 17
Thank you very match for your support.

Rebel,


Top
 Profile  
 
 Post subject: confused
PostPosted: Mon Apr 06, 2009 2:22 pm 
Offline

Joined: Mon Apr 06, 2009 1:01 am
Posts: 14
Ok so I’m confused about what needs to be done here. I am setup and working for the "wholesale" configuration and it works well as long as there is no 729 introduced from the client.

I have tried the following and have no idea if it is correct.
dialcommand_param = "|60|gS(%timeout%:61000:30000)"
dialcommand_param = "|60|gL(%timeout%:61000:30000)"

I have also configured the class.rateengine.php file to=
/var/lib/asterisk/agi-bin/libs_a2billing/Class.RateEngine.php. To remove the *1000 from that line.
$dialparams = str_replace("%timeout%", min($timeout , $max_long), $A2B->agiconfig['dialcommand_param']);

When I call out it connects then ends the call immediately.

Of course thank you for your help and input!


Top
 Profile  
 
 Post subject: Re: confused
PostPosted: Mon Apr 06, 2009 5:04 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
zane9362 wrote:
dialcommand_param = "|60|gS(%timeout%:61000:30000)"
So try using the correct syntax, as documented earlier in this thread. S() only takes one parameter.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 13, 2009 6:52 pm 
Offline

Joined: Mon Apr 06, 2009 1:01 am
Posts: 14
So what is it that this string does in the Class.RateEngine.php file. Will this affect the billing? If I take the "* 1000" out of the string then the call will connect for 2 sec and terminate. WHY?

Thanks for the info!

$dialparams = str_replace("%timeout%", min($timeout , $max_long), $A2B->agiconfig['dialcommand_param']);

$dialparams = str_replace("%timeout%", min($timeout * 1000, $max_long), $A2B->agiconfig['dialcommand_param']);


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Auto Dialer Software


All times are UTC


Who is online

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