Hi there,
My guess is the fault is in the sipp script - the ACK is not properly
generated : instead of using the route set information from the 200 OK
(the contact and RR URIs), it is simply sent with the same RURI as the
INVITE - this is of course bogus.
If you want, I can send you an working SIPP UAC file.
Regards,
Bogdan
On 02/29/2012 08:02 PM, dyatsin wrote:
Hi,
I am trying to get familiar with Opensips (1.7.1) so I set up two boxes with
SIPp, OpenSIPS, and Asterisk:
box 1 (ip: 192.168.1.57) running SIPp and Opensips
box 2 (ip: 192.168.1.121) running Asterisk
I am trying to get OpenSIPS to run as a proxy between SIPp and Asterisk, but
this is the problem I have so right now:
SIPp OpenSIPS Asterisk
| | |
| INVITE | |
|---------------->| |
| | INVITE |
| |---------------->|
| | |
| | 100 Trying |
| |<----------------|
| 100 Trying | |
|<----------------| |
| | |
| | 200 OK |
| |<----------------|
| | |
| 200 OK | |
|<----------------| |
| | |
| ACK | |
|---------------->| |
| | |
| | |
All the messages look up until SIPp sends an ACK in response to the 200 OK,
but instead of sending an ACK to Asterisk, Opensips seems to be sending the
ACK back to itself, and goes into a loop.
These are the logs from tcpdump for the loopback interface on box 1:
================================================================
12:11:46.574820 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP
(17), length 567)
192.168.1.57.sip-tls> 192.168.1.57.sip: SIP, length: 539
INVITE sip:0119054741990@192.168.1.57:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.57:5061;branch=z9hG4bK-18363-1-0
From: sipp<sip:sipp@192.168.1.57:5061>;tag=18363SIPpTag001
To: sut<sip:0119054741990@192.168.1.57:5060>
Call-ID: 1-18363@192.168.1.57
CSeq: 1 INVITE
Contact: sip:sipp@192.168.1.57:5061
Max-Forwards: 70
Subject: Performance Test
Content-Type: application/sdp
Content-Length: 133
v=0
o=user1 53655765 2353687637 IN IP4 192.168.1.57
s=-
c=IN IP4 192.168.1.57
t=0 0
m=audio 6000 RTP/AVP 0
a=rtpmap:0 PCMU/800[|sip]
12:11:46.575332 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP
(17), length 338)
192.168.1.57.sip> 192.168.1.57.sip-tls: SIP, length: 310
SIP/2.0 100 Giving a try
Via: SIP/2.0/UDP 192.168.1.57:5061;branch=z9hG4bK-18363-1-0
From: sipp<sip:sipp@192.168.1.57:5061>;tag=18363SIPpTag001
To: sut<sip:0119054741990@192.168.1.57:5060>
Call-ID: 1-18363@192.168.1.57
CSeq: 1 INVITE
Server: OpenSIPS (1.7.1-notls (x86_64/linux))
Content-Length: 0
12:11:46.577090 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP
(17), length 765)
192.168.1.57.sip> 192.168.1.57.sip-tls: SIP, length: 737
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.57:5061;branch=z9hG4bK-18363-1-0
Record-Route:<sip:192.168.1.57;lr>
From: sipp<sip:sipp@192.168.1.57:5061>;tag=18363SIPpTag001
To: sut<sip:0119054741990@192.168.1.57:5060>;tag=as1642d8ff
Call-ID: 1-18363@192.168.1.57
CSeq: 1 INVITE
Server: Asterisk PBX 1.8.9.3
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY,
INFO, PUBLISH
Supported: replaces, timer
Contact:<sip:0119054741990@192.168.1.121:5060>
Content-Type: application/sdp
Content-Length: 209
v=0
o=root 1639240398 1639240398 IN IP4 192.168.1.121
s=Asterisk PBX 1.8.9.3
c=IN IP4 192.168.1.121
t=0 0
m=audio 10014 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
12:11:46.577303 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP
(17), length 408)
192.168.1.57.sip-tls> 192.168.1.57.sip: SIP, length: 380
ACK sip:0119054741990@192.168.1.57:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.57:5061;branch=z9hG4bK-18363-1-5
From: sipp<sip:sipp@192.168.1.57:5061>;tag=18363SIPpTag001
To: sut<sip:0119054741990@192.168.1.57:5060>;tag=as1642d8ff
Call-ID: 1-18363@192.168.1.57
CSeq: 1 ACK
Contact: sip:sipp@192.168.1.57:5061
Max-Forwards: 70
Subject: Performance Test
Content-Length: 0
12:11:46.577613 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP
(17), length 469)
192.168.1.57.sip> 192.168.1.57.sip: SIP, length: 441
ACK sip:0119054741990@192.168.1.57:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.57;branch=z9hG4bKef25.4b9ff153.2
Via: SIP/2.0/UDP 192.168.1.57:5061;branch=z9hG4bK-18363-1-5
From: sipp<sip:sipp@192.168.1.57:5061>;tag=18363SIPpTag001
To: sut<sip:0119054741990@192.168.1.57:5060>;tag=as1642d8ff
Call-ID: 1-18363@192.168.1.57
CSeq: 1 ACK
Contact: sip:sipp@192.168.1.57:5061
Max-Forwards: 69
Subject: Performance Test
Content-Length: 0
12:11:46.578151 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP
(17), length 530)
192.168.1.57.sip> 192.168.1.57.sip: SIP, length: 502
ACK sip:0119054741990@192.168.1.57:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.57;branch=z9hG4bKef25.4b9ff153.2
Via: SIP/2.0/UDP 192.168.1.57;branch=z9hG4bKef25.4b9ff153.2
Via: SIP/2.0/UDP 192.168.1.57:5061;branch=z9hG4bK-18363-1-5
From: sipp<sip:sipp@192.168.1.57:5061>;tag=18363SIPpTag001
To: sut<sip:0119054741990@192.168.1.57:5060>;tag=as1642d8ff
Call-ID: 1-18363@192.168.1.57
CSeq: 1 ACK
Contact: sip:sipp@192.168.1.57:5061
Max-Forwards: 68
Subject: Performance Test
Content-Length: 0
12:11:46.578627 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP
(17), length 591)
192.168.1.57.sip> 192.168.1.57.sip: SIP, length: 563
ACK sip:0119054741990@192.168.1.57:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.57;branch=z9hG4bKef25.4b9ff153.2
Via: SIP/2.0/UDP 192.168.1.57;branch=z9hG4bKef25.4b9ff153.2
Via: SIP/2.0/UDP 192.168.1.57;branch=z9hG4bKef25.4b9ff153.2
Via: SIP/2.0/UDP 192.168.1.57:5061;branch=z9hG4bK-18363-1-5
From: sipp<sip:sipp@192.168.1.57:5061>;tag=18363SIPpTag001
To: sut<sip:0119054741990@192.168.1.57:5060>;tag=as1642d8ff
Call-ID: 1-18363@192.168.1.57
CSeq: 1 ACK
Contact: sip:sipp@192.168.1.57:5061
Max-Forwards: 67
Subject: Performance Test
Content-Length: 0
================================================================
This is my opensips.cfg (rest of the config file is the default config)
================================================================
route[1] {
# for INVITEs enable some additional helper routes
if (is_method("INVITE")) {
t_on_branch("2");
t_on_reply("2");
t_on_failure("1");
}
if (is_method("INVITE")) {
rewritehostport("192.168.1.121:5060");
if (!t_relay()) {
xlog("t_relay failed: ret:$retcode\n");
sl_reply_error();
} else {
xlog("t_relay successful\n");
}
}
exit;
}
================================================================
1. Is t_relay the right application for me to use?
2. Do I need to add a case to handle the ACK's, if yes, how can I do this.
Any help or pointers is appreciated.
--
View this message in context:
http://opensips-open-sip-server.1449251.n2.nabble.com/help-configuring-Opensips-as-proxy-tp7330142p7330142.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users