Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000338 [Yate - Yet Another Telephony Engine] module major always 2013-04-18 14:21 2014-02-26 17:00
Reporter asymetrixs View Status public  
Assigned To paulc
Priority normal Resolution fixed  
Status resolved   Product Version 4.x
Summary 0000338: JS: Channel.callTo/callJust do not support message.timeout
Description As summarized:

Does not work:




The call keeps being connected to dumb/
Additional Information if(message.direction == 'incoming')

        Engine.debug("IN JAVASCRIPT ROUTING SCRIPT");

                Engine.debug("CALLING dumb/");
                // Channel.callJust("dumb/");

        Engine.debug("AFTER dumb/");
Tags No tags attached.
Attached Files

- Relationships

-  Notes
paulc (administrator)
2013-04-19 13:32

Setting the parameters in the "message" is not a good idea, that gets used only on the 1st routing.

What do you think of a more flexible approach of passing an optional object filled with the required parameters, like:

    Channel.callTo("dumb/", {timeout:5000,caller:"+1234567"});

Then callTo will copy the parameters where required by the call state.
asymetrixs (reporter)
2013-04-19 14:15

That is an excellent idea!
So callTo and callJust should always copy the information from this optional object like it happens in db routing, so as you mentioned:

Channel.callTo("dumb/", { "copyparams": "cust1,cust2", "cust1": "val1", "cust2": "val2", "timeout": 5000, "caller": "+123456" });
same for callJust.

Please make sure that the yate accepts valid JSON so that it is according to JSON standard which makes things easier (and maybe format invalid JSON to correct JSON if possible)

You may have a look at [^] which provides json2.js, a lib to make invalid (not correct formatted) JSON become valid JSON.
paulc (administrator)
2014-02-26 17:00

Solved by Rev. 5791

- Issue History
Date Modified Username Field Change
2013-04-18 14:21 asymetrixs New Issue
2013-04-19 13:32 paulc Note Added: 0000521
2013-04-19 13:32 paulc Assigned To => paulc
2013-04-19 13:32 paulc Status new => feedback
2013-04-19 14:15 asymetrixs Note Added: 0000525
2014-02-26 17:00 paulc Note Added: 0000545
2014-02-26 17:00 paulc Status feedback => resolved
2014-02-26 17:00 paulc Resolution open => fixed

Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker