Hello,

If I'm not mistaken, Refer-To is a name-address pair, so the best way to access 
the user part of the URI is:

   $(hdr(Refer-To){nameaddr.uri}{uri.user})

i.e.

   if($(hdr(Refer-To){nameaddr.uri}{uri.user}) =~ "^011")

-- Alex

> On Aug 13, 2023, at 8:57 PM, David Cunningham <[email protected]> 
> wrote:
> 
> Hello,
> 
> We want to check if the number in a REFER's Refer-To header begins with 011, 
> and if so reject the request as not allowed. What would be the most effective 
> way to do that?
> 
> Thanks in advance,
> 
> -- 
> David Cunningham, Voisonics Limited
> http://voisonics.com/
> USA: +1 213 221 1092
> New Zealand: +64 (0)28 2558 3782
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to [email protected]
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:

-- 
Alex Balashov
Principal Consultant
Evariste Systems LLC
Web: https://evaristesys.com
Tel: +1-706-510-6800

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:

Reply via email to