[asterisk-users] sip to dahdi and billsec

Lyle Giese lyle at lcrcomputer.net
Sun Jan 31 19:10:46 CST 2010


Uros Djokic wrote:
> Hi,
>
> My costumers are logged in on my Asterisk PBX through XLite Softphone
> (SIP). My server is
> connected to PSTN. Problem is when SIP phone calls ordinary phone via
> dahdi I get
> DAHDI/1-1 ANSWERED SIP/number-number and billsec field from cdr is
> start counting.
>
> Is it normal behavior ? Can I change that ?
>
> So channel gets in ANSWERED state and billsec starts as soon as line
> starts
> to ring even if no one really pick up ordinary phone and costumer did
> not talk to anyone.
> That leads to problem that costumers will be billed even if they did
> not make a real
> conversation.
>
> How can I avoid that behavior and set asterisk to start counting
> billsecs after
> someone really pick up the phone on the other side ?
>
> How can I distinguish real (talking to) call from just ring (no real
> answer call)
> when both are in state ANSWERED ?
>
> I tried with timeout 20 in Dial command but since channel is
> "answered" when it
> starts to ring timeout is not doing what I want.
>
> Here is my Dial command:
> exten => _X.,n,Dial(dahdi/g0/${EXTEN},20,L(${Limit}:60000:20000)hH)
>
> It works very good in case ordinary phone calls sip (for incoming
> calls from PSTN)
> because I need to click answer on xlite to move call in state ANSWERED
> so if I don't
> click it is not answered and timeout works.
>
> Can you help me with that ?
>
> Thanks,
> Uros
>
>
> -- 
> Use Free Software http://www.fsf.org/
> -----------------------------------------------
> Four essential software freedoms:
> 1) To study source code
> 2) To copy program
> 3) To modify source code
> 4) To redistribute modified program under condition that new user has
> all 4 freedoms.
> Richard M. Stallman
It entirely depends on the technology used to interface to the PSTN. 
You have not specified what technology/hardware you are using to connect
to the PSTN.

For instance if you are using POTS(plain old telephone service - analog
copper fed lines), you do not get answer supervision back from the telco.

Lyle Giese
LCR Computer Services, Inc.




More information about the asterisk-users mailing list