Hello!

Opensips 2.2.2.

I want to make an installation of Opensips which  will include auth and top 
hiding functionality.

First of all, in the main route, i catch INVITE
"if  (is_method("INVITE") && !has_totag()) {
 route(1);
 exit;
}"

then, in route [1], i make some auth procedure using "pv_proxy_authorize" and 
"proxy_authorize" functions
if auth procedure is successful i make 
"xlog("L_INFO", "Route1:$rm was received with auth (IP=$si, IPD=$rd, 
CALLID=$ci, FROMTAG=$ft, TOTAG=$tt, AUTH=$au) AND B2B prepared");
b2b_init_request("top hiding");
exit;"

In the local route i try to edit port of the destination, using 
"xlog("L_INFO", "Local:$rm was received with auth (IP=$si, IPD=$rd, CALLID=$ci, 
FROMTAG=$ft, TOTAG=$tt, AUTH=$au)");
  rewritehostport("1.1.1.1:5065");" 

where 1.1.1.1 - ip address of Opensips.

In attachment you can see debug of unsuccessful call, where 
1.1.1.1 - ip address of Opensips.
2.2.2.2 - caller SIP UA

I can see in syslog both messages, in local route and in route [1].

As you can see from the debug Opensips doesn`t try to send INVITE to 
1.1.1.1:5065.

Thank you for any help.


 mailto:[email protected]
U 2016/11/07 07:01:54.365223 2.2.2.2:43202 -> 1.1.1.1:5068
INVITE sip:[email protected]:5068;transport=UDP SIP/2.0.
Via: SIP/2.0/UDP 2.2.2.2:43202;branch=z9hG4bK-524287-1---6c39d23ff5c43a45.
Max-Forwards: 70.
Contact: <sip:[email protected]:43202;transport=UDP>.
To: <sip:[email protected]:5068;transport=UDP>.
From: <sip:[email protected]:5068;transport=UDP>;tag=2931624b.
Call-ID: Us0IW2TT4dZBUyQSriTuLg...
CSeq: 1 INVITE.
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, 
SUBSCRIBE.
Content-Type: application/sdp.
Supported: replaces, norefersub, extended-refer, timer, outbound, path, 
X-cisco-serviceuri.
User-Agent: Z 3.9.32144 r32121.
Allow-Events: presence, kpml.
Content-Length: 165.
.
v=0.
o=Z 0 0 IN IP4 2.2.2.2.
s=Z.
c=IN IP4 2.2.2.2.
t=0 0.
m=audio 8000 RTP/AVP 8 101.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=sendrecv.


U 2016/11/07 07:01:54.366773 1.1.1.1:5068 -> 2.2.2.2:43202
SIP/2.0 407 Proxy Authentication Required.
Via: SIP/2.0/UDP 
2.2.2.2:43202;received=2.2.2.2;rport=43202;branch=z9hG4bK-524287-1---6c39d23ff5c43a45.
To: 
<sip:[email protected]:5068;transport=UDP>;tag=a61f83fdd32877dcc81f9a0d7320db06.4831.
From: <sip:[email protected]:5068;transport=UDP>;tag=2931624b.
Call-ID: Us0IW2TT4dZBUyQSriTuLg...
CSeq: 1 INVITE.
Proxy-Authenticate: Digest realm="1.1.1.1", 
nonce="58206d41000000006f9c34cbbc5432bf30964b6fcec80fd2".
Content-Length: 0.
.


U 2016/11/07 07:01:54.368491 2.2.2.2:43202 -> 1.1.1.1:5068
ACK sip:[email protected]:5068;transport=UDP SIP/2.0.
Via: SIP/2.0/UDP 2.2.2.2:43202;branch=z9hG4bK-524287-1---6c39d23ff5c43a45.
Max-Forwards: 70.
To: 
<sip:[email protected]:5068;transport=UDP>;tag=a61f83fdd32877dcc81f9a0d7320db06.4831.
From: <sip:[email protected]:5068;transport=UDP>;tag=2931624b.
Call-ID: Us0IW2TT4dZBUyQSriTuLg...
CSeq: 1 ACK.
Content-Length: 0.
.


U 2016/11/07 07:01:54.371276 2.2.2.2:43202 -> 1.1.1.1:5068
INVITE sip:[email protected]:5068;transport=UDP SIP/2.0.
Via: SIP/2.0/UDP 2.2.2.2:43202;branch=z9hG4bK-524287-1---49ddf061a63dbdb5.
Max-Forwards: 70.
Contact: <sip:[email protected]:43202;transport=UDP>.
To: <sip:[email protected]:5068;transport=UDP>.
From: <sip:[email protected]:5068;transport=UDP>;tag=2931624b.
Call-ID: Us0IW2TT4dZBUyQSriTuLg...
CSeq: 2 INVITE.
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, 
SUBSCRIBE.
Content-Type: application/sdp.
Proxy-Authorization: Digest 
username="0000145",realm="1.1.1.1",nonce="58206d41000000006f9c34cbbc5432bf30964b6fcec80fd2",uri="sip:[email protected]:5068;transport=UDP",response="03a87eb9df49b8db1b7b371236c98a40",algorithm=MD5.
Supported: replaces, norefersub, extended-refer, timer, outbound, path, 
X-cisco-serviceuri.
User-Agent: Z 3.9.32144 r32121.
Allow-Events: presence, kpml.
Content-Length: 165.
.
v=0.
o=Z 0 0 IN IP4 2.2.2.2.
s=Z.
c=IN IP4 2.2.2.2.
t=0 0.
m=audio 8000 RTP/AVP 8 101.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=sendrecv.


U 2016/11/07 07:01:54.383949 1.1.1.1:5068 -> 2.2.2.2:43202
SIP/2.0 407 Proxy Authentication Required.
Via: SIP/2.0/UDP 
2.2.2.2:43202;received=2.2.2.2;rport=43202;branch=z9hG4bK-524287-1---49ddf061a63dbdb5.
To: <sip:[email protected]:5068;transport=UDP>;tag=B2B.457.222.1478520113.
From: <sip:[email protected]:5068;transport=UDP>;tag=2931624b.
Call-ID: Us0IW2TT4dZBUyQSriTuLg...
CSeq: 2 INVITE.
Contact: <sip:1.1.1.1:5068>.
Content-Length: 0.
.


U 2016/11/07 07:01:54.386028 2.2.2.2:43202 -> 1.1.1.1:5068
ACK sip:[email protected]:5068;transport=UDP SIP/2.0.
Via: SIP/2.0/UDP 2.2.2.2:43202;branch=z9hG4bK-524287-1---49ddf061a63dbdb5.
Max-Forwards: 70.
To: <sip:[email protected]:5068;transport=UDP>;tag=B2B.457.222.1478520113.
From: <sip:[email protected]:5068;transport=UDP>;tag=2931624b.
Call-ID: Us0IW2TT4dZBUyQSriTuLg...
CSeq: 2 ACK.
Content-Length: 0.
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to