Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - asymetrixs

Pages: [1]
1
Features requests / SQL query queue status / queue flush
« on: March 11, 2013, 12:47:22 PM »
Hi all,

as far as I know yate knows to ways of sending queries to the database, "enqueue" and "dispatch".

"enqueue" puts the SQL query into a queue and runs it as soon as it has free resources to do so. This can lead to a growing queue under very heavy load and maybe some queries get fired long time after they were enqueued.

"dispatch" runs the SQL query synchronously against the database and waits for the result to return. This is for example used in preroute and route where it is needed because yate routes depending on the value it retrieves from DB.

What I'd like to see as feature are two things:

1) At no time there is a way (or at least I do not know any) to see how many SQL queries are currently enqueued. 'status pgsqldb' should also display the amount of enqueued SQL statements so that one know, if there are still queries that need to be run. The reason is as follows: We saw that a yate server that retrieves more calls than it can handle performs the "dispatched" queries, but may forget to run some of the "enqueued" queries (like CDR query, we found lot's of CDR records that were not updated even though they were quite old and the call was terminated). This would give the user at least the chance to see how the queue is used and if there are queries pending.

2) Referring to 1) even if the server load decreases to a normal level, some SQLs may have get lost OR are pending for infinitive time. Therefore it would be nice to see a command like 'database pgsqldb flush' that causes yate to cleanup the queue and force running the enqueued queries against the database. This would be to solve the case where enqueued SQL queries are pending and not performed by yate automatically. We hade the issue that the server did not run the queries and we could not see if there are queries in the queue (mentioned in 1)) nor could we force yate to empty the queue and run all queries (referring to 2)).

What do you think?


2
Features requests / Get Hostname in Yate
« on: February 16, 2013, 03:28:55 PM »
Hi,

currently we write the hostname of our yate servers into the config files and use them for example in SQL statements like SELECT * FROM table WHERE yate_instance = 'yate1';
We do need this, because results from and operations on the DB depend on which yate-server is querying.

This is very odd, because each server needs it's own set of configuration files just for the hostname.

It would be great if there would be a property on the message object like nodename (which is already present in some handlers) which is available globally. Maybe not to confuse both and influence existing yate installations it could be a new property called "hostname".
We do use it in
- user.register
- engine.timer
- call.preroute
- call.route
- call.cdr (initquery, cdr_initialize, cdr_update, cdr_finalize)
- accounts (initquery, timerquery, statusquery)

I already talked with Paul with that but we did not come to a conclusion so far. He suggested to write a small module for that.

For anyone who just needs it in CDR, you can put this in regexroute.conf
Code: [Select]
[contexts]
.*=;nodename=$(nodename)


Who else is interested in this?
Null-Team what do you think?

3
Yate IVR / Javascript + DTMF
« on: January 10, 2013, 07:53:10 PM »
Hi all,

is it possible to use DTMF in Javascript routing?

Can someone provide an example script?

Thanks!

4
Yate IVR / Javascript Routing - Empty message-Object
« on: January 09, 2013, 04:30:37 PM »
Hi,

I just wrote a simple routing script in Javascript and I have the following problem:

Code: [Select]
message.callto_account = mysqlAccount; // Setting the MySQL Account (this is a variable containing a string)
message.callto_query = "CALL yate_voice_timeout('" + dbTimeout + "', '" + language + "')"; // Setting up the query
Engine.output("1) ME: " + message.caller); // Gives: 123456
Channel.callTo("dbwave/play//backup.au"); // Plays the Binary Data returned by the SQL Query
Engine.output("2) ME: " + message.caller); // Gives: (empty)
...
message.callto.1  = "sip/sip:999@abc.com";
message.callto.2  = "sip/sip:888@xyz.org";
Channel.callJust("fork");

When issuing the callJust, then message.caller is empty which causes problems because the value in CDR insert/update/finalize is empty too.
As far as described in the docs, that behavior is correct, because the return values of Channel.callTo are written in the message object, but I want to call other targets as well.

So do I have to copy all parameters and store them in separate variables to reuse them or is there a way to retrieve the original 'incoming'-message with all its values?

Regards,
Damian / asymetrixs

Pages: [1]