<?xml version="1.0" encoding="iso-8859-2" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">

<scenario name="Unsolicited NOTIFY with MWI (message-summary Event)">

  <!--  Respond to registration request. Tested phone seems to do not
        react to NOTIFY sent from other host than registration server     -->                  
  <recv request="REGISTER" crlf="true">
  </recv>

  <send>
    <![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]>
      Expires: 120      
      Content-Length: 0

    ]]>
  </send>                    
             
  <!-- Send unsolicited NOTIFY with MWI info (2 new/8 old messages, 0 new urgent/ 2 old urgent )        -->                         
  <send retrans="500">
    <![CDATA[

      NOTIFY sip:[remote_ip] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: <sip:[service]@[local_ip]>;tag=[call_number]
      To: <sip:[service]@[local_ip]>
      Call-ID: [call_id]
      CSeq: [cseq] NOTIFY
      Contact: sip:[local_ip]:[local_port]
      Max-Forwards: 10
      Expires: 120
      User-Agent: SIPp/Win32
      Event: message-summary
      Subscription-State: active
      Content-Type: application/simple-message-summary
      Content-Length: [len]

      Messages-Waiting: yes
      Message-Account: sip:[service]@[local_ip]
      Voice-Message: 2/8 (0/2)           

    ]]>
  </send>

  <recv response="200">
  </recv>
  
    
  <pause milliseconds="10000" />    
  
  <!-- Send unsolicited NOTIFY with MWI info: no messages    -->                         
  <send retrans="500">
    <![CDATA[

      NOTIFY sip:[remote_ip] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: <sip:[service]@[local_ip]>;tag=[call_number]
      To: <sip:[service]@[local_ip]>
      Call-ID: [call_id]
      CSeq: [cseq] NOTIFY
      Contact: sip:[local_ip]:[local_port]
      Max-Forwards: 10
      Expires: 120
      User-Agent: SIPp/Win32
      Event: message-summary
      Subscription-State: active
      Content-Type: application/simple-message-summary
      Content-Length: [len]

      Messages-Waiting: no
      Message-Account: sip:[service]@[local_ip]
      Voice-Message: 0/0 (0/0)           

    ]]>
  </send>

  <recv response="200">
  </recv>  
  

  <pause milliseconds="10000" />    

  <!-- Send unsolicited NOTIFY with MWI info (3 new/9 old messages, 1 new urgent/ 1 old urgent )        -->                         
  <send retrans="500">
    <![CDATA[

      NOTIFY sip:[remote_ip] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: <sip:[service]@[local_ip]>;tag=[call_number]
      To: <sip:[service]@[local_ip]>
      Call-ID: [call_id]
      CSeq: [cseq] NOTIFY
      Contact: sip:[local_ip]:[local_port]
      Max-Forwards: 10
      Expires: 120
      User-Agent: SIPp/Win32
      Event: message-summary
      Subscription-State: active
      Content-Type: application/simple-message-summary
      Content-Length: [len]

      Messages-Waiting: yes
      Message-Account: sip:[service]@[local_ip]
      Voice-Message: 3/9 (1/1)           

    ]]>
  </send>

  <recv response="200">
  </recv>  
  
  
  <pause milliseconds="10000" />    
  
  <!-- Send unsolicited NOTIFY with MWI info: no messages    -->                         
  <send retrans="500">
    <![CDATA[

      NOTIFY sip:[remote_ip] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: <sip:[service]@[local_ip]>;tag=[call_number]
      To: <sip:[service]@[local_ip]>
      Call-ID: [call_id]
      CSeq: [cseq] NOTIFY
      Contact: sip:[local_ip]:[local_port]
      Max-Forwards: 10
      Expires: 120
      User-Agent: SIPp/Win32
      Event: message-summary
      Subscription-State: active
      Content-Type: application/simple-message-summary
      Content-Length: [len]

      Messages-Waiting: no
      Message-Account: sip:[service]@[local_ip]
      Voice-Message: 0/0 (0/0)           

    ]]>
  </send>

  <recv response="200">
  </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>

