[Users] Faster to do avp_printf();avp_check OR search()?
bogdan at voice-system.ro
Wed Aug 24 19:49:20 CEST 2005
IMHO , the first approach should be faster and saver.
why faster? instead of applying re over the entire message (as search
does), you will limit to the hdr body. Parsing to extract the hdr is
also more faster (and usualy means just walking over the hdr list, since
the msg may be already parsed).
why saver? re to match exactly the hdr and the check the body, excepting
that are complex and slow, may fail and do wrong matching - the internal
hdr parser cannot fail and always identify precisely the hdr.
Kanakatti M. Subramanya wrote:
> e.g., if I want to do something if there is a Refer-To header in the
> am I better off doing
> avp_printf("$someAvp", "$rt");
> avp_check("$rt", "re/.../i");
> Just want ot know whether to get started rewriting all the "search()"
> strings i have in my ser.cfg....
>Users mailing list
>Users at openser.org
More information about the sr-users