Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
>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.
bbe...@mail.bg wrote:
--
Darren Wiebe
dar...@aleph-com.net
Aleph Communications
ASTPP - Open Source Voip Billing & Calling Cards
www.aleph-com.net/astpp
<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
>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/$phone\@$res->{path}|30|HL/n(" . ($maxtime * 60 * 1000) .
":60000:30000)";
Either the billseconds is empty(when dial out through Local), either there is
a<ZOMBIE> when dialing in.
I put back the dialstring to:
"Local/$phone/$res->{path}|30|HL/n(" . ($maxtime * 60 * 1000) .
":60000:30000)";
The only difference that it looks only for is a default context.
extensions.conf
[inbound]
; 10 digits DID = _XXXXXXXXXX = cardnumber
;
exten => _XXXXXXXXXX ,1,Answer()
exten => _XXXXXXXXXX ,n,Set(DB(RCID/${CALLERIDNUM})=${CALLERIDNUM})
exten => _XXXXXXXXXX ,n,Set(realcid=${DB(RCID/${CALLERIDNUM})})
exten => _XXXXXXXXXX ,n,Noop(${REALCID})
;exten => _XXXXXXXXXX ,n,Set(TIMEOUT(digit)=4)
exten => _XXXXXXXXXX ,n,Set(CALLERID(number)=${EXTEN})
exten => _XXXXXXXXXX ,n,Set(CALLERID(name)= ${REALCID})
;exten => t,3,Goto(h|1)
;exten => _XXXXXXXXXX 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?