Help for this page

Select Code to Download


  1. or download this
    to find a SIP packet:
    if (packet_string contains the word 'sip' but NOT the word 'sdp') {
        print "packet appears to be sip";
    }
    
  2. or download this
    to find a SDP packet:
    if (packet_string contains the word 'sip' and ALSO CONTAINS the word '
    +sdp) {
        print "packet appears to be sdp";
    }
    
  3. or download this
    to find an RTP packet:
    if (packet_string cotains NEITHER 'sdp and sdp') {
        print "packet appears to be rtp";
    }
    
  4. or download this
    if ($packet !~ m/sip && sdp/) {
        print "packet is RTP\n";
    ...
     elsif ($packet =~ m/sdp/ && m/sip/) {
        print "packet is sdp!\n";
     }