[Serusers] Avpops info....?

sip sip at arcdiv.com
Thu Sep 22 14:24:02 CEST 2005


Is there any good, DETAILED information on AVPops usage that, say, doesn't
read like a developers API reference page? Currently, I'm cleaning up portions
of my ser.cfg which have horrid, ugly hacks in them that I put in to handle
this case or that case...

For instance, I use the calls_forwarding table to handle call blocking and
call forwarding info (since it seems a little more reasonable than
usr_preferences as it simply has more relevant tables).  For call blocking, I
can say give a purpose of 'blocking' and an action of relay or reply... with
parameters set to what kind of reply or where to relay (voicemail server?
Alternate server? etc).  For forwarding, I can give an action of forwarding
with a parameter of where to forward and another to see if he has permission
to forward to PSTN numbers.  Seems like a very handy table for it.

Now, my current method of doing this is with this horrid mixture of external
scripts, stripping portions off the SIP_HF_FROM header (since it comes with
additional info like tags and brackets and comments), and feeding the new
stuff back into an SQL query to determine whether or not the call needs to be
blocked, forwarded, and if either, where it goes.

It's a mess, I'll admit, but it's because I've been poring over AVPops stuff
and have yet to figure out what I'm actually DOING with any of it.  I get that
it uses little i:XX constructs as variables (which is bizarre, but whatever --
I imagine I could alias them to something human-readable). And... well...
that's about as far as I've gotten deciphering the API docs and making them
into something usable.

I imagine I would what... set the avp_table to be calls_forwarding, and then
create some schemes for it (?)... but after that, actually doing things like
taking just the sip:bob at fred.com portion of an incoming uri (which would look
along the lines of  "Ima Doofus"
<sip:bob at fred.com:5060;user=tel>tag=something;tag2=something else ) and then
trying to determine if that user is on the list of blocked users and, if so,
what should be the response action...  or taking the callee info, and if the
callee isn't available, checking to see if he has a forwarding number,
checking to see where it goes, etc, etc.

It all SEEMS like it should be elementary stuff, but I'm simply not getting
it. Anyone have any good references, well-detailed documentation, long,
in-depth books on the topic they could send me toward?

I'd be your friend for, like, ever. :)

N.




More information about the sr-users mailing list