[Freeswitch-users] Problem in geting call duration

vidhya sagar dixit vids.cs at gmail.com
Wed Aug 20 23:27:44 PDT 2008


Thanks Dave. Will do the same .

On Thu, Aug 21, 2008 at 11:46 AM, David Knell <dave at 3c.co.uk> wrote:

> Hi -
> > How it will be possible to take dtmf digits from users when using
> > session.preAnswer().
> By and large, you can't.  There's no forward audio path established
> until the call's answered.
>
>
> >
> > 1. User dials a DID number.
> > 2.  Call comes to public .xml and  then runs the javascript .
> > 3. javascript first play the account balance of the user (i know it
> > can be done with session.preAnswer.)
> > 4.After playing balance  script ask to enter the destination number
> > ...(this will not work with session.preAnswer())
> > 6. then dial the entered number.
> > 7. after call completion get the CDR for the call which shows the
> > duration of call.(only call duration of new session originated in
> > javascript.)
> You'll need to answer the call before the user enters the destination
> number.  We do something similar (but not in Javascript..) - we get two
> XML CDRs for each call, one for the inbound leg and one for the
> outbound.  Set a variable on the outbound leg with the caller's user ID
> in your system; you can then link the CDR for the outbound call back to
> the user and bill them.
>
> Cheers --
>
> Dave
>
> --
> David Knell, Director, 3C Limited
> T: 020 8114 8901  F: 020 3002 7257  M: 001 415 630 3031
> http://www.3c.co.uk
>
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>



-- 
Thanks and Regards

Vidhya Sagar Dixit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20080821/ff308232/attachment-0002.html 


More information about the FreeSWITCH-users mailing list