hi
i want to distribute tow alieas users use different pstn gw with same area code. i add below in my cfg.but it doesnt work.any advice for me ? many many thx.
if (uri=~"^sip:0060.*@(my.test.com)"){ strip(2); prefix("21"); rewritehostport("1.2.3.4:5060"); # This is where PSTN Gateway installed route(1); return; }; if (uri=~"^sip:0060.*@(your.test.com)"){ strip(2); prefix("22"); rewritehostport("5.6.7.8:5060"); # This is where PSTN Gateway installed route(1); return; };
liu york wrote:
i want to distribute tow alieas users use different pstn gw with same area code. i add below in my cfg.but it doesnt work.any advice for me ? many many thx.
if (uri=~"^sip:0060.*@(my\.test\.com)"){
Most likely, there is something wrong with the regular expression. I don't quite remember what kind of regexps SER uses, but it also worth a try escaping parantheses. Although, in this case you don't really need them.
Regards, Martin