Is there a way that I can pass variable into ds_select_dst(set, alg) on the set parameter so I can query from database table for setid; for instance, ds_select_dst("avp(customer_setid)", "4"). I've tried, but it did not work. Please advise.
Thank you.
DJB wrote:
Is there a way that I can pass variable into ds_select_dst(set, alg) on the set parameter so I can query from database table for setid; for instance, ds_select_dst("avp(customer_setid)", "4"). I've tried, but it did not work. Please advise.
A look in modules/dispatcher/dispatcher.c reveals that ds_*() functions do not parse pseudovariables, which is a problem with a lot of existing Kamailio code. Any arguments you pass to it will be interpreted as literal strings.
In short, you can't do that. You may wish to put in a feature request to update these functions to take pseudovariables.
From: users-bounces@lists.kamailio.org [mailto:users-bounces@lists.kamailio.org] On Behalf Of Alex Balashov Sent: Thursday, November 05, 2009 4:18 PM To: DJB Cc: users@lists.kamailio.org Subject: Re: [Kamailio-Users] Dispatcher module question
DJB wrote:
Is there a way that I can pass variable into ds_select_dst(set, alg)
on the
set parameter so I can query from database table for setid; for
instance,
ds_select_dst("avp(customer_setid)", "4"). I've tried, but it did not work. Please advise.
A look in modules/dispatcher/dispatcher.c reveals that ds_*() functions do not parse pseudovariables, which is a problem with a lot of existing Kamailio code. Any arguments you pass to it will be interpreted as literal strings.
In short, you can't do that. You may wish to put in a feature request to update these functions to take pseudovariables.
It appears I was mistaken. Upon further analysis of fixup_get_ivalue(), I retract my statement. This function does parse PVs.
Robert McGilvray wrote:
From: users-bounces@lists.kamailio.org [mailto:users-bounces@lists.kamailio.org] On Behalf Of Alex Balashov Sent: Thursday, November 05, 2009 4:18 PM To: DJB Cc: users@lists.kamailio.org Subject: Re: [Kamailio-Users] Dispatcher module question
DJB wrote:
Is there a way that I can pass variable into ds_select_dst(set, alg)
on the
set parameter so I can query from database table for setid; for
instance,
ds_select_dst("avp(customer_setid)", "4"). I've tried, but it did not work. Please advise.
A look in modules/dispatcher/dispatcher.c reveals that ds_*() functions do not parse pseudovariables, which is a problem with a lot of existing Kamailio code. Any arguments you pass to it will be interpreted as literal strings.
In short, you can't do that. You may wish to put in a feature request to update these functions to take pseudovariables.
From: users-bounces@lists.kamailio.org [mailto:users-bounces@lists.kamailio.org] On Behalf Of Robert McGilvray Sent: Thursday, November 05, 2009 4:31 PM To: Alex Balashov; DJB Cc: users@lists.kamailio.org Subject: Re: [Kamailio-Users] Dispatcher module question
From: users-bounces@lists.kamailio.org [mailto:users-bounces@lists.kamailio.org] On Behalf Of Alex Balashov Sent: Thursday, November 05, 2009 4:18 PM To: DJB Cc: users@lists.kamailio.org Subject: Re: [Kamailio-Users] Dispatcher module question
DJB wrote:
Is there a way that I can pass variable into ds_select_dst(set, alg)
on the
set parameter so I can query from database table for setid; for
instance,
ds_select_dst("avp(customer_setid)", "4"). I've tried, but it did not work. Please advise.
A look in modules/dispatcher/dispatcher.c reveals that ds_*() functions do not parse pseudovariables, which is a problem with a lot of existing Kamailio code. Any arguments you pass to it will be interpreted as literal strings.
In short, you can't do that. You may wish to put in a feature request to update these functions to take pseudovariables.
Thank you, Robert.
You are correct. I overlooked at the return value. It's working now.
----- Original Message ---- From: Robert McGilvray rmcgilvr@globeop.com To: Alex Balashov abalashov@evaristesys.com; DJB djbinter@yahoo.com Cc: users@lists.kamailio.org Sent: Thu, November 5, 2009 1:35:25 PM Subject: RE: [Kamailio-Users] Dispatcher module question
From: users-bounces@lists.kamailio.org [mailto:users-bounces@lists.kamailio.org] On Behalf Of Robert McGilvray Sent: Thursday, November 05, 2009 4:31 PM To: Alex Balashov; DJB Cc: users@lists.kamailio.org Subject: Re: [Kamailio-Users] Dispatcher module question
From: users-bounces@lists.kamailio.org [mailto:users-bounces@lists.kamailio.org] On Behalf Of Alex Balashov Sent: Thursday, November 05, 2009 4:18 PM To: DJB Cc: users@lists.kamailio.org Subject: Re: [Kamailio-Users] Dispatcher module question
DJB wrote:
Is there a way that I can pass variable into ds_select_dst(set, alg)
on the
set parameter so I can query from database table for setid; for
instance,
ds_select_dst("avp(customer_setid)", "4"). I've tried, but it did not work. Please advise.
A look in modules/dispatcher/dispatcher.c reveals that ds_*() functions do not parse pseudovariables, which is a problem with a lot of existing Kamailio code. Any arguments you pass to it will be interpreted as literal strings.
In short, you can't do that. You may wish to put in a feature request to update these functions to take pseudovariables.