More along these lines...
When I run this sequence:
avp_write("$ruri/username","$avp(s:tmp_uri)"); avp_subst("$avp(s:tmp_uri)", "/;.*//"); avp_pushto("$ruri/username","$avp(s:tmp_uri)");
The resulting RURI looks like:
ERROR: parse_sip_msg_uri: bad uri sip:sip:+19725551212@10.10.10.252:5060@10.10.10.252:5060
Note the sip:sip:+XXXX header. What's the trick? The avp_subst is effectively a no-op because the RURI doesn't contain the pattern. I think I'd get the same result with:
avp_write("$ruri/username","$avp(s:tmp_uri)"); avp_pushto("$ruri/username","$avp(s:tmp_uri)");
-g
On 8/21/06, Greg Fausak lgfausak@gmail.com wrote:
I want to use the RURI username in an avp query. I've seen a bunch of different ways to select it. Which way is correct?
I am currently using $ruri/username, because I got an error with $rU.
http://openser.org/docs/pseudo-variables.html shows '$rU', which complains when I try to reference that.
Aug 21 06:55:58 www openser[89119]: ERROR:avpops:fixup_pushto_avp: unsupported destination "$rU"; expected $ru,$du,$br Aug 21 06:55:58 www openser[89119]: ERROR: fix_actions: fixing failed (code=-1) at cfg line 82
It's weird, the source code in items.c reads:
{{"ru", (sizeof("ru")-1)}, /* */ { XL_RURI, 0, xl_get_ruri, {{0, 0}, 0}, {0, 0}}}, {{"ruri", (sizeof("ruri")-1)}, /* */ { XL_RURI, 0, xl_get_ruri, {{0, 0}, 0}, {0, 0}}}, {{"rU", (sizeof("rU")-1)}, /* */ { XL_RURI_USERNAME, 0, xl_get_ruri_attr, {{0, 1},
0}, {0, 0}}},
Is there a list of the variables that are available in an avp operation?
-g