[OpenSIPS-Users] Using dispatcher's ds_select_domain with a variable
Jock McKechnie
jock.mckechnie at gmail.com
Tue Mar 16 16:02:17 CET 2010
Good morning;
I've been fiddling with dispatcher and I would like to maintain several
dispatcher sets that get selected based on the $ru. The $ru would be parsed,
a dispatcher set placed in a variable, and then ds_select_domain() would be
called upon the variable... except ds_select_domain() doesn't appear to work
with being called using variables... or perhaps I'm doing something wrong.
The $ru would look something like this: "+12125551212 at dispatcher1001", which
I'm using the following directives to handle:
if ($ru =~ "dispatcher") {
$var(beep) = $(ru{s.substr,27,4});
xlog("L_INFO", "[$Tf] Found dispatcher, set: $var(beep)\n");
if (!ds_select_domain("$var(beep)","4")) {
t_reply("503", "Unable to location dispatcher set requested");
return;
}
route(1);
return;
}
The $var(beep) is being parsed out correctly (The xlog() messages show as
such), but get the following:
ERROR:core:fixup_get_ivalue: no valid PV value found (error in scripts)
ERROR:dispatcher:w_ds_select_domain: no dst set value
ERROR:tm:w_t_reply: failed to send a t_reply to a message for which no
transaction-state has been established
I suspect the important one in the list above is the first, where the
get_ivalue is failing, but I'm not sure. I suspect if it can tell it's a
variable then I probably am doing something amiss, but I sure would
appreciate if some learned soul could tell me what I'm doing wrong.
My thanks;
- Jock
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100316/e0fb75be/attachment.htm
More information about the Users
mailing list