Hi, I'm testing LCR modules. In my original ser.cfg I have static route to our PSTN gateway. On my INVITE message handler when I saw 00 prefix on the destination I strip it and call for route(5) which is my PSTN handler. This setup works fine. Part of my original ser.cfg is this:
if (uri=~"^sip:00[0-9]*@") { #pstn bound calls strip(2); #remove the leading "00" if (!isflagset(19)) { #check if user has credits sl_send_reply("403","Forbidden"); #drop him if none break; #stop executing script }; log(1,"pstn call!"); route(4); route(5); break; };
route[5] { rewritehost("x.x.x.x"); avp_write("i:45", "inv_timeout"); route(4); route(1); }
When I used LCR the INVITE handler remains the same, what I edited is the route[5] the pstn handler, I was prompted by "407 Proxy Authentication required"... This is the new route[5] (pstn handler):
route[5] { if (!load_gws()) { sl_send_reply ("500", "Internal Server Error! - load gw failed..."); break(); }
avp_write("i:45", "inv_timeout"); route(4); route(1); }
what I noticed is that on accounting records the o-uri is sip:<destination-number>@domain on my new PSTN handler compared to o-uri of my original is sip:<destination-number>@<ip-address-of-gw>.. It seems that LCR didn't rewrite the host part of the R-URI. What seems to be the problem with my configuration? Please help...
Thanks, Ryan