summaryrefslogtreecommitdiff
path: root/sipsim
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2016-12-02 11:24:23 +0100
committerPeter Wu <peter@lekensteyn.nl>2016-12-02 11:24:23 +0100
commit3cdb9eab57dac8497d13e3a9b90cf40505db767f (patch)
treeb34da1c9d2e80d998efbea17c741820df9726f88 /sipsim
parent6951d901827e9d31a8c09a3a30d6d65ac25514c7 (diff)
downloadwireshark-notes-3cdb9eab57dac8497d13e3a9b90cf40505db767f.tar.gz
Added SIPp scenario and list of codecs supported by FS
Requires appropriately configured FreeSWITCH server that responds to a call to sip:test@host by playing a fragment, then hanging up. SIPp scenario was used to create a bunch of captures, uploaded to https://wiki.wireshark.org/SampleCaptures#SIP_and_RTP
Diffstat (limited to 'sipsim')
-rw-r--r--sipsim/codecs.txt57
-rw-r--r--sipsim/uac_media.xml92
2 files changed, 149 insertions, 0 deletions
diff --git a/sipsim/codecs.txt b/sipsim/codecs.txt
new file mode 100644
index 0000000..94cac76
--- /dev/null
+++ b/sipsim/codecs.txt
@@ -0,0 +1,57 @@
+
+# Note: codecname[@8000h|16000h|32000h[@XXi]]
+
+# mod_g723_1 is for passthrough
+# G723/8000 4
+
+# (in core)
+#PCMU/8000 0
+#PCMA/8000 8
+# RFC 3555 valid sample sizes for L16: 8000, 11025, 16000, 22050, 24000, 32000, 44100, and 48000
+# L16 RTP clock rate is always 44100. (pt 10 and 11, but dynamic for others)
+#L16/8000/2
+#L16/16000/2
+#L16/11025
+#L16/48000
+
+# mod_com_g728
+# G728/8000 15
+
+# mod_com_g729
+# G729/8000 18
+
+
+# (mostly) dynamic types
+# mod_ilbc
+#iLBC/8000 # note: a=fmtp:97 mode=20 or mode=30
+
+# mod_siren
+#G7221/16000 # note: a=fmtp:121 bitrate=24000
+#G7221/32000 # note: a=fmtp:122 bitrate=48000
+
+# note, additionally also supported: PCMU/PCMA (G711)
+# mod_spandsp
+#GSM/8000 3
+#DVI4/8000 5
+#DVI4/16000 6
+#LPC/8000 7
+# G722/8000 on wire, but actual sample size is 16kHz
+# G722/8000 9
+#G722/16000
+#G726-16/8000
+#G726-24/8000
+#G726-32/8000
+#G726-40/8000
+#AAL2-G726-16/8000
+#AAL2-G726-24/8000
+#AAL2-G726-32/8000
+#AAL2-G726-40/8000
+
+# Maybe FS wants capital OPUS and SPEEX...
+# mod_opus
+#opus/48000/2
+
+# (in core)
+#speex/8000
+#speex/16000
+#speex/32000
diff --git a/sipsim/uac_media.xml b/sipsim/uac_media.xml
new file mode 100644
index 0000000..51b5433
--- /dev/null
+++ b/sipsim/uac_media.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<!-- This program is free software; you can redistribute it and/or -->
+<!-- modify it under the terms of the GNU General Public License as -->
+<!-- published by the Free Software Foundation; either version 2 of the -->
+<!-- License, or (at your option) any later version. -->
+<!-- -->
+<!-- This program is distributed in the hope that it will be useful, -->
+<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
+<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
+<!-- GNU General Public License for more details. -->
+<!-- -->
+<!-- You should have received a copy of the GNU General Public License -->
+<!-- along with this program; if not, write to the -->
+<!-- Free Software Foundation, Inc., -->
+<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
+<!-- -->
+<!-- Based on sipp default 'uac' scenario. -->
+<!-- To make one call to test@10.0.2.15 from IP 10.0.2.20 using PCMU codec:
+ ./sipp -sf uac_media.xml 10.0.2.15 -i 10.0.2.20 -bind_local -m 1 -s test -key codec PCMU/8000 -key pt 99
+ -->
+<!-- -->
+
+<scenario name="Codec test">
+ <send retrans="500">
+ <![CDATA[
+ INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: "[codec]" <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
+ To: [service] <sip:[service]@[remote_ip]:[remote_port]>
+ Call-ID: [call_id]
+ CSeq: 1 INVITE
+ Contact: sip:sipp@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Content-Type: application/sdp
+ Content-Length: [len]
+
+ v=0
+ o=- 42 42 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 [pt]
+ a=rtpmap:[pt] [codec]
+ a=recvonly
+ ]]>
+ </send>
+
+ <recv response="100" optional="true">
+ </recv>
+
+ <recv response="180" optional="true">
+ </recv>
+
+ <recv response="183" optional="true">
+ </recv>
+
+ <recv response="200" rtd="true">
+ </recv>
+
+ <send>
+ <![CDATA[
+ ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: "[codec]" <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
+ To: [service] <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
+ Call-ID: [call_id]
+ CSeq: 1 ACK
+ Contact: sip:sipp@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Content-Length: 0
+ ]]>
+ </send>
+
+ <!-- wait for callee to hang up -->
+ <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>
+</scenario>