[Freeswitch-users] Javascript, Hanguphooks, CDRs and User Variables.

Anthony Minessale anthony.minessale at gmail.com
Mon Mar 30 15:12:58 PDT 2009


in your script called via api_hangup_hook:

var env = request.dumpENV("text");

consoleLog("info", env);

all those vars are there for you, you can get the individually with
var hval = request.getHeader("some_header");


2009/3/30 Keith Laaks <keithl at voxtelecom.co.za>

>  Hi,
>
>
>
> I have an application where my Javascript hanguphook code calculates a
> value (e.g. the cost of the call which can only be calculated post hangup)
> and I need to have that value appear as a field in the cdrs.
>
>
>
> As the ‘session’ object is no longer available for javascript logic post
> hangup, I can’t figure out how to ‘set’ a user variable post hangup, such
> that it can be written to the cdr when the state changes from  CS_HANGUP ->
> CS_REPORTING.  Maybe it’s just not possible……? It would be a pity to have to
> resort to writing out cdrs from the javascript itself and duplicating what
> fs does so well already.
>
>
>
> Any advice / suggestions would be appreciated.
>
>
>
> Best Regards
>
>
>
> Keith
>
>
>
> _______________________________________________
> 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
>
>


-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:213-799-1400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090330/282a43bc/attachment-0002.html 


More information about the FreeSWITCH-users mailing list