[Serusers] help: avpops question
Elena Ramona Modroiu
ramona at voice-system.ro
Tue Nov 30 22:24:54 CET 2004
Hello,
no need for MySQL to do this test. Try this:
...
modparam("avpops","avp_aliases","from_addr=i:44")
...
route{
...
avp_write("$ruri","i:33");
avp_write("$from","$from_addr");
if (avp_check("i:33","eq/$from_addr/i"))
{
# here from_uri==request_uri
....
}
...
}
It is better to check r-uri than To uri and do the check just before
user location lookup, after looking up speeddial and aliases (To uri may
contain an alias or a speeddial key and cannot be changed ...)
Hope this helps,
Ramona
Java Rockx wrote:
>Hi All.
>
>I'm using ser-0.8.99-dev19 and I'm trying to figure out how to get avpops to tell me if
>(to_uri==from_uri) for INVITE messages.
>
>I want to do a quick test to see if a user is calling their own extension and route them to
>voicemail accordingly.
>
>I'm having a bit of trouble understanding avpops. Do I need to use the database functionality to
>do this or can I do it without MySQL?
>
>Anyhow here is about what I've got - but is wrong and I'm unclear on how to get this to work
>
>ser.cfg snippet:
>
>loadmodule "/usr/local/lib/ser/modules/avpops.so"
>
>route {
>
> # usual checks
>
> # REGISTER stuff
>
> if ((method=="INVITE") && is_user_in("Request-URI", "voicemail")) {
>
> if (avp_check("$from", "$to")) {
> log(1, "Sending to Voicemail");
> route(4);
> };
> };
>
> # lookup aliases stuff
>
> # etc
>}
>
>route [1] {
> # send to voicemail route
>}
>
>But starting ser gives these errors
>
>AVPops - initializing
>ERROR:avpops:parse_check_value: parse error in <$to> pos -135487828
>ERROR:avpops:fixup_check_avp: failed to parse checked value
>ERROR: fix_expr : fix_actions error
>
>Regards,
>Paul
>
>
>
>
>__________________________________
>Do you Yahoo!?
>Read only the mail you want - Yahoo! Mail SpamGuard.
>http://promotions.yahoo.com/new_mail
>
>_______________________________________________
>Serusers mailing list
>serusers at lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
>
>
More information about the sr-users
mailing list