Hello,
I am trying to use SQLOps Module in my kamailio 1.5 configuration.
According to your explanations every result of sql_query should be freed just after using that data. So it means that there will be better to fetch for THE SAME data three times instead of just one. Am I right?
But nevertheless I've been trying to query just one and free the result of the sql_query at the end of the file. Could sb tell me if the result of sql query executed in the main part of the script is remembered and could be used on failure route as well?
Thanks, Maciej.
On 04/18/2010 01:21 PM, Maciej Bylica wrote:
Hello,
I am trying to use SQLOps Module in my kamailio 1.5 configuration.
According to your explanations every result of sql_query should be freed just after using that data. So it means that there will be better to fetch for THE SAME data three times instead of just one. Am I right?
But nevertheless I've been trying to query just one and free the result of the sql_query at the end of the file. Could sb tell me if the result of sql query executed in the main part of the script is remembered and could be used on failure route as well?
As far as I know, sqlops results are freed at the end of invocation of script processing of a given message, be that a request or a reply. They do not persist for the life of the transaction, and therefore cannot be reused in failure_route.
Hi Alex,
As far as I know, sqlops results are freed at the end of invocation of script processing of a given message, be that a request or a reply. They do not persist for the life of the transaction, and therefore cannot be reused in failure_route.
Yes you are right. So it is not by my mistake :)
Thanks, Maciej.
On Monday 19 April 2010, Maciej Bylica wrote:
As far as I know, sqlops results are freed at the end of invocation of script processing of a given message, be that a request or a reply. They do not persist for the life of the transaction, and therefore cannot be reused in failure_route.
Yes you are right. So it is not by my mistake :)
Hi Maciej,
you could e.g. just store certain query results in an AVP, and then use this later in the failure_route or reply_route.
Cheers,
Henning
On 4/19/10 1:35 AM, Alex Balashov wrote:
On 04/18/2010 01:21 PM, Maciej Bylica wrote:
Hello,
I am trying to use SQLOps Module in my kamailio 1.5 configuration.
According to your explanations every result of sql_query should be freed just after using that data. So it means that there will be better to fetch for THE SAME data three times instead of just one. Am I right?
But nevertheless I've been trying to query just one and free the result of the sql_query at the end of the file. Could sb tell me if the result of sql query executed in the main part of the script is remembered and could be used on failure route as well?
As far as I know, sqlops results are freed at the end of invocation of script processing of a given message, be that a request or a reply. They do not persist for the life of the transaction, and therefore cannot be reused in failure_route.
the sqlops query is freed either by the sql_result_free() or by another sql_query() that stores over the same result id. So you can use the same result for many sip messages, but withing the same process, the result uses private memory.
Cheers, Daniel
Hello,
I am trying to use SQLOps Module in my kamailio 1.5 configuration.
According to your explanations every result of sql_query should be freed just after using that data. So it means that there will be better to fetch for THE SAME data three times instead of just one. Am I right?
But nevertheless I've been trying to query just one and free the result of the sql_query at the end of the file. Could sb tell me if the result of sql query executed in the main part of the script is remembered and could be used on failure route as well?
As far as I know, sqlops results are freed at the end of invocation of script processing of a given message, be that a request or a reply. They do not persist for the life of the transaction, and therefore cannot be reused in failure_route.
the sqlops query is freed either by the sql_result_free() or by another sql_query() that stores over the same result id. So you can use the same result for many sip messages, but withing the same process, the result uses private memory.
First of all, thanks for reply.
Henning, yes AVP could store the query result -- works fine, thank You. In meantime I reconstructed my script to use LCR instead of SQLOps for calling number routing, but experience I gained here is v. useful :)
Cheers, Maciej.