paulc
bdcfd22d5b
Added Javascript methods for enabling and controlling debug levels.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@5605 acf43c95-373e-0410-b603-e72c3f656dc1
2013-08-05 09:56:52 +00:00
paulc
2d7d0489d5
Added Engine.alarm() method in Javascript.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@5564 acf43c95-373e-0410-b603-e72c3f656dc1
2013-07-05 12:50:18 +00:00
paulc
6f028c32cb
Added method to set the debug name of Javascript instances.
...
Implemented reentrant operation mode for JS Message.dispatch()
git-svn-id: http://yate.null.ro/svn/yate/trunk@5465 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-12 15:18:50 +00:00
andrei
dffa68a0c1
Added support for timeouts and interval in JavaScript.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@5457 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-12 14:00:39 +00:00
andrei
fe4f9e7a18
Added MessageQueue support in JavaScript.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@5456 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-12 13:56:00 +00:00
paulc
53b28b870a
Added static method to set or retrieve the tracker name in JS handlers.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@5445 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-12 12:55:51 +00:00
paulc
2f19c830c2
Store ExpOperations in JsObjects so the value type is preserved.
...
Automatically convert database results to numbers if possible.
Added faster method ExpOperation::typeOf()
git-svn-id: http://yate.null.ro/svn/yate/trunk@5444 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-12 12:54:30 +00:00
paulc
d6476113c5
Allow specifying a filter for Javascript message handlers.
...
Mask message handlers early enough to avoid trace file races at shutdown.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5443 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-12 12:53:10 +00:00
paulc
b3c4c0c694
Added support for tracing Javascript execution in KCacheGrind format.
...
Fixed line counting for a possible keyword or identifier at end of line.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5439 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-12 12:46:21 +00:00
paulc
3854ec61c2
Allow manually evaluating JS expressions in a specific context.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@5437 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-12 12:41:47 +00:00
oana
3d75d22828
Added functions unprefixedTag(), getTag(), removeAttribute() and clearChildren() to the Javascript XML API.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@5434 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-12 12:08:13 +00:00
oana
2d65f043cb
Do linking (jump resolving) for Javascript code.
...
Added configuration parameter to enable/disable linking.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5407 acf43c95-373e-0410-b603-e72c3f656dc1
2013-02-14 14:37:20 +00:00
oana
6df78f9dcb
Lock context while evaluating instructions.
...
Don't do context initialization everytime the execution of the script is reset.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5403 acf43c95-373e-0410-b603-e72c3f656dc1
2013-02-12 15:47:54 +00:00
oana
6f6932de07
Fixed XML constructor from string.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@5386 acf43c95-373e-0410-b603-e72c3f656dc1
2013-01-28 10:57:41 +00:00
paulc
aa90a97779
Added XML support in Javascript.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@5366 acf43c95-373e-0410-b603-e72c3f656dc1
2012-12-21 10:21:16 +00:00
paulc
1848fe201f
Added support for calling object methods by variable.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@5332 acf43c95-373e-0410-b603-e72c3f656dc1
2012-11-20 16:11:38 +00:00
paulc
20b149f704
Added setting to allow DebugFail from Javascript.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@5331 acf43c95-373e-0410-b603-e72c3f656dc1
2012-11-20 16:08:25 +00:00
paulc
cb3efae166
Added reload Javascript command.
...
Fixed some potential concurrency issues.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5316 acf43c95-373e-0410-b603-e72c3f656dc1
2012-11-01 14:58:46 +00:00
paulc
f3ab3dee03
Abandon Javascript message handlers on shutdown since they get destroyed by the engine anyway.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@5315 acf43c95-373e-0410-b603-e72c3f656dc1
2012-11-01 11:18:35 +00:00
paulc
713b9b4bd9
Clear the "message" member of Channel only when script ended, else just mark it invalid.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@5207 acf43c95-373e-0410-b603-e72c3f656dc1
2012-07-24 10:31:12 +00:00
paulc
186e26d218
Changed name of Javascript rmanager command from "js" to "javascript".
...
Implemented line completion, info and status.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5170 acf43c95-373e-0410-b603-e72c3f656dc1
2012-07-02 11:55:34 +00:00
paulc
1e443066b9
Added methods to JS Message for accessing an Yate Array attached to an Yate Message.
...
This allows retrieving database query results.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5162 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-28 18:23:04 +00:00
paulc
d6e57e9f4c
Added an Engine.shared singleton object that exposes in JS the engine shared variables.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@5160 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-27 17:49:49 +00:00
paulc
92efe58739
Added "message" variable in routing scope context.
...
Removed current message parameters from routing scope context.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5156 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-27 12:57:18 +00:00
paulc
e57c6dc740
Deep copy inline objects and arrays when placing them in a context.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@5154 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-26 16:40:38 +00:00
paulc
5bbbe0ead9
Fixed the call context creation, was double wrapping the scope and this objects.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@5152 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-26 13:31:30 +00:00
paulc
87ca03bec0
Added method Channel.answered() to check if the call leg was answered.
...
Allow the onDisconnected() function to override the default reroute behavior.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5147 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-22 14:42:41 +00:00
paulc
788ed299f7
Fixed parsing of { objects } as expressions.
...
Fixed parsing of "var" declarations.
Fixed indexing and fields of expressions.
Small improvement to speed up the simplification of large code.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5146 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-22 14:06:16 +00:00
paulc
52c2e0a004
Implemented pseudo-linear execution flow for channel routing.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@5145 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-22 09:38:51 +00:00
paulc
9bffbe6d90
Took call.preroute out of the main code flow.
...
Allow call.ringing and call.answered handlers to stop the message.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5141 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-20 15:54:43 +00:00
paulc
128acd4367
Linked the call.preroute, call.route and chan.disconnected to Channel.message.
...
Added some run time reporting in DEBUG compile mode.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5138 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-20 14:02:18 +00:00
paulc
da0444345d
Fixed undefining message parameters.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@5136 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-19 19:28:30 +00:00
paulc
80bc17ebe7
Added support for non-JS NamedList in JsObject that is overriden in JsMessage.
...
Separate method is used to store the key names for iterating over unsafe lists.
Implemented handling of Yate messages and their parameters in module.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5135 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-19 18:55:45 +00:00
paulc
a5a434f6cb
Keep the prototype as an internal __proto__ property.
...
Exclude properties starting with two underlines from iterators.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5131 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-18 17:17:43 +00:00
paulc
c446eb8d2e
Changed the way native objects' constructors are called.
...
Added proper cleanup in module.
Added script unload hook onUnload() that just needs be defined.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5128 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-18 13:52:21 +00:00
paulc
f5e76ddb6b
Changed the way callback JS functions are called.
...
Added a global Javascript loader.
Moved the main routing script to the [global] section.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5127 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-16 23:21:13 +00:00
paulc
bf57830c7f
Added possibility to track message progress through handlers.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@5107 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-12 23:47:01 +00:00
paulc
64c9808103
Fixed object assignment to object fields.
...
Added dump_r and print_r methods of Engine to aid in debugging.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5078 acf43c95-373e-0410-b603-e72c3f656dc1
2012-05-30 08:32:47 +00:00
paulc
97c2a7e6bb
Moved helper functions to static methods of JsObject so code can be reused.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@5063 acf43c95-373e-0410-b603-e72c3f656dc1
2012-05-15 14:43:15 +00:00
paulc
1eec7eb43b
Moved some Js objects implementation in another file.
...
Renamed Engine.Debug and Engine.Output to lower case to avoid confusion with constants.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5035 acf43c95-373e-0410-b603-e72c3f656dc1
2012-05-02 15:11:48 +00:00
paulc
6a19d73e58
Fixed a compile conversion warning.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@4955 acf43c95-373e-0410-b603-e72c3f656dc1
2012-03-05 17:14:16 +00:00
paulc
49e1f5586d
Moved declaration of some of the JS methods in the proper static initializer.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@4954 acf43c95-373e-0410-b603-e72c3f656dc1
2012-03-05 09:53:31 +00:00
paulc
ed193a3432
Got rid of the useless ScriptEvaluator class, made instead some ExpEvaluator methods public.
...
Fixed parsing of function declarations.
git-svn-id: http://yate.null.ro/svn/yate/trunk@4933 acf43c95-373e-0410-b603-e72c3f656dc1
2012-02-20 15:46:19 +00:00
paulc
a242f792c5
Updated scripting code.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@4921 acf43c95-373e-0410-b603-e72c3f656dc1
2012-02-17 16:19:17 +00:00
paulc
5b773e7c5a
Added partial universal scripting implementation with Javascript support.
...
git-svn-id: http://yate.null.ro/svn/yate/trunk@4892 acf43c95-373e-0410-b603-e72c3f656dc1
2012-02-10 14:53:55 +00:00