Hi,
Is it possible to change a module parameter inside the routing logic ?
For example I want to change sqlcon parameter of sqlops module based on the originating IP.
Regards,
It is not.
— Sent from mobile, with due apologies for brevity and errors.
On Apr 28, 2020, at 6:26 AM, Ali Taher ataher@vanrise.com wrote:
Hi,
Is it possible to change a module parameter inside the routing logic ?
For example I want to change sqlcon parameter of sqlops module based on the originating IP.
Regards, _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hi Alex,
I just realized that I can set sqlcon multiple times which will solve my problem.
The scenario I’m trying to achieve is that based on the originating IP of the invite packet I will run some queries on the correspondent database and then use the result in Kamailio routing logic.
Should I be worried about using same sqlres (ra) while fetching the result from the database?
Regards, Ali Taher
From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Alex Balashov Sent: Tuesday, April 28, 2020 1:30 PM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: Re: [SR-Users] change module parameter in routing logic
It is not. — Sent from mobile, with due apologies for brevity and errors.
On Apr 28, 2020, at 6:26 AM, Ali Taher <ataher@vanrise.commailto:ataher@vanrise.com> wrote: Hi,
Is it possible to change a module parameter inside the routing logic ?
For example I want to change sqlcon parameter of sqlops module based on the originating IP.
Regards, _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
On Tue, Apr 28, 2020 at 12:57:16PM +0000, Ali Taher wrote:
Should I be worried about using same sqlres (ra) while fetching the result from the database?
No, as long you sql_result_free() it between operations. If you need multiple SQL results concurrently, you should use different result set identifiers.
-- Alex
Hi Alex,
What do you mean by multiple SQL results concurrently? I will have multiple calls coming at the same time which need to go to one of the databases based on the originating IP.
-----Original Message----- From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Alex Balashov Sent: Tuesday, April 28, 2020 4:01 PM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: Re: [SR-Users] change module parameter in routing logic
On Tue, Apr 28, 2020 at 12:57:16PM +0000, Ali Taher wrote:
Should I be worried about using same sqlres (ra) while fetching the result from the database?
No, as long you sql_result_free() it between operations. If you need multiple SQL results concurrently, you should use different result set identifiers.
-- Alex
-- Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
On Tue, Apr 28, 2020 at 01:09:40PM +0000, Ali Taher wrote:
What do you mean by multiple SQL results concurrently? I will have multiple calls coming at the same time which need to go to one of the databases based on the originating IP.
I meant concurrently in the same instance of message processing (inside the same SIP worker process). SQL result sets are part of package memory--the memory that is not shared, but private to every child process.
It sounds like there's no issue here.
-- Alex