Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Wed Sep 18, 2019 1:55 pm
Voice Broadcast System


All times are UTC




Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Billing error on call transfer
PostPosted: Sat Jan 12, 2008 11:35 pm 
Offline

Joined: Wed Mar 15, 2006 1:13 am
Posts: 27
Hello,

I have a problem with call transfers, I have SIP phones which are using a2billing to bill the outgoing calls. If I dial an external number, it goes thru a2billing and everything is billed correctly. If I'm on a call and I transfer that call to another phone, as soon as the call is answered from the other phone, the AGI scripts stops(AGI Script a2billing.php completed, returning 0) and the billing stops while the call continues, therefore charging less to the client that the actual call time.

Is there a way to make this behavior change?

Thanks :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 14, 2008 8:50 pm 
Offline

Joined: Mon Oct 01, 2007 10:44 pm
Posts: 230
Location: Bovey, Devon, UK
Check this post, it may be related

regards

http://forum.asterisk2billing.org/viewtopic.php?t=2952&highlight=


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 14, 2008 8:56 pm 
Offline

Joined: Wed Mar 15, 2006 1:13 am
Posts: 27
middletn wrote:


It's the same problem as I have, except that the "i" doesn't do anything for me because it's not a call forward, but a call transfer after the call was answered (like in an office when the secretary transfers a call to another desk)

Anyone experimented that kind of problem?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 14, 2008 9:26 pm 
Offline

Joined: Mon Oct 01, 2007 10:44 pm
Posts: 230
Location: Bovey, Devon, UK
It's still a reinvite. Have you tested the 'i' solution?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 14, 2008 9:30 pm 
Offline

Joined: Wed Mar 15, 2006 1:13 am
Posts: 27
Yes I did, and it still releases the billing as if the call was terminated when the transfer was made.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 14, 2008 10:29 pm 
Offline

Joined: Mon Oct 01, 2007 10:44 pm
Posts: 230
Location: Bovey, Devon, UK
Then this sounds like a MAJOR problem. I'll test shortly

Thanks for raising this issue.

regards

[Edit] Not finding this a problem with IAX calls, take it that it's a SIP issue?


Last edited by middletn on Mon Jan 14, 2008 10:31 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 14, 2008 10:30 pm 
Offline

Joined: Wed Mar 15, 2006 1:13 am
Posts: 27
thanks for looking into this!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 14, 2008 10:32 pm 
Offline

Joined: Mon Oct 01, 2007 10:44 pm
Posts: 230
Location: Bovey, Devon, UK
Question: Do you have re-invites set to no ?

regards


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 14, 2008 10:34 pm 
Offline

Joined: Wed Mar 15, 2006 1:13 am
Posts: 27
I have tried with both, and it results to the same thing


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 18, 2008 3:33 pm 
Offline

Joined: Wed Mar 15, 2006 1:13 am
Posts: 27
Yes I'm only using SIP


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 26, 2008 5:32 pm 
Offline

Joined: Wed Mar 15, 2006 1:13 am
Posts: 27
were you able to reproduce it?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 03, 2008 4:06 pm 
Offline

Joined: Mon Oct 01, 2007 10:44 pm
Posts: 230
Location: Bovey, Devon, UK
mbutler wrote:
were you able to reproduce it?


Yes, and in doing so discovered calls placed via a queue were not being billed either. However I've found a flag that cures this.

The curprite is the local channel driver. A local channel is created on a transfer and then deleted once the call is patched. I can see no way of retaining this in a normal transfer scenario. This is not a bug with A2B, but a 'feature' or rather a flaw in asterisk's call accounting.

What's the cure? I believe that fronting asterisk with SER/Openser should resolve the issue. I'm working on that now

regards


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 27, 2008 8:01 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
:mrgreen: I've thought of a possible workaround, but beware! It is so ugly and kludgey you may go blind just by looking at it.
Merge this into Asterisk's features.conf:
Code:
[general]
featuredigittimeout = 1000

[applicationmap]
xferone => #201,peer/callee,Set,AGIXFER=201
xfertwo => #202,peer/callee,Set,AGIXFER=202
xferthree => #203,peer/callee,Set,AGIXFER=203

And modify how you are already launching A2Billing in your Asterisk dialplan:
Code:
[custom-a2billing]
exten => _X.,1,Set(DYNAMIC_FEATURES=xferone#xfertwo#xferthree)
exten => _X.,2,Answer
exten => _X.,3,Wait(0.25)
exten => _X.,4,Set(AGIXFER="")
exten => _X.,5,DeadAGI(a2billing.php|1)
exten => _X.,6,Wait(0.25)
exten => _X.,7,GotoIf(${AGIXFER}?${AGIXFER},4)
exten => _X.,8,Hangup
To do a blind transfer dial #201 and hangup. I can't think of a way to easily support attended transfer.
You may need to set 'answer_call=no' in a2billing.conf. This is totally untested. If it breaks (or is already broken) please realise I may not have enough glue to fix it for you.

Added after 13 minutes:

I forgot to mention this method should give one CDR for each leg answered, and supports being transferred more than once. The drawback is that I think each CDR will be billed from the moment the first call was answered, leading to incorrect billing. I guess this is better than hanging-up on clients.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 28, 2008 1:33 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
I had word from Bruno via email confirming this workaround does work. It's been tested at least once now. :P


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 28, 2008 1:44 am 
Offline

Joined: Wed Mar 15, 2006 8:46 am
Posts: 109
FYI

http://asterisk.org/node/48358


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


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