Hi all,

I have a test where I modify the audio codec in-session.  An example of "why?" 
would be a call that drops from g722 to g711 to send a clear channel fax.

I need to verify that the new media path makes it through my SBC, etc - and not 
having a PBX in-house which successfully handles this scenario tested using 
sipp.

Unfortunately, whilst a play_pcap_audio sent after the codec modifcation uses 
the correct new media FROM port, it does not use the new media TO port which it 
received from the far end in the incoming INVITE or OK.

Anyone got this working, or spot the mistake?  I'll delve into the sipp source 
code again if I get time, but just in case I'd be reinventing the wheel ...

(the script below is the terminating party, I include this as it's simpler (no 
authentication, etc).  However, the behaviour is identical at both ends of the 
call: FROM port is updated, but TO port is not.)



Matt


<recv request="INVITE">
  </recv>
  
<send>
    <![CDATA[
      SIP/2.0 180 Ringing
      [last_Via:]
      [last_From:]
      [last_To:];tag=[call_number]
      [last_Call-ID:]
      [last_CSeq:]
      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
      Content-Length: 0
    ]]>
  </send>

  <!-- audio only template -->
  <send retrans="500">
    <![CDATA[
      SIP/2.0 200 OK
      [last_Via:]
      [last_From:]
      [last_To:];tag=[call_number]
      [last_Call-ID:]
      [last_CSeq:]
      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
      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
      a=sendrecv
      m=audio [media_port] RTP/AVP 9 101
      a=rtpmap:9 G722/8000
      a=rtpmap:101 telephone-event/8000
      a=fmtp:101 0-15
    ]]>
  </send>

  <nop>
    <action>
      <exec play_pcap_audio="g722-called.pcap"/>
      <log message="playing g722-called.pcap"/>
    </action>
  </nop>

  <recv request="ACK"
        optional="true"
        rtd="true"
        crlf="true">
  </recv>

  <recv request="INVITE">
  </recv>

  <!-- audio only template -->
  <send retrans="500">
    <![CDATA[
      SIP/2.0 200 OK
      [last_Via:]
      [last_From:]
      [last_To:];tag=[call_number]
      [last_Call-ID:]
      [last_CSeq:]
      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
      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 0 RTP/AVP 9 101
      m=audio [auto_media_port] RTP/AVP 8 101
      a=rtpmap:8 PCMA/8000
      a=rtpmap:101 telephone-event/8000
      a=fmtp:101 0-15
      a=ptime:20
      a=sendrecv
    ]]>
  </send>

  <nop>
    <action>
      <exec play_pcap_audio="g711a-called.pcap"/>
      <log message="playing g711a-called.pcap"/>
    </action>
  </nop>

  <recv request="ACK"
        optional="true"
        rtd="true"
        crlf="true">
  </recv>
  
  <!-- call in progress.  Wait for call to end -->
  <label id="3"/>
  <!-- Sit here until we get a BYE -->
  <recv request="BYE" next="4" optional="true">
  </recv>

...
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to