I just want to redirect all communication to phones 2xx to another SIP proxy through TCP.
I have 2 problems, the first one is that the extensions don't exist in the location
database, so I have added them manualy:
openserctl ul add 299 sip:299@62.210.194.120
And when I use:
if (method==INVITE && uri=~"sip:2[0-9][0-9]@*") {
rewritehostport("62.210.194.120:5060");
t_relay("tcp:62.210.194.120:5060");
exit;
};
I get:
0(17174) rewrite_uri: Rewriting Request-URI with 'sip:299@62.210.194.120'
0(17174) parse_headers: flags=ffffffffffffffff
0(17174) !!!! STARTING ROUTE 1: NORMAL FORWARD
0(17174) subst_run: running. r=1
0(17174) subst_str: no match
0(17174) !!!! STARTING ROUTE 3: SET/UNSET RTPPROXY
0(17174) DEBUG: t_newtran: T on entrance=0xffffffff
0(17174) parse_headers: flags=ffffffffffffffff
0(17174) parse_headers: flags=78
0(17174) t_lookup_request: start searching: hash=5349, isACK=1
Any idea?