[Users] How can I obtain the first two digits of the header From?
Jose Gil Navarrete
gijoenav at yahoo.com.mx
Fri Nov 24 19:26:05 CET 2006
Thanks Klaus.
I made:
avp_write("$fU","$avp(s:uri_ini)");
avp_write("$fU","$avp(s:code_uri)");
#add the code from area to uri
avp_subst("$avp(s:code_uri)", "/[0-9]{7}$/$tU/");
avp_pushto("$ru/username","$avp(s:code_uri)");
avp_delete("$avp(s:uri_ini)");
avp_delete("$avp(s:code_uri)");
Klaus Darilion <klaus.mailinglists at pernau.at> escribió: 1. copy the from userpart into an AVP (use the pseudo variable for from
userpart - I think it is $fU). E.g with avp_printf or avp_write
2. use a regular expression to copy the first 3 digits (withouth sip:)
into a new AVP2.
3. create a new AVP3 which consists of the 3 digits and the request URI
(e.g. avp_printf with AVP2 and $ru)
4. avp_push AVP3 back to the request URI
regards
klaus
Jose Gil Navarrete wrote:
> Hi.
> I need to obtain the first two o three digits of the header From and add them to uri?
>
> It's, because the telephones make the register with ten digits (area-code + telephone number), then in the call, the telephone sends the invites with 7 or 8 digits, it's because they don't use area code.
>
> thanks in advance.
>
>
> ---------------------------------
> Do You Yahoo!? La mejor conexión a Internet y 2GB extra a tu correo por $100 al mes. http://net.yahoo.com.mx
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
--
Klaus Darilion
nic.at
---------------------------------
Do You Yahoo!? La mejor conexión a Internet y 2GB extra a tu correo por $100 al mes. http://net.yahoo.com.mx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20061124/ad3a7c6b/attachment.htm
More information about the Users
mailing list