if (method == "INVITE") { if (uri =~ "sip:[0-9]{10}@*") { log(1, "Forwarding to Proxy\n"); rewritehostport("10.10.15.22:5060"); t_relay(); break; } }; if (method == "INVITE") { if (uri =~ "sip:[0-9]{3}@*") { log(1, "Forwarding to Proxy\n"); rewritehostport("10.10.15.22:5060"); t_relay(); break; } }; if (method == "INVITE") { if (uri =~ "sip:[0-9]{11}@*") { log(1, "Forwarding to Proxy\n"); rewritehostport("10.10.15.22:5060"); t_relay(); break; } }; I'll refer to these as entry 1, 2 and 3, respectively.