Hi David,

Here it is.

Regards,
Bogdan

On 02/29/2012 08:23 PM, David Yat Sin wrote:
Hi Bogdan,
Thanks for looking into this. Could you send me your SIPP UAC file.



Regards,
David

On 12-02-29 1:20 PM, "Bogdan-Andrei Iancu"<bog...@opensips.org>  wrote:

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-Op
ensips-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




--
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">

<!-- This program is free software; you can redistribute it and/or      -->
<!-- modify it under the terms of the GNU General Public License as     -->
<!-- published by the Free Software Foundation; either version 2 of the -->
<!-- License, or (at your option) any later version.                    -->
<!--                                                                    -->
<!-- This program is distributed in the hope that it will be useful,    -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of     -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      -->
<!-- GNU General Public License for more details.                       -->
<!--                                                                    -->
<!-- You should have received a copy of the GNU General Public License  -->
<!-- along with this program; if not, write to the                      -->
<!-- Free Software Foundation, Inc.,                                    -->
<!-- 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA             -->
<!--                                                                    -->
<!--                 Sipp default 'uac' scenario.                       -->
<!--                                                                    -->

<scenario name="Basic Sipstone UAC">
  <!-- In client mode (sipp placing calls), the Call-ID MUST be         -->
  <!-- generated by sipp. To do so, use [call_id] keyword.                -->
  <send retrans="1000">
    <![CDATA[

      INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
      To: sut <sip:[service]@[remote_ip]:[remote_port]>
      Call-ID: [call_id]
      CSeq: 1 INVITE
      Contact: sip:sipp@[local_ip]:[local_port]
      Max-Forwards: 70
      Subject: Performance Test
      Content-Type: application/sdp
      Content-Length: [len]

      v=0
      o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
      s=-
      c=IN IP[media_ip_type] [media_ip]
      t=0 0
      m=audio [media_port] RTP/AVP 0
      a=rtpmap:0 PCMU/8000

    ]]>
  </send>

  <recv response="100"
        optional="true">
  </recv>

  <recv response="180" optional="true">
  </recv>

  <!-- By adding rrs="true" (Record Route Sets), the route sets         -->
  <!-- are saved and used for following messages sent. Useful to test   -->
  <!-- against stateful SIP proxies/B2BUAs.                             -->
  <recv response="200" rtd="true" rrs="true">
  </recv>

  <!-- Packet lost can be simulated in any send/recv message by         -->
  <!-- by adding the 'lost = "10"'. Value can be [1-100] percent.       -->
  <send>
    <![CDATA[

      ACK [next_url] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
      To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
      [routes]
      Call-ID: [call_id]
      CSeq: 1 ACK
      Contact: sip:sipp@[local_ip]:[local_port]
      Max-Forwards: 70
      Subject: Performance Test
      Content-Length: 0

    ]]>
  </send>

  <!-- This delay can be customized by the -d command-line option       -->
  <!-- or by adding a 'milliseconds = "value"' option here.             -->
  <pause milliseconds="10000"/>


  <!-- The 'crlf' option inserts a blank line in the statistics report. -->
  <send retrans="1000">
    <![CDATA[

      BYE [next_url] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
      To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
      [routes]
      Call-ID: [call_id]
      CSeq: 2 BYE
      Contact: sip:sipp@[local_ip]:[local_port]
      Max-Forwards: 70
      Subject: Performance Test
      Content-Length: 0

    ]]>
  </send>

  <recv response="200" crlf="true">
  </recv>

  <!-- definition of the response time repartition table (unit is ms)   -->
  <ResponseTimeRepartition value="500, 1000, 1500, 2000"/>

  <!-- definition of the call length repartition table (unit is ms)     -->
  <CallLengthRepartition value="500"/>

</scenario>

_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to