Hi,
On 08/27/2013 03:23 AM, I.Pavlov wrote:
route[FROM_PSTN] {
xlog("L_INFO","dsattrs: $avp(dsattrs) $avp(i:271) $avp(i:272)
$avp(i:273)");
…..
};
Result: *INFO: <script>: dsattrs: <null> <null> <null>
<null>*
My question - Is it possible to get attrs on incoming request from GW ?
This was implemented in the development version, but not in the 4.0
branch. Otherwise, I have the firm impression that these attributes are
only accessed when iterating over the gateway using the ds_select_*()
functions and a round-robin algorithm.
However, there's nothing stopping you from doing exactly that. Just
store the original RURI prior to the loop so that you can revert to it,
and the iteration will have no impact (all ds_select_domain() and
ds_next_domain() do is change the RURI):
$var(old_ruri) = $ru;
$var(found) = 0;
ds_select_domain("1", "4");
if($rd == $si && $rp == $sp) {
$var(found) = 1;
} else {
while(ds_next_domain()) {
if($rd == $si && $rp == $sp) {
$var(found) = 1;
break;
}
}
}
if($var(found) == 1) {
xlog("L_INFO","dsattrs: $avp(dsattrs) $avp(i:271) $avp(i:272)
$avp(i:273)");
}
$ru = $var(old_ruri);
-- Alex
--
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0670
Web:
http://www.evaristesys.com/,
http://www.alexbalashov.com/