To #1: You need to add a "eat-the-rest" expression to your regex:
"^sip:nobody@.*"
g-)
Richard wrote:
Hi Elena,
I have a few questions in regards to avpops. Hope that you can help.
1. When avp_pushto() is used, the ruri is only used when t_relay is
called. However the uri match can't match the regular expression
correctly. For example, I have this,
avp_write("sip:nobody@test.com", "s:default");
avp_pushto("$ruri", "s:default");
if (uri =~ "^sip:nobody@") {
xlog("L_INFO", "got nobody\n");
} else {
xlog("L_INFO", "didn't get nobody\n")
}
It would say "didn't get nobody\n".
If I run t_relay, then it is sent to sip:nobody@test.com.
2. Is it possible to have a function to copy an avp to another avp?
The application is this,
tm module uses one avp to define the invite timer. If there are
multiple timer values defined for different scenarios, we need to
copy the value into the one used in tm module. For example,
s:pstn_invite=100, s:sip_invite=20,
If (the call is to pstn) {
avp_copy("s:pstn_invite", "s:callee_fr_inv_timer");
} else {
avp_copy("s:sip_invite", "s:callee_fr_inv_timer");
}
3. For performance reasons, we'd like to group all user preference in
one domain in one mysql table. Is it possible to specify the table
name with an avp?
Regards,
Richard
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers