Hi

i am using sipp for call hold scenerio. here i am using x-lite as uac and sipp 
as uas.

here i want to implement the logic, when x-lite press hold button, my sipp will 
receive invite and it will parse the msg field (c=0.0.0.0 || a=sendonly || c & 
a field), if it matches with any of the field, then go for sending 200 ok with 
c=0.0.0.0 or a= recvonly, if it did not receive INVITE from x-lite, then close 
the call by sendind BYE.



here i am attaching uas.xml script, here i have doubt how to parse the "c" and 
"a" msg field and then how to send response corresponding to that request





Regards,

Manasi
<recv request="INVITE">
  <optional="true">
    <action>
      <ereg regexp="c:IN IP[media_ip_type] 0\.0\.0\.0" search_in="msg" 
check_it="true" assign_to="none" next="1"/>
      </action>
          <next="1">
          <action>
      <ereg regexp="a:sendonly" search_in="msg" check_it="true" 
assign_to="none" next="2"/>
    </action>
        
        <action>
          <ereg regexp="c:IN IP[media_ip_type] [0\.0\.0\.0\>]" search_in="msg" 
check_it="true" assign_to="none" />
      <ereg regexp="a:sendonly" search_in="msg" check_it="true" 
assign_to="none" next="3"/>
    </action>
        </recv>
  
   <label id="1" />
    <send retrans="500">
    <![CDATA[

      SIP/2.0 200 OK
      [last_Via:]
      [last_From:]
      [last_To:];tag=[pid]SIPpTag01[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] 0.0.0.0
      t=0 0
      m=audio [media_port] RTP/AVP 0
      a=rtpmap:0 PCMU/8000

    ]]>
  </send>
    
        <label id="2" >
      <send retrans="500">
    <![CDATA[

      SIP/2.0 200 OK
      [last_Via:]
      [last_From:]
      [last_To:];tag=[pid]SIPpTag01[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 [media_port] RTP/AVP 0
      a=recvonly

    ]]>
  </send>
  
        <label id="3" />
     <send retrans="500">
    <![CDATA[

      SIP/2.0 200 OK
      [last_Via:]
      [last_From:]
      [last_To:];tag=[pid]SIPpTag01[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] 0.0.0.0
      t=0 0
      m=audio [media_port] RTP/AVP 0
      a=recvonly

    ]]>
  </send>
  
  
  <recv request="BYE">
  </recv>

  <send>
    <![CDATA[

      SIP/2.0 200 OK
      [last_Via:]
      [last_From:]
      [last_To:]
      [last_Call-ID:]
      [last_CSeq:]
      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
      Content-Length: 0

    ]]>
  </send>
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to