[SR-Users] Adding "q" value for the main branch
Maxim M
simax80 at gmail.com
Thu Nov 28 15:14:53 CET 2019
Maxim Malygin <maxim.malygin at gmail.com>
17:08 (5 минут назад)
кому: sr-users
Hello,
I need to form list of Contact headers with "q" parameters for "302 Moved
Temporary".
I do something like this:
...
# $xavp(contacts) - contains list of contact URIs (uri) and Q values (q)
$var(i) = 0;
$var(num) = $cnt($xavp(contacts));
while($var(i) < $var(num)) {
if($var(i) == 0) {
# How to add q value to this branch?
$ru = $xavp(contacts[$var(i)]=>uri);
} else {
append_branch("$xavp(contacts[$var(i)]=>uri)",
"$xavp(contacts[$var(i)]=>q)");
}
}
send_reply("302", "Moved Temporarily");
...
Is it possible to set "q" value for the main branch?
For additional branches I do it via append_branch("uri", q_value) but I
didn't find any way to do it for the main branch pointed via $ru/$du. The
pseudo-variable "$branch" also doesn't allow me to access the main branch.
Thanks,
Maxim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20191128/ab0db39c/attachment.html>
More information about the sr-users
mailing list