[OpenSIPS-Users] Inspecting $fU

Răzvan Crainea razvan at opensips.org
Fri Jun 22 04:12:00 EDT 2018


Hi, Alexander!

It does look correct, and I don't see right now a better way of doing 
it. So go ahead and just use it as it is :).

Best regards,
Răzvan

On 06/21/2018 10:14 PM, Alexander Perkins wrote:
> Hi.  I am trying to inspect the $fU variable to find out if it has a 
> length greater than 11 digits (US dialing) and, if so, only return the 
> last 11 digits and store them to $fU.  So far, this is what I have:
> 
>          if ($(fU{s.len}) > 11)
>          {
>                  $var(fU) = $(fU{s.substr,-1,11});
>          }
> 
> Does this look correct?  Are there more efficient ways to do it?
> 
> Thank All,
> Alex
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 

-- 
Răzvan Crainea
OpenSIPS Core Developer
   http://www.opensips-solutions.com



More information about the Users mailing list