oana
47ed1e780e
Added functions unprefixedTag(), getTag(), removeAttribute() and clearChildren() to the Javascript XML API.
...
git-svn-id: http://voip.null.ro/svn/yate@5434 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-12 12:08:13 +00:00
oana
9ef4472415
Do linking (jump resolving) for Javascript code.
...
Added configuration parameter to enable/disable linking.
git-svn-id: http://voip.null.ro/svn/yate@5407 acf43c95-373e-0410-b603-e72c3f656dc1
2013-02-14 14:37:20 +00:00
oana
6a46490cea
Lock context while evaluating instructions.
...
Don't do context initialization everytime the execution of the script is reset.
git-svn-id: http://voip.null.ro/svn/yate@5403 acf43c95-373e-0410-b603-e72c3f656dc1
2013-02-12 15:47:54 +00:00
oana
b568e933a8
Fixed XML constructor from string.
...
git-svn-id: http://voip.null.ro/svn/yate@5386 acf43c95-373e-0410-b603-e72c3f656dc1
2013-01-28 10:57:41 +00:00
paulc
257fd8ff81
Added XML support in Javascript.
...
git-svn-id: http://voip.null.ro/svn/yate@5366 acf43c95-373e-0410-b603-e72c3f656dc1
2012-12-21 10:21:16 +00:00
paulc
64be401172
Added support for calling object methods by variable.
...
git-svn-id: http://voip.null.ro/svn/yate@5332 acf43c95-373e-0410-b603-e72c3f656dc1
2012-11-20 16:11:38 +00:00
paulc
581f9ab265
Added setting to allow DebugFail from Javascript.
...
git-svn-id: http://voip.null.ro/svn/yate@5331 acf43c95-373e-0410-b603-e72c3f656dc1
2012-11-20 16:08:25 +00:00
paulc
fece1806f6
Added reload Javascript command.
...
Fixed some potential concurrency issues.
git-svn-id: http://voip.null.ro/svn/yate@5316 acf43c95-373e-0410-b603-e72c3f656dc1
2012-11-01 14:58:46 +00:00
paulc
9fb2a4f829
Abandon Javascript message handlers on shutdown since they get destroyed by the engine anyway.
...
git-svn-id: http://voip.null.ro/svn/yate@5315 acf43c95-373e-0410-b603-e72c3f656dc1
2012-11-01 11:18:35 +00:00
paulc
9789c3061c
Clear the "message" member of Channel only when script ended, else just mark it invalid.
...
git-svn-id: http://voip.null.ro/svn/yate@5207 acf43c95-373e-0410-b603-e72c3f656dc1
2012-07-24 10:31:12 +00:00
paulc
09997b075a
Changed name of Javascript rmanager command from "js" to "javascript".
...
Implemented line completion, info and status.
git-svn-id: http://voip.null.ro/svn/yate@5170 acf43c95-373e-0410-b603-e72c3f656dc1
2012-07-02 11:55:34 +00:00
paulc
6dcc511757
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://voip.null.ro/svn/yate@5162 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-28 18:23:04 +00:00
paulc
d195c9e1a3
Added an Engine.shared singleton object that exposes in JS the engine shared variables.
...
git-svn-id: http://voip.null.ro/svn/yate@5160 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-27 17:49:49 +00:00
paulc
5a8bd3153c
Added "message" variable in routing scope context.
...
Removed current message parameters from routing scope context.
git-svn-id: http://voip.null.ro/svn/yate@5156 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-27 12:57:18 +00:00
paulc
574dc50802
Deep copy inline objects and arrays when placing them in a context.
...
git-svn-id: http://voip.null.ro/svn/yate@5154 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-26 16:40:38 +00:00
paulc
6ee7811217
Fixed the call context creation, was double wrapping the scope and this objects.
...
git-svn-id: http://voip.null.ro/svn/yate@5152 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-26 13:31:30 +00:00
paulc
b276afb9e5
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://voip.null.ro/svn/yate@5147 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-22 14:42:41 +00:00
paulc
3dcef54cd1
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://voip.null.ro/svn/yate@5146 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-22 14:06:16 +00:00
paulc
306a64c041
Implemented pseudo-linear execution flow for channel routing.
...
git-svn-id: http://voip.null.ro/svn/yate@5145 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-22 09:38:51 +00:00
paulc
f459a14752
Took call.preroute out of the main code flow.
...
Allow call.ringing and call.answered handlers to stop the message.
git-svn-id: http://voip.null.ro/svn/yate@5141 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-20 15:54:43 +00:00
paulc
18e2e63fd5
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://voip.null.ro/svn/yate@5138 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-20 14:02:18 +00:00
paulc
81ff2e576b
Fixed undefining message parameters.
...
git-svn-id: http://voip.null.ro/svn/yate@5136 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-19 19:28:30 +00:00
paulc
1baf8eca59
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://voip.null.ro/svn/yate@5135 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-19 18:55:45 +00:00
paulc
0a30542924
Keep the prototype as an internal __proto__ property.
...
Exclude properties starting with two underlines from iterators.
git-svn-id: http://voip.null.ro/svn/yate@5131 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-18 17:17:43 +00:00
paulc
deb86d089c
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://voip.null.ro/svn/yate@5128 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-18 13:52:21 +00:00
paulc
6219735b29
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://voip.null.ro/svn/yate@5127 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-16 23:21:13 +00:00
paulc
7e77fd2cfb
Added possibility to track message progress through handlers.
...
git-svn-id: http://voip.null.ro/svn/yate@5107 acf43c95-373e-0410-b603-e72c3f656dc1
2012-06-12 23:47:01 +00:00
paulc
6be8cfdf16
Fixed object assignment to object fields.
...
Added dump_r and print_r methods of Engine to aid in debugging.
git-svn-id: http://voip.null.ro/svn/yate@5078 acf43c95-373e-0410-b603-e72c3f656dc1
2012-05-30 08:32:47 +00:00
paulc
d295d3a2e7
Moved helper functions to static methods of JsObject so code can be reused.
...
git-svn-id: http://voip.null.ro/svn/yate@5063 acf43c95-373e-0410-b603-e72c3f656dc1
2012-05-15 14:43:15 +00:00
paulc
3f4ae4036a
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://voip.null.ro/svn/yate@5035 acf43c95-373e-0410-b603-e72c3f656dc1
2012-05-02 15:11:48 +00:00
paulc
c089f73e35
Fixed a compile conversion warning.
...
git-svn-id: http://voip.null.ro/svn/yate@4955 acf43c95-373e-0410-b603-e72c3f656dc1
2012-03-05 17:14:16 +00:00
paulc
24875edb96
Moved declaration of some of the JS methods in the proper static initializer.
...
git-svn-id: http://voip.null.ro/svn/yate@4954 acf43c95-373e-0410-b603-e72c3f656dc1
2012-03-05 09:53:31 +00:00
paulc
1d26febd67
Got rid of the useless ScriptEvaluator class, made instead some ExpEvaluator methods public.
...
Fixed parsing of function declarations.
git-svn-id: http://voip.null.ro/svn/yate@4933 acf43c95-373e-0410-b603-e72c3f656dc1
2012-02-20 15:46:19 +00:00
paulc
9f21872ea8
Updated scripting code.
...
git-svn-id: http://voip.null.ro/svn/yate@4921 acf43c95-373e-0410-b603-e72c3f656dc1
2012-02-17 16:19:17 +00:00
paulc
b15e963c58
Added partial universal scripting implementation with Javascript support.
...
git-svn-id: http://voip.null.ro/svn/yate@4892 acf43c95-373e-0410-b603-e72c3f656dc1
2012-02-10 14:53:55 +00:00