[SR-Users] Lookup using the last N digits

Fred Posner fred at palner.com
Mon May 22 15:40:32 CEST 2017


On 5/22/17 9:10 AM, Emanuele Gambaro wrote:
> Hello everyone
> 
> I need to do a lookup for an existing user using the last N digit of its
> phone number. For example, if a subscriber has a phone number equal to
> "+391234567890" I would like to call him using the full phone number or
> also the last 8 digits "34567890".
> 
> There is a simple way to do this using kamailio 5.0.1?
> 

Have you checked out substring?

https://www.kamailio.org/wiki/cookbooks/5.0.x/transformations#ssubstr_offset_length

--fred



More information about the sr-users mailing list