<div dir="ltr">I have tried following rule but somehow opensips challenging it from authentication<br><br>route[3]{<br><br>         if ( $ru =~ "^sip:011[0-9]*@") {<br>                rewritehostport("<a href="http://65.65.65.65:5065">65.65.65.65:5065</a>");<br>
                xlog("Redirecting to SIP Provider... $ru\n");<br>        exit;<br>        };<br>}<br><br><br><br><br>U <a href="http://198.198.198.198:56186">198.198.198.198:56186</a> -> <a href="http://182.182.182.182:5060">182.182.182.182:5060</a><br>
INVITE <a href="mailto:sip%3A0116663332222@sip.a1routes.com">sip:0116663332222@sip.a1routes.com</a> SIP/2.0.<br>Via: SIP/2.0/UDP 198.198.198.198:56186;branch=z9hG4bK-524287-1---cf509553a10c6e60;rport.<br>Max-Forwards: 70.<br>
Contact: <sip:1001@198.198.198.198:56186;transport=UDP>.<br>To: <<a href="mailto:sip%3A0116663332222@sip.a1routes.com">sip:0116663332222@sip.a1routes.com</a>>.<br>From: "1001"<<a href="mailto:sip%3A1001@sip.a1routes.com">sip:1001@sip.a1routes.com</a>>;tag=3894f90f.<br>
Call-ID: rcKLOO3Z1CXYS2EtiCLt3w...<br>CSeq: 1 INVITE.<br>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, SUBSCRIBE.<br>Content-Type: application/sdp.<br>Supported: replaces, norefersub.<br>User-Agent: SessionTalk Version 4.52.<br>
Content-Length: 334.<br>.<br>v=0.<br>o=- 1408648022732773 1408648022732773 IN IP4 10.199.232.27.<br>s=-.<br>c=IN IP4 10.199.232.27.<br>t=0 0.<br>m=audio 4004 RTP/AVP 3 102 0 8 9 101.<br>a=rtpmap:3 GSM/8000.<br>a=rtpmap:102 iLBC/8000.<br>
a=fmtp:102 mode=30.<br>a=rtpmap:0 PCMU/8000.<br>a=rtpmap:8 PCMA/8000.<br>a=rtpmap:9 G722/8000.<br>a=rtpmap:101 telephone-event/8000.<br>a=fmtp:101 0-15.<br>a=sendrecv.<br><br>#<br>U <a href="http://182.182.182.182:5060">182.182.182.182:5060</a> -> <a href="http://198.198.198.198:56186">198.198.198.198:56186</a><br>
SIP/2.0 407 Proxy Authentication Required.<br>Via: SIP/2.0/UDP 198.198.198.198:56186;received=198.198.198.198;branch=z9hG4bK-524287-1---cf509553a10c6e60;rport=56186.<br>To: <<a href="mailto:sip%3A0116663332222@sip.a1routes.com">sip:0116663332222@sip.a1routes.com</a>>;tag=c223d9b6a566b5450d01aad8764c61fe.1e68.<br>
From: "1001"<<a href="mailto:sip%3A1001@sip.a1routes.com">sip:1001@sip.a1routes.com</a>>;tag=3894f90f.<br>Call-ID: rcKLOO3Z1CXYS2EtiCLt3w...<br>CSeq: 1 INVITE.<br>Proxy-Authenticate: Digest realm="<a href="http://sip.a1routes.com">sip.a1routes.com</a>", nonce="53f6436f0000009672b0aa913a92b9afaecefe5810253453".<br>
Server: OpenSIPS (1.11.2-tls (x86_64/linux)).<br>Content-Length: 0.<br>.<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 21, 2014 at 7:37 AM, Yuriy Gorlichenko <span dir="ltr"><<a href="mailto:ovoshlook@gmail.com" target="_blank">ovoshlook@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">rewritehost() sucessfully work with UAC. But As I know <br>
</span>1) It statless function<br>2) It read only string argumetns, and do not read variables</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">2014-08-21 14:43 GMT+04:00 Satish Patel <span dir="ltr"><<a href="mailto:satish.txt@gmail.com" target="_blank">satish.txt@gmail.com</a>></span>:<div><div class="h5">
<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I will give it a try again today, can you please make sure my t_relay() syntax is correct?<br>
<br>
So t_relay will rewrite my host past right and send call to trunk.<br>
<br>
While ago I was using rewritehost() function but I think it's not working with UAC registrant module.<br>
<br>
<br>
Sent from my iPhone<br>
<div><div><br>
On Aug 21, 2014, at 3:53 AM, Daniel Tryba <<a href="mailto:daniel@pocos.nl" target="_blank">daniel@pocos.nl</a>> wrote:<br>
<br>
> On Thursday 21 August 2014 05:56:46 Satish Patel wrote:<br>
>>                if ( $rU =~ "sip:1[0-9]@*") {<br>
><br>
> Try $ru instead, $rU only contains the dialled "number". So<br>
> $ru =~ "sip:1[0-9]@*"<br>
> or<br>
> $rU =~ "1[0-9]"<br>
><br>
> But note the regexp, that only matches the exact numbers 10 to 19, if you are<br>
> trying to match prefixes you are doing it wrong (tm).<br>
><br>
> _______________________________________________<br>
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
> <a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div></div></blockquote></div></div></div><br></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>