I have tried following rule but somehow opensips challenging it from authentication
route[3]{
if ( $ru =~ "^sip:011[0-9]*@") {
rewritehostport("
65.65.65.65:5065");
xlog("Redirecting to SIP Provider... $ru\n");
exit;
};
}
U
198.198.198.198:56186 ->
182.182.182.182:5060
INVITE
sip:0116663332222@sip.a1routes.com SIP/2.0.
Via: SIP/2.0/UDP 198.198.198.198:56186;branch=z9hG4bK-524287-1---cf509553a10c6e60;rport.
Max-Forwards: 70.
Contact: <sip:1001@198.198.198.198:56186;transport=UDP>.
To: <
sip:0116663332222@sip.a1routes.com>.
From: "1001"<
sip:1001@sip.a1routes.com>;tag=3894f90f.
Call-ID: rcKLOO3Z1CXYS2EtiCLt3w...
CSeq: 1 INVITE.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, SUBSCRIBE.
Content-Type: application/sdp.
Supported: replaces, norefersub.
User-Agent: SessionTalk Version 4.52.
Content-Length: 334.
.
v=0.
o=- 1408648022732773 1408648022732773 IN IP4 10.199.232.27.
s=-.
c=IN IP4 10.199.232.27.
t=0 0.
m=audio 4004 RTP/AVP 3 102 0 8 9 101.
a=rtpmap:3 GSM/8000.
a=rtpmap:102 iLBC/8000.
a=fmtp:102 mode=30.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:9 G722/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=sendrecv.
#
U
182.182.182.182:5060 ->
198.198.198.198:56186
SIP/2.0 407 Proxy Authentication Required.
Via: SIP/2.0/UDP 198.198.198.198:56186;received=198.198.198.198;branch=z9hG4bK-524287-1---cf509553a10c6e60;rport=56186.
To: <
sip:0116663332222@sip.a1routes.com>;tag=c223d9b6a566b5450d01aad8764c61fe.1e68.
From: "1001"<
sip:1001@sip.a1routes.com>;tag=3894f90f.
Call-ID: rcKLOO3Z1CXYS2EtiCLt3w...
CSeq: 1 INVITE.
Proxy-Authenticate: Digest realm="
sip.a1routes.com", nonce="53f6436f0000009672b0aa913a92b9afaecefe5810253453".
Server: OpenSIPS (1.11.2-tls (x86_64/linux)).
Content-Length: 0.
.