[OpenSIPS-Users] Inspecting $fU

Alexander Perkins alexanderhenryperkins at gmail.com
Thu Jun 21 15:14:07 EDT 2018

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,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20180621/53a974a5/attachment.html>

More information about the Users mailing list