Re: [Asterisk-Users] Billing inbound calls per minute
Hours of struggling later, I have found the problem. Here is the correct format for those outgoing calls. SIP/[EMAIL PROTECTED]||L(54081429:6:3)|Hj I'll try to get a patch done up one of these days. Darren Wiebe [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On 00:30, Mon 06 Feb 06, [EMAIL PROTECTED] wrote: I've been playing with astcc, but while 'billseconds' stays empty, 'billcost' has strange behavior - either stays ampty or takes ONCE the Connect fee(if I put one) and keeps it that way no matter how long the call is ...( if no Connect fee -stays empty). i.e. [inbound] exten = 1122334455,1,Set(CALLERID(number)=${EXTEN}) exten = 1122334455,2,DeadAGI(astcc.agi,${CALLERIDNUM},${EXTEN},4) exten = 1122334455,3,Hangup Michiel van Baak wrote: DeadAGI is for hungup channels, not for active channels. That might be a problem. Try this: exten = h,1,DeadAGI(astcc.agi,${CALLERIDNUM},${EXTEN},4) On Monday 06 February 2006 09:25, JP Carballo wrote: ASTCC works fine here. The duration and billseconds fields in my cdrs as well as ASTCC's cdr are filled. I don't use the connect fee field though and all are set to 0. Would you share with me how'd you do billing on a DID (if you do), and through what Technology? Anything that goes Local here is ANSWEREDTIME zero. On Saturday 11 February 2006 06:32, Darren Wiebe wrote: Are you running a relatively recent version of ASTCC? Say within the last 6 months. The answeredtime = 0 bug was supposed to have been fixed by http://bugs.digium.com/view.php?id=4300 Unless something has changed in Asterisk that affects this Thanks Daren, Yes, my version of astcc is the most recent one. Asterisk-1.2.4 I have found you patch 0004300 from 16 May 2005. Probably it's time to reverse it back since something has changed in Asterisk that affects this... as you said. My observation is: If I keep: $dialstr = Local/[EMAIL PROTECTED]{path}|30|HL/n( . ($maxtime * 60 * 1000) . :6:3); Either the billseconds is empty(when dial out through Local), either there is aZOMBIE when dialing in. I put back the dialstring to: Local/$phone/$res-{path}|30|HL/n( . ($maxtime * 60 * 1000) . :6:3); The only difference that it looks only for is a default context. extensions.conf [inbound] ; 10 digits DID = _XX = cardnumber ; exten = _XX ,1,Answer() exten = _XX ,n,Set(DB(RCID/${CALLERIDNUM})=${CALLERIDNUM}) exten = _XX ,n,Set(realcid=${DB(RCID/${CALLERIDNUM})}) exten = _XX ,n,Noop(${REALCID}) ;exten = _XX ,n,Set(TIMEOUT(digit)=4) exten = _XX ,n,Set(CALLERID(number)=${EXTEN}) exten = _XX ,n,Set(CALLERID(name)= ${REALCID}) ;exten = t,3,Goto(h|1) ;exten = _XX 2,Goto(s|1) ;exten = s,1,Wait,1 ; is this preventing HUP? exten = h,1,DeadAGI(astcc.agi,${CALLERIDNUM},${CALLERIDNUM},4) ; must be h,1 as per Michiel van Baak note(above). exten = h,2,Hangup [internal] ; i.e. 360 1234567 = DID = card exten = 3601234567,1,Macro(stdexten,3601234567,sip/did_owner) [default] include = internal [personal] exten = t,1,Hangup include = inbound Result: - ANSWEREDTIME is OK - inbound call billed on the callee - there is CALLERID(name) for callerid in the cdrs(kind of) There is still a small but looong problem - Timeout about 10 secs long while the IAX2/incoming Hangup in personal,t,1. But CDR is updated after that and the call is billed as expected. Sorry for the long explanation. What do you think? Is there something suspicious in that solution? Thanks, benchev ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- Darren Wiebe [EMAIL PROTECTED] Aleph Communications ASTPP - Open Source Voip Billing Calling Cards www.aleph-com.net/astpp ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Billing inbound calls per minute
On Monday 06 February 2006 09:25, JP Carballo wrote: snip ASTCC works fine here. The duration and billseconds fields in my cdrs as well as ASTCC's cdr are filled. I don't use the connect fee field though and all are set to 0. Would you share with me how'd you do billing on a DID (if you do), and through what Technology? Anything that goes Local here is ANSWEREDTIME zero. Thanks, benchev That probably explains it. IIRC, from when I was still testing ASTCC, when calling a Local channel, the AGI suffers from short term memory loss and forgets the values of channel variables even if /n is used in the dial string. I checked my test server logs and while I can verify that ASTCC's CDR does have blank duration and billsec fields for the Local calls, *'s CDR records them. Similar here, and I read the patch from Darren May, 2005 where Local/$phone/$res-{path}|30|HL/n was changed to Local/[EMAIL PROTECTED]{path}|30|HL/n snip I do billing based on account number so clients are free to call from any phone. I don't check callerid. Since each account is based on the phone number registered by the client, I can just chop off the 2 digit prefix and set their callerid with the result. Yes, I do that also with another instance of astcc, I call astcc-disa.agi to allow clients from outside to enter * and do things. [makecall] exten = s,1,Set(CALLERID(num)=${CARDNO:2}) exten = s,n,DeadAGI(astcc.agi,${CARDNO}) exten = s,n,Goto(nf2xsubmenu,s,1) All my calls are routed to IAX2 or SIP or Zap. And this is my problem because my target is to use Local, but please follow my answer, within that thread, to Darren. Thanks very much for your help. benchev ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Billing inbound calls per minute
On 00:30, Mon 06 Feb 06, [EMAIL PROTECTED] wrote: I've been playing with astcc, but while 'billseconds' stays empty, 'billcost' has strange behavior - either stays ampty or takes ONCE the Connect fee(if I put one) and keeps it that way no matter how long the call is ...( if no Connect fee -stays empty). i.e. [inbound] exten = 1122334455,1,Set(CALLERID(number)=${EXTEN}) exten = 1122334455,2,DeadAGI(astcc.agi,${CALLERIDNUM},${EXTEN},4) exten = 1122334455,3,Hangup Michiel van Baak wrote: DeadAGI is for hungup channels, not for active channels. That might be a problem. Try this: exten = h,1,DeadAGI(astcc.agi,${CALLERIDNUM},${EXTEN},4) On Monday 06 February 2006 09:25, JP Carballo wrote: ASTCC works fine here. The duration and billseconds fields in my cdrs as well as ASTCC's cdr are filled. I don't use the connect fee field though and all are set to 0. Would you share with me how'd you do billing on a DID (if you do), and through what Technology? Anything that goes Local here is ANSWEREDTIME zero. On Saturday 11 February 2006 06:32, Darren Wiebe wrote: Are you running a relatively recent version of ASTCC? Say within the last 6 months. The answeredtime = 0 bug was supposed to have been fixed by http://bugs.digium.com/view.php?id=4300 Unless something has changed in Asterisk that affects this Thanks Daren, Yes, my version of astcc is the most recent one. Asterisk-1.2.4 I have found you patch 0004300 from 16 May 2005. Probably it's time to reverse it back since something has changed in Asterisk that affects this... as you said. My observation is: If I keep: $dialstr = Local/[EMAIL PROTECTED]{path}|30|HL/n( . ($maxtime * 60 * 1000) . :6:3); Either the billseconds is empty(when dial out through Local), either there is aZOMBIE when dialing in. I put back the dialstring to: Local/$phone/$res-{path}|30|HL/n( . ($maxtime * 60 * 1000) . :6:3); The only difference that it looks only for is a default context. extensions.conf [inbound] ; 10 digits DID = _XX = cardnumber ; exten = _XX ,1,Answer() exten = _XX ,n,Set(DB(RCID/${CALLERIDNUM})=${CALLERIDNUM}) exten = _XX ,n,Set(realcid=${DB(RCID/${CALLERIDNUM})}) exten = _XX ,n,Noop(${REALCID}) ;exten = _XX ,n,Set(TIMEOUT(digit)=4) exten = _XX ,n,Set(CALLERID(number)=${EXTEN}) exten = _XX ,n,Set(CALLERID(name)= ${REALCID}) ;exten = t,3,Goto(h|1) ;exten = _XX 2,Goto(s|1) ;exten = s,1,Wait,1 ; is this preventing HUP? exten = h,1,DeadAGI(astcc.agi,${CALLERIDNUM},${CALLERIDNUM},4) ; must be h,1 as per Michiel van Baak note(above). exten = h,2,Hangup [internal] ; i.e. 360 1234567 = DID = card exten = 3601234567,1,Macro(stdexten,3601234567,sip/did_owner) [default] include = internal [personal] exten = t,1,Hangup include = inbound Result: - ANSWEREDTIME is OK - inbound call billed on the callee - there is CALLERID(name) for callerid in the cdrs(kind of) There is still a small but looong problem - Timeout about 10 secs long while the IAX2/incoming Hangup in personal,t,1. But CDR is updated after that and the call is billed as expected. Sorry for the long explanation. What do you think? Is there something suspicious in that solution? Thanks, benchev ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Billing inbound calls per minute
On Monday 06 February 2006 09:25, JP Carballo wrote: Michiel van Baak wrote: On 00:30, Mon 06 Feb 06, [EMAIL PROTECTED] wrote: Hi, Does anyone have a neat idea as how to bill inbound calls per minute(second) real time? I've been pplaying with astcc, but while 'billseconds' stays empty, 'billcost' has strange behavior - either stays ampty or takes ONCE the Connect fee(if I put one) and keeps it that way no matter how long the call is ...( if no Connect fee -stays empty). i.e. [inbound] exten = 1122334455,1,Set(CALLERID(number)=${EXTEN}) exten = 1122334455,2,DeadAGI(astcc.agi,${CALLERIDNUM},${EXTEN},4) exten = 1122334455,3,Hangup DeadAGI is for hungup channels, not for active channels. That might be a problem. Try this: exten = h,1,DeadAGI(astcc.agi,${CALLERIDNUM},${EXTEN},4) ASTCC works fine here. The duration and billseconds fields in my cdrs as well as ASTCC's cdr are filled. I don't use the connect fee field though and all are set to 0. Would you share with me how'd you do billing on a DID (if you do), and through what Technology? Anything that goes Local here is ANSWEREDTIME zero. Thanks, benchev ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Billing inbound calls per minute
[EMAIL PROTECTED] wrote: On Monday 06 February 2006 09:25, JP Carballo wrote: snip ASTCC works fine here. The duration and billseconds fields in my cdrs as well as ASTCC's cdr are filled. I don't use the connect fee field though and all are set to 0. Would you share with me how'd you do billing on a DID (if you do), and through what Technology? Anything that goes Local here is ANSWEREDTIME zero. Thanks, benchev That probably explains it. IIRC, from when I was still testing ASTCC, when calling a Local channel, the AGI suffers from short term memory loss and forgets the values of channel variables even if /n is used in the dial string. I checked my test server logs and while I can verify that ASTCC's CDR does have blank duration and billsec fields for the Local calls, *'s CDR records them. If it's also true for you, you might want to use *'s CDRs for rating. I do billing based on account number so clients are free to call from any phone. I don't check callerid. Since each account is based on the phone number registered by the client, I can just chop off the 2 digit prefix and set their callerid with the result. [makecall] exten = s,1,Set(CALLERID(num)=${CARDNO:2}) exten = s,n,DeadAGI(astcc.agi,${CARDNO}) exten = s,n,Goto(nf2xsubmenu,s,1) All my calls are routed to IAX2 or SIP or Zap. -- JP Carballo http://www.netfone2x.com Bringing the world closer. It might look like I'm doing nothing, but at the cellular level, I'm really quite busy. ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Billing inbound calls per minute
Are you running a relatively recent version of ASTCC? Say within the last 6 months. The answeredtime = 0 bug was supposed to have been fixed by http://bugs.digium.com/view.php?id=4300 Unless something has changed in Asterisk that affects this [EMAIL PROTECTED] wrote: On Monday 06 February 2006 09:25, JP Carballo wrote: Michiel van Baak wrote: On 00:30, Mon 06 Feb 06, [EMAIL PROTECTED] wrote: Hi, Does anyone have a neat idea as how to bill inbound calls per minute(second) real time? I've been pplaying with astcc, but while 'billseconds' stays empty, 'billcost' has strange behavior - either stays ampty or takes ONCE the Connect fee(if I put one) and keeps it that way no matter how long the call is ...( if no Connect fee -stays empty). i.e. [inbound] exten = 1122334455,1,Set(CALLERID(number)=${EXTEN}) exten = 1122334455,2,DeadAGI(astcc.agi,${CALLERIDNUM},${EXTEN},4) exten = 1122334455,3,Hangup DeadAGI is for hungup channels, not for active channels. That might be a problem. Try this: exten = h,1,DeadAGI(astcc.agi,${CALLERIDNUM},${EXTEN},4) ASTCC works fine here. The duration and billseconds fields in my cdrs as well as ASTCC's cdr are filled. I don't use the connect fee field though and all are set to 0. Would you share with me how'd you do billing on a DID (if you do), and through what Technology? Anything that goes Local here is ANSWEREDTIME zero. Thanks, benchev ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- Darren Wiebe [EMAIL PROTECTED] Aleph Communications ASTPP - Open Source Voip Billing Calling Cards www.aleph-com.net/astpp ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Billing inbound calls per minute
Does anyone have a neat idea as how to bill inbound calls per minute(second) real time? I've been pplaying with astcc, but while 'billseconds' stays empty, 'billcost' has strange behavior - either stays ampty or takes ONCE the Connect fee(if I put one) and keeps it that way no matter how long the call is ...( if no Connect fee -stays empty). i.e. [inbound] exten = 1122334455,1,Set(CALLERID(number)=${EXTEN}) exten = 1122334455,2,DeadAGI(astcc.agi,${CALLERIDNUM},${EXTEN},4) exten = 1122334455,3,Hangup DeadAGI is for hungup channels, not for active channels. That might be a problem. Try this: exten = h,1,DeadAGI(astcc.agi,${CALLERIDNUM},${EXTEN},4) Thanks, tried that several ways but no help since ${EXTEN}=h. Probably will try with CHANISAVAIL or ${CHANNEL} or something... ASTCC works fine here. The duration and billseconds fields in my cdrs as well as ASTCC's cdr are filled. I don't use the connect fee field though and all are set to 0. Sure ASTCC works, but I am talking about inbound calls where 1122334455 is a DID as well as a card number being charged for the incoming calls. Thus ${EXTEN}=DID=card i.e. exten = 1122334455,1,Set(CALLERID(number)=${EXTEN}) Mayby I should not assosiate DID from card(user) and create a separate peer for the DID on a different port. Any other ideas? Thanks. benchev ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] Billing inbound calls per minute
Hi, Does anyone have a neat idea as how to bill inbound calls per minute(second) real time? I've been pplaying with astcc, but while 'billseconds' stays empty, 'billcost' has strange behavior - either stays ampty or takes ONCE the Connect fee(if I put one) and keeps it that way no matter how long the call is ...( if no Connect fee -stays empty). i.e. [inbound] exten = 1122334455,1,Set(CALLERID(number)=${EXTEN}) exten = 1122334455,2,DeadAGI(astcc.agi,${CALLERIDNUM},${EXTEN},4) exten = 1122334455,3,Hangup Thanks in advance, benchev ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Billing inbound calls per minute
On 00:30, Mon 06 Feb 06, [EMAIL PROTECTED] wrote: Hi, Does anyone have a neat idea as how to bill inbound calls per minute(second) real time? I've been pplaying with astcc, but while 'billseconds' stays empty, 'billcost' has strange behavior - either stays ampty or takes ONCE the Connect fee(if I put one) and keeps it that way no matter how long the call is ...( if no Connect fee -stays empty). i.e. [inbound] exten = 1122334455,1,Set(CALLERID(number)=${EXTEN}) exten = 1122334455,2,DeadAGI(astcc.agi,${CALLERIDNUM},${EXTEN},4) exten = 1122334455,3,Hangup DeadAGI is for hungup channels, not for active channels. That might be a problem. Try this: exten = h,1,DeadAGI(astcc.agi,${CALLERIDNUM},${EXTEN},4) -- Michiel van Baak http://michiel.vanbaak.info [EMAIL PROTECTED] GnuPG key: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x7E0B9A2D Why is it drug addicts and computer afficionados are both called users? ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Billing inbound calls per minute
Michiel van Baak wrote: On 00:30, Mon 06 Feb 06, [EMAIL PROTECTED] wrote: Hi, Does anyone have a neat idea as how to bill inbound calls per minute(second) real time? I've been pplaying with astcc, but while 'billseconds' stays empty, 'billcost' has strange behavior - either stays ampty or takes ONCE the Connect fee(if I put one) and keeps it that way no matter how long the call is ...( if no Connect fee -stays empty). i.e. [inbound] exten = 1122334455,1,Set(CALLERID(number)=${EXTEN}) exten = 1122334455,2,DeadAGI(astcc.agi,${CALLERIDNUM},${EXTEN},4) exten = 1122334455,3,Hangup DeadAGI is for hungup channels, not for active channels. That might be a problem. Try this: exten = h,1,DeadAGI(astcc.agi,${CALLERIDNUM},${EXTEN},4) ASTCC works fine here. The duration and billseconds fields in my cdrs as well as ASTCC's cdr are filled. I don't use the connect fee field though and all are set to 0. -- JP Carballo http://www.netfone2x.com Bringing the world closer. It might look like I'm doing nothing, but at the cellular level, I'm really quite busy. ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users