Okay everyone...I have an easy one for you.
I am trying to do a simple fail over from one ip to the other if I get a 4040 and it fails. Can one of you type the correct syntax for me. Below is what I am trying to accomplish.
if (uri=~"sip:^1234567890.*@.*"){ prefix("1234"); rewritehostport("xxx.xxx.xxx.xxx:5060");
I need the hostport to be able to be rolled to another hostport ip if this one comes back with a 404 or any other failure. Can on eof you please help?
On 20-09-2005 21:32, Jason Mohler wrote:
Okay everyone...I have an easy one for you.
I am trying to do a simple fail over from one ip to the other if I get a 4040 and it fails. Can one of you type the correct syntax for me. Below is what I am trying to accomplish.
if (uri=~"sip:^1234567890.*@.*"){
The regular expression is not correct. ^ matches the string beginning. If you want to check for username containing 1234 then it should be something like:
if (uri =~ "^sip:1234@.*") {
But if you have this in failure_route then you should probably check for the reply status using t_check_status.
Jan.