2
votes

i am trying to replay an captured pcap file with sipp. My setup has 2 pc's and a proxy. The receiving pc has linphone and should be able to answer a call from the other pc which sends a pcap file with sipp. I have recorded the media with wireshark and saved it as *.pcap.

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


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

  <send retrans="500">
    <![CDATA[

      REGISTER sip:[remote_ip] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
      From: <sip:[field0]@[field2]>;tag=[call_number]
      To: <sip:[field0]@[field2]>
      Call-ID: [call_id]
      CSeq: [cseq] REGISTER
      Contact: <sip:[field0]@[local_ip]:[local_port]>
      Max-Forwards: 10
      Expires: 120
      User-Agent: SIPp/Win32
      Content-Length: 0

    ]]>
  </send>

  <!-- asterisk -->
  <recv response="100" optional="true">
  </recv>

  <recv response="401" auth="true">
  </recv>

  <send retrans="500">
    <![CDATA[

      REGISTER sip:[remote_ip] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: <sip:[field0]@[field2]>;tag=[call_number]
      To: <sip:[field0]@[field2]>
      Call-ID: [call_id]
      CSeq: [cseq] REGISTER
      Contact: <sip:[field0]@[local_ip]>
      [field3]
      Max-Forwards: 10
      Expires: 120
      User-Agent: SIPp/Win32
      Content-Length: 0

    ]]>
  </send>

  <!-- asterisk -->
  <recv response="100" optional="true">
  </recv>

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


  <send retrans="500">
    <![CDATA[

      INVITE sip:[field1]@[field2] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
      From: <sip:[field0]@[field2]>;tag=[call_number]
      To: <sip:[field1]@[field2]>
      Call-ID: [call_id]
      CSeq: 20 INVITE
      Contact: <sip:[field0]@[local_ip]:[local_port]>
      Content-Type: application/sdp
      Max-Forwards: 70
      Subject: Phone Call
      Content-Length: [len]

      v=0
      o=user1 123456 654321 IN IP[media_ip_type] [media_ip]
      s=-
      c=IN IP[local_ip_type] [local_ip]
      t=0 0
      m=audio [media_port] RTP/AVP 0 8 101
      a=rtpmap:0 PCMU/8000/1
      a=rtpmap:8 PCMA/8000/1
      a=rtpmap:101 telephone-event/8000/1
      a=fmtp:101 0-11
      a=sendrecv
      m=video [media_port+2] RTP/AVP 99 98 34 100
      a=rtpmap:99 MP4V-ES/90000
      a=fmtp:99 profile-level-id=3
      a=rtpmap:98 H263-1998/90000
      a=fmtp:98 CIF=1;QCIF=1
      a=rtpmap:34 H263/90000
      a=rtpmap:100 x-snow/90000
      a=sendrecv

    ]]>
  </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" crlf="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 sip:[field1]@[field2] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
      Route: <sip:[remote_ip]:[remote_port];lr=on>
      From: <sip:[field0]@[field2]>;tag=[call_number]
      To: <sip:[field1]@[field2]>
      Call-ID: [call_id]    
      CSeq: 20 ACK
      Contact: <sip:[field0]@[local_ip]:[local_port]>
      Max-Forwards: 70
      Subject: Phone Call
      Content-Length: [len]

    ]]>
  </send>

  <!-- Play a pre-recorded PCAP file (RTP stream)                       -->
  <nop>
    <action>
      <exec play_pcap_audio="/home/MM08-T/Desktop/owntest.pcap"/>
    </action>
  </nop>

  <pause milliseconds="10000"/>

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

      BYE sip:[field1]@[field2] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      Route: <sip:[remote_ip]:[remote_port];lr=on>
      From: <sip:[field0]@[field2]>;tag=[call_number]
      To: <sip:[field1]@[field2]>
      Call-ID: [call_id]
      CSeq: 21 BYE
      Contact: <sip:[field0]@[local_ip]:[local_port]>
      Max-Forwards: 70
      Subject: Phone Call
      Content-Length: 0

    ]]>
  </send>

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

  <!-- definition of the response time repartition table (unit is ms)   -->
  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>

  <!-- definition of the call length repartition table (unit is ms)     -->
  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>

</scenario>

and the injection-file:

SEQUENTIAL MM08-T;MM08-O;lab.ibk.tuwien.ac.at;[authentication username=MM08-T password=UHzd7wv0];

The problem is that I always get the error-message:

2014-05-28 16:27:32:278 1401287252.278473: Aborting call on unexpected message for Call-Id '[email protected]': while expecting '180' (index 8), received 'SIP/2.0 101 Dialog Establishement Via: SIP/2.0/UDP 192.168.108.105:5061;rport=5061;branch=z9hG4bK-12715-10-6 Record-Route: From: ;tag=10 To: ;tag=1157919833 Call-ID: [email protected] CSeq: 20 INVITE Contact: User-Agent: Linphone/3.3.99.6 (eXosip2/3.3.0) Content-Length: 0 P-hint:

'. sipp: There were more errors, enable -trace_err to log them.

It seems to me like the scenario-file has some problem but i just can't find anything wrong. Has anyone got any clue?

1

1 Answers

1
votes

According to error message you posted here, the SIPP xml script do not handle "101 Dialog Establishment" response from the Linphone. You can try to add 101 response handling in your XML file (as optional), and try again.

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