[Serusers] help: avpops question

Java Rockx javarockx at yahoo.com
Tue Nov 30 16:31:07 CET 2004


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 




More information about the sr-users mailing list