/config/voipmonitor.conf

https://github.com/rgagnon24/sniffer · Config · 663 lines · 519 code · 144 blank · 0 comment · 0 complexity · 4604d3619840d99eac57982e532426f2 MD5 · raw file

  1. #
  2. # voipmonitor.org configuration file
  3. #
  4. # location of this file is at ~/.voipmonitor.conf or /etc/voipmonitor.conf
  5. # command line parameters overrides configuration directives in this file
  6. # allowed comments are ; or #.
  7. #
  8. # voipmonitor automatically reads all configuration files in /etc/voipmonitor/conf.d/* which must NOT have [general] section in it
  9. #
  10. [general]
  11. # in case of running more voipmonitor instances on the same or another servers configured to save to one database and the same cdr table
  12. # it is possible to differentiate CDR by id_sensor column. If you set id_sensor >= 0 the number will be saved in cdr.id_sensor column.
  13. # The number is between 1 - 65535 (16bit number)
  14. #id_sensor = 1
  15. ################## START DATABASE CONFIGURATION ###############
  16. # SQL driver - mysql is default or odbc (connecting voipmonitor to msssql please refer to README.mssql
  17. sqldriver = mysql
  18. #sqldriver = odbc
  19. #odbcdriver = mssql
  20. #odbsdsn = voipmonitor
  21. #odbcuser = root
  22. #odbcpass =
  23. # mysql server can be IP or hostname
  24. mysqlhost = 127.0.0.1
  25. mysqlport = 3306
  26. mysqlusername = root
  27. mysqlpassword =
  28. # mysql database - will be created automatically if it does not exists
  29. mysqldb = voipmonitor
  30. # use partitioning cdr* tables by day. If you have schema without partitioning, you MUST start with new database. default is = yes
  31. cdr_partition = yes
  32. # mysql table compression (default enabled)
  33. mysqlcompress = yes
  34. # load configuration from database - (from table sensor_conf) by id_sensor (SELECT * FROM sensor_conf WHERE id_sensor = N)
  35. # if you do not set id_sensor and mysqlloadconfig is enabled it will load first row in database with id_sensor IS NULL
  36. # configuration in this file is loaded FIRST then is OVERWRITEN by settings in MySQL!
  37. # if this configuration option is not set default is enabled
  38. mysqlloadconfig = yes
  39. # disable partition creation which runs every 12 hours. If you have multiple sensors storing to one database it is redundant to create partitions by all sensors. Default = no
  40. #disable_partition_operations = yes
  41. # In case you need to create partitions back to 90 days for example use this option. This is useful when you want to migrate data. This will create partitions only if table does not exists
  42. #create_old_partitions = yes | no
  43. #create_old_partitions_from = 90
  44. # if you do not want to save cdr.callend = calldate + duration for some reason (you do not want to upgrade cdr, set it to no). Default is yes
  45. sqlcallend = yes
  46. ######## SQL queues fine tuning
  47. # the sniffer uses stored procedure which is created on the fly with concatenated number of messages to overcome network latency limit
  48. # this queue is by default 400.
  49. # there are several internal sql queues for cdr, message, register, files(cleaning), http, ipaccount.
  50. # specific queues mysqlstore_concat_limit_* overrides the global mysqlstore_concat_limit
  51. #mysqlstore_concat_limit = 400
  52. #mysqlstore_concat_limit_cdr = 400
  53. #mysqlstore_concat_limit_message = 400
  54. #mysqlstore_concat_limit_register = 400
  55. #mysqlstore_limit_queue_register = 1000000
  56. #mysqlstore_concat_limit_http = 400
  57. #mysqlstore_concat_limit_ipacc = 400
  58. # each queue is by default served by one thread and this is not enough for high traffic. If the queue is rising
  59. # even though your mysql server configuration is already set innodb_flush_log_at_trx_commit = 2 you should consider
  60. # to rise number of threads which are automatically created if the queue is > 1000. Take in mind that each thread
  61. # creates new connection to mysql server. If any of queue is < 1000 the thread and mysql connection is released.
  62. # number of threads are limited to number 9 so even you set it >9 it will be set to 9
  63. #mysqlstore_max_threads_cdr = 2
  64. #mysqlstore_max_threads_message = 2
  65. #mysqlstore_max_threads_register = 2
  66. #mysqlstore_max_threads_http = 2
  67. ##### cleaning database #########
  68. # Removes cdr* partitions older then set number of days. If set to 0 it is disabled (default)
  69. #cleandatabase_cdr = 0
  70. #Removes register_state partitions older then set number of days. If set to 0 it is disabled (default)
  71. # cleandatabase_register_failed = 0
  72. # Removes cleandatabase_register_failed partitions older then set number of days. If set to 0 it is disabled (default)
  73. # cleandatabase = 0
  74. # Sets cleandatabase_cdr and cleandatabase_register_state and cleandatabase_register_failed to the same values. Configuration first look at cleandatabase parameter then it looks for other cleandatabase_* parameters.
  75. #cleandatabase = 0
  76. ########### END DATABAE CONFIGURATION #################
  77. # voipmonitor is able to sniff directly on network interface or it can read files.
  78. # listening interface. Can be 'any' which will listen on all interfaces - NOTE that "any" will not put interfaces into promiscuous mode
  79. # and you have to do it with "ifconfig eth0 promisc"
  80. # you can also sniff on multiple interfaces by providing list of them delimited by ',' example: interface = eth0,eth1
  81. #interface = eth0,eth1
  82. #interface = any
  83. interface = eth0
  84. # put interface to promiscuouse mode so it can sniff packets which are not routed directly to us (it will not work if you use interface = any)
  85. promisc = yes
  86. # Pcap filter. If you want to sniff only UDP SIP, put here 'udp'. Warning: If you set protocol to 'udp' pcap discards VLAN packets. Maximum size is 2040 chars
  87. # udp or (vlan and udp) will capture all tagged and untagged UDP packets
  88. # WARNING - if you need to sniff IPinIP (like mirrored packets from voipmonitor) filter = udp will filter all those packets. In this case just disable filter.
  89. #filter = udp or (vlan and udp)
  90. # default threading_mod = 1 uses one thread for reading from interface doing deduplication at once
  91. # threading_mod = 2 (which is automatically set if you have multiple interfaces (interface = eth0,eth1,...) reads from each interface
  92. # in separate thread which is better option on multi core systems than interface = any
  93. # threading_mod = 3 will do deduplication (if enabled) in separate thread which is needed for high traffic
  94. # threading_mod = 4 will do deduplication in more than one threads - use this option if you enable deduplication and your traffic is over 100Mbit
  95. #threading_mod = 1
  96. # since version 8 sniffer implements new mirroring option. Sender is packing data to compressed stream over the
  97. # TCP to remote sniffer.
  98. # if you are going to use this sniffer only as a mirroring sniffer all you need is to set interface, packetbuffer_*
  99. # set compression on and set packetbuffer_file_* so in case the connection to remote sniffer will die or will be
  100. # temporarily slow the sender will not loose single packet. The mirroring is trying to reconnect in case of
  101. # failure. Packets are mirrored including the the original timestamp and headers.
  102. # this mirroring hopefully replaces pcapscandir feature which will be probably removed in favor of this approach.
  103. # here set the sending (mirroring). The sender needs to set only interface, ringbuffer, packetbuffer_*, filter
  104. # and this two folling mirror_destination_*
  105. #mirror_destination_ip =
  106. #mirror_destination_port =
  107. # here set the receiver and do not forget to set firewall so no other except the sender will be able to connect
  108. # to the receiver
  109. #mirror_bind_ip =
  110. #mirror_bind_port =
  111. # scan pcap files folder and read file by file. This is in conjuction with running tcpdump which creates pcap file each
  112. # 5 seconds (-G 5) storing pcap files named by UNIX_TIMESTAMP to /dev/shm/voipmonitor folder (do not forget create it)
  113. # using 1GB ring buffer to avoid losing packets (-B500000 - you can lower it but not higher) filtering udp packets (udp
  114. # parameter whcih you can change to your needs). voipmonitor then reads created files (and delete it after processing.
  115. # This approach can be used for testing throughput or for very high voip traffic (>500Mbit). If the sniffer is able to
  116. # process pcap files in realtime - there will be in /dev/shm/voipmonitor folder only one or two pcap files. If the sniffer
  117. # is not able to process in realtime (blocking by I/O or by CPU) number of pcap files will grow faster then the sniffer
  118. # is able process.
  119. #
  120. # WARNING: libpcap < 1.1 contains memory leak when pcap filter is set - do not set filter in this config or upgrade libpcap to the latest (debian 6 libpcap contains the leak)
  121. # static compiled voipmonitor from voipmonitor.org contains the latest libpcap
  122. #
  123. # tcpdump example command:
  124. # nice -n -20 tcpdump -B500000 -i eth2 udp -G 5 -w /dev/shm/voipmonitor 2>/dev/null 1>/dev/null &
  125. #scanpcapdir = /dev/shm/voipmonitor
  126. # When scanpcapdir is being used, voipmonitor will by default read any new file
  127. # that is created in that directory as soon as the file is closed. This is
  128. # the normal setting if your packet capture software is tcpdump. If you are
  129. # using a different packet capture software, you may need to change this
  130. # setting to "rename" if that software writes to a temporary file, closes it,
  131. # and then renames it to something else after the file is closed.
  132. #
  133. # Default setting is "newfile"
  134. #scanpcapmethod = newfile
  135. # in case the SIP(media) server is behind public IP (1.1.1.1) NATed to private IP (10.0.0.3) to sniff all traffic correctly you can
  136. # specify alias for this case. You can specify more netaliases duplicating rows.
  137. # in most cases this is not necessary because voipmonitor is able to track both RTP streams based on the other side IP. But
  138. # if the stream is incoming from another IP then SIP source signalization and also from another IP than the SIP device which is
  139. # also behind NAT its impossible to track the correct IP. Please note that this is for case where the SIP server is behind NAT
  140. # and also the client is behind NAT. If your SIP server has public IP do not bother with this.
  141. #natalias = 1.1.1.1 10.0.0.3
  142. #natalias = 1.1.1.2 10.0.0.3
  143. #natalias = 1.1.1.3 10.0.0.4
  144. # NAT helper:
  145. # if voip SIP device (with source IP 1.1.1.1) sends in SDP that it wants RTP for example to 10.0.0.1 and port
  146. # 10000 the call also sniff RTP from 1.1.1.1:10000 or to 1.1.1.1:10000 which does more problems than it solves.
  147. # Now this behaviour is changed and if you need this option back you can enable it
  148. # default no
  149. #sdp_reverse_ipport = yes
  150. # define bind address for manager interface. Default is 127.0.0.1
  151. # it is not recommended to change this unless really needed due to
  152. # security. If you need it on some other IP make sure you set firewall
  153. # and change the standard port for better security
  154. #managerip = 127.0.0.1
  155. # classify number without leading 00 or + to country according to local_country_code configuration option which is in ISO 3166-1 alpha-2
  156. # format http://cs.wikipedia.org/wiki/ISO_3166-1. Default is local
  157. #local_country_code = local
  158. #local_country_code = US
  159. # define TCP manager port
  160. managerport = 5029
  161. # connects to server and listen for commands
  162. #managerclient = serverip or hostname
  163. #managerclientport = 1234
  164. # define SIP ports wihch will voipmonitor liste. For each port make new line with sipport = port (multiple lines)
  165. sipport = 5060
  166. #sipport = 5061
  167. #sipport = 5062
  168. # enable storing sip source and destination port to database so the port from INVITE can be searched
  169. cdr_sipport = yes
  170. # enable storing RTP destination port to database
  171. cdr_rtpport = yes
  172. # If remotepartyid set to yes the SIP Remote-Party-ID is taken into account when storing caller/called number into the database.
  173. # If callerid is anonymous and Remote-Party-ID is present the number is always taken from Remote-Party-ID if present regardless on the remotepartyid option.
  174. #remotepartyid = no
  175. # take number from INVITE URI or To: SIP header. If destination_number_mode = 1 It will always save number from To: header.
  176. # if destination_number_mode = 2 it will take number from INVITE URI.
  177. # default: destination_number_mode = 1
  178. #destination_number_mode = 1
  179. # end call after N seconds (default is 4 hours = 4 * 3600). This prevents creating giant pcap files and memory growing for
  180. # calls where RTP stream stucked indefinitely .
  181. # if call is ended due to this itmeout in the cdr.bye will be number 102
  182. absolute_timeout = 14400
  183. # end call after N seconds (default is 20 minutes = 20 * 60) after receiving SIP BYE message no matter how many RTP packets
  184. # arrives after SIP BYE.
  185. destroy_call_at_bye = 1200
  186. # onewaytimeout ends sip call after set seconds which does not receive any reply from the other side.
  187. # technically it takes sip source ip address from first invite/register and if there is no other sip source ip different
  188. # from the first source ip the call will be terminated after onowaytimeout seconds.
  189. # if a call is terminated due to this timeout in cdr.bye column will be 101.
  190. # purpose of this timeout is to release memory as soon as possible in case there is some flood INVITE which does not
  191. # have any reply. Another reason is when mirroring is set incorrectly and the sniffer sees only one side of a SIP
  192. # signalization.
  193. # if onowaytimeout is not set default is 15.
  194. onewaytimeout = 15
  195. # sipwithoutrtptimout is used when the SIP call does not have any asoociated RTP to prevent zombie sip calls like
  196. # when BYE or CANCEL is missing so the call has to timeout at some point. Default value is 1 hour (3600 seconds)
  197. # if you have longer calls in your network you need to increase this value. Previosly rtptimeout parameter was
  198. # used.
  199. #sipwithoutrtptimout = 3600
  200. # rtptimeout will close call only if the call register any RTP packet and there is no SIP or RTP/RTCP packet activity
  201. # within the rtptimeout. (if the call has no RTP packet this timeout is not applied, lok for sipwithoutrtptimeout).
  202. # the rtptimeout is to prevent zombie calls in voipmonitor memory. Recommended value is 5 minutes (300 seconds).
  203. #rtptimeout = 300
  204. # ringbuffer is circular memory queue directly in kernel memory space. libpcap is reading from this queue and
  205. # delivers packets to voipmonitor. If the network rate is > 100 Mbit we recommend to set ringbuffer to at least 500
  206. # maximum value is 2000 MB.
  207. # default 50 MB
  208. ringbuffer = 50
  209. # packet buffer is new voipmonitor buffering architecture (since version 8). If enabled new threads are created
  210. # which raads packets from kernel ringbuffer and queues them into dynamically allocated memory. Packets are
  211. # dequeued and passed to next threads which reads the content. This will ensure that kernel ringbuffer will
  212. # not overrun due to CPU or disk I/O spikes.
  213. # packet buffer will dynamically grow until packetbuffer_total_maxheap is reached. Compression can be enabled
  214. # (packetbuffer_compress) which compress the buffer with fast snappy algorythm with 50% compression ratio thus
  215. # doubling the time when the buffer gets filled (600Mbit traffic consumes ~30% one one core Xeon E5-2620).
  216. # It is also possible to use disk buffer if the packet buffer memory is filled by enabling
  217. # packetbuffer_file_totalmaxsize which is usefull when sniffer is only mirroring data over TCP to another
  218. # sniffer - if the connection brakes or slowed down and packet buffer gets filled it will start using file
  219. # buffer until the connection reestablishes so no single packet is lost. Enabling file buffer in non mirroring
  220. # mode to the same disk as spooldir will get not much benefit because if the process is blocked mainly due to
  221. # disk I/O it has no benefit to add more I/O by caching unprocessed packets to the same I/O layer.
  222. packetbuffer_enable = yes
  223. packetbuffer_total_maxheap = 2000 #in MB
  224. packetbuffer_compress = yes #enable compression
  225. packetbuffer_file_totalmaxsize = 0 #MB. Default is disabled.
  226. packetbuffer_file_path = /var/spool/voipmonitor/packetbuffer
  227. # number of threads to process RTP packets. If not specified it will be number of available CPUs.
  228. # If equal to zero RTP threading is turned off.
  229. # For < 150 concurrent calls you can turn it off"
  230. #default = 0
  231. #rtpthreads = 0
  232. # jitter buffer simulator variants. By default voipmonitor uses three types of jitterbuffer simulator to compute MOS score.
  233. # First variant is saved into cdr.[ab]_f1 and represents MOS score for devices which has only fixed 50ms jitterbuffer.
  234. # Second variant is same as first but for fixed 200ms and is saved to cdr.[ab]_f2
  235. # Third varinat is adaptive jitterbuffer simulator up to 500ms
  236. # Jitterbuffer simulator is the most CPU intensive task which is voipmonitor doing. If you are hitting CPU 100% turn
  237. # off some of the jitterbuffer simulator. I'm recomending to use only fixed 200ms if you need to save some CPU cycles.
  238. #jitterbuffer_f1 = no
  239. #jitterbuffer_f2 = yes
  240. #jitterbuffer_adapt = no
  241. # Packet loss concealment (PLC) is a technique to mask the effects of packet loss in VoIP communications.
  242. # Because the voice signal is sent as packets on a VoIP network, they may travel different routes to get to destination.
  243. # At the receiver a packet might arrive very late, corrupted or simply might not arrive.
  244. # One of the cases in which the last situation could happen is where a packet is rejected by a server which has a full buffer
  245. # and cannot accept any more data.
  246. # default no.
  247. #plcdisable = no
  248. # callslimit will limit maximum numbers of calls processed by voipmonitor at the same time. If calls are over limit
  249. # it will be ignored (INVITE)
  250. #callslimit = 0
  251. # in case SIP session travels accross several proxies (and Call-ID header DOES not change) and you would like to track
  252. # all sip proxies and make them searchable in GUI / database. If disabled cdr will store to destination sip
  253. # column destination IP from the first INVITE. If enabled there will be destination IP from the latest invite and all
  254. # proxy ip will be stored in cdr_proxy table.
  255. # default enabled
  256. cdrproxy = yes
  257. # this option allows to skip storing cdr.a_ua and cdr.b_ua - this is workaround for those who has extreme cdr rate and
  258. # number of user agents in database is over 1000 and CPU is not powerfull enough to store cdr in real time. In future
  259. # this option will be removed once we optimize this rutine.
  260. #cdr_ua_enable = yes
  261. # this is important option if voipmonitor is sniffing on SIP proxy and see both RTP leg of CALL.
  262. # in that case use this option. It will analyze RTP only for the first LEG and not each 4 RTP
  263. # streams which will confuse voipmonitor. Drawback of this switch is that voipmonitor will analyze
  264. # SDP only for SIP packets which have the same IP and port of the first INVITE source IP
  265. # and port. It means it will not work in case where phone sends INVITE from a.b.c.d:1024 and
  266. # SIP proxy replies to a.b.c.d:5060. If you have better idea how to solve this problem better
  267. # please contact support@voipmonitor.org
  268. rtp-firstleg = no
  269. # SSRC in RTP headers must not equal zero according to RFC so voipmonitor is ignoring such RTP by default.
  270. # If you still need to parse such packets enable it
  271. # default = no
  272. #allow-zerossrc = yes
  273. # duplicate check do md5 sum for each packet and if md5 is same as previous packet it will discard it
  274. # WARNING: md5 is expensive function (slows voipmonitor 3 times) so use it only if you have enough CPU or
  275. # for pcap conversion only . Default is no.
  276. #deduplicate = yes
  277. # prior verison 8.0.1 deduplicate was comparing only data without ip header and udp header so duplicate packets
  278. # was matched also in case the IP addresses differes. This was good for some cases but it leads to completely
  279. # ignore RTP streams in other cases. Now default option is to check duplicates based on not only data but ip headers
  280. # too. To change this set deduplicate_ipheader = no
  281. # default = yes
  282. #deduplicate_ipheader = yes
  283. # enable/disable updating called number from To: header from each caller INVITE. Default is enabled so it supports overlap dialing (RFC 3578)
  284. # if you want to disable this behaviour and see always number only from the first INVITE set sipoverlap = no
  285. #sipoverlap = yes
  286. # save sip REGISTER messages
  287. sip-register = no
  288. # wait only N seconds for reply on first register then remove from memory. (default is 5 seconds)
  289. sip-register-timeout = 5
  290. # if mysql binlog is enabled, skip binlog inserts into active table (which is MEMORY type)
  291. # if you still want to replicate this too (huge I/O impact) set it to = no
  292. sip-register-active-nologbin = yes
  293. # if yes, voipmonitor will not save CDR to MySQL
  294. nocdr = no
  295. # if yes, all SIP calls will be ignored unless capture rules set skip flag based on IP or Tel. numbers (mysql.filter_*)
  296. #skipdefault = yes
  297. # write CDR to database only if call was answered
  298. # default = no
  299. #cdronlyanswered = yes
  300. # when storing CDR check if there is the same CDR with the same sip.Call-ID and replace it if the new one contains RTP and the old one not
  301. # this option is intended for case where you need to mirror SIP signalling to RTP media nodes and every RTP voipmonitor node sends CDR based
  302. # on the same SIP thus diplicating CDR and only one CDR have RTP associated.
  303. # default is off
  304. #cdr_check_exists_callid = yes
  305. # write CDR to database only if call has RTP
  306. # default = no
  307. #cdronlyrtp = yes
  308. ###############################################################################
  309. # cisco skinny protocol (SCCP) #
  310. ###############################################################################
  311. # disabled by default (TCP port 2000)
  312. #skinny = no
  313. # some cisco call manager is configured to receive call always on the same UDP port which results in one-way recordings or mixed recordings. In this case
  314. # set this option to IP address of the cisco call manager. This also assumes that cisco phones uses the same UPD port for receiving and sending RTP
  315. # (symmetric RTP)
  316. #skinny_ignore_rtpip = 10.1.1.1
  317. ###############################################################################
  318. # storing packets into pcap files #
  319. ###############################################################################
  320. # limit pcap file size (in MB)
  321. # default disabled.
  322. #maxpcapsize = 500
  323. # directory where all files (pcap|wav|graph) are stored
  324. spooldir = /var/spool/voipmonitor
  325. # pcap_dump_bufflength uses buffer in bytes for every open file. It helps to prevent randowm write for each SIP / RTP packet.
  326. # Optimal and default value are 8184 Bytes.
  327. pcap_dump_bufflength = 8184
  328. # compress all pcap files on the fly. This is new method (since >=9.4) which compresses data before any write is done to disk greatly reducing
  329. # I/O writes.
  330. pcap_dump_zip = yes
  331. # number of threads used for compressing. Default is 1. Number of threads automatically grows once threads consumes >95% CPU
  332. pcap_dump_writethreads = 1
  333. # number of threads are limited by MIN(number of available CPU, pcap_dump_writethreads_max, 32)
  334. pcap_dump_writethreads_max = 32
  335. # pcap_dump_asyncwrite copy packets before it gets writen into queue which are asynchronously written to files. This prevents
  336. # packets to be dropped due to I/O blocks until all async buffer RAM is consumed which is by default 100MB - increase this to
  337. # bigger value if you have enough ram (1000 or 2000 etc.)
  338. pcap_dump_asyncwrite = yes
  339. pcap_dump_asyncwrite_maxsize = 100
  340. # pcap_dump_ziplevel - default is Z_DEFAULT_COMPRESSION which is in fact number 6. 9 is highest compression but slowest, 1 is the fastest compression
  341. # but produces bigger files.
  342. #pcap_dump_ziplevel = 9
  343. # store pcap and graph file to <cache/dir> and move it after call ends to spool directory. Moving all files are guaranteed to be serialized which
  344. # helps with slow random write I/O on spin or other media. Typical cache directory is /dev/shm/voipmonitor which is in RAM or /mnt/ssd/voipmonitor
  345. # which is mounted to SSD disk or some very fast SAS/SATA disk where spool can be network storage or raid5 etc.
  346. #cachedir = /dev/shm/voipmonitor
  347. # openfile_max overrides default max open files which is 65535
  348. #openfile_max = 300000
  349. # list characters that should be converted to underscore (_) in filenames
  350. # if you want to include space, put it between other characters, like ': :' (will convert ':' and ' ' to '_')
  351. # default is none
  352. #
  353. # example - avoid ':' when Call-Id contains port number
  354. #convertchar = :
  355. # save SIP packets to pcap file
  356. savesip = yes
  357. # save RTP packets to pcap file. savertp = yes automatically saves RTCP packets
  358. # you can also save only RTP header without AUDIO: savertp = header
  359. # if save RTP is aneblad it will also save UDPTL packets (used for T.38)
  360. # you can also set savertp = no and control what calls will record RTP in mysql table filter_ip or filter_tel
  361. # which is controled in GUI -> Capture rules. Sending reload command will reload configuration from filter_*
  362. # table. You can also set savertp = yes but denies recording RTP based on rules in filter_* table.
  363. savertp = yes
  364. #savertp = header
  365. # voipmonitor by default splits SIP and RTP packets to individual files (in case spooldiroldschema = no) which are
  366. # located in SIP and RTP directories. This feature allows instance cleaning RTP streams differently then SIP packets
  367. # to join two pcap files SIP+RTP use mergecap command line utility which is included in wireshark package
  368. # default = yes | spooldiroldschema must be set to no
  369. #pcapsplit = yes
  370. # save UDPTL packets (T.38). If savertp = yes the UDPTL packets are saved automatically. If savertp = no and you want
  371. # to save only udptl packets enable saveudptl = yes and savertp = no
  372. #saveudptl = yes
  373. # save RTCP packets to pcap file
  374. savertcp = yes
  375. # save RTP payload to audio file. Choose 'wav' for WAV PCM or 'ogg' for OGG 25kbps format.
  376. # please note that this has great impact on I/O and can overload your storage leading to lose packets. Better way is to store only sip+rtp and
  377. # convert wav files on demand.
  378. #saveaudio = wav
  379. # save caller in left channel and called in right channel. Default enabled. If disabled caller and called are mixed into mono.
  380. saveaudio_stereo = yes
  381. # by default wav file is stereo where left channel is caller and right channel is called. if you want to swap left right enable saveaudio_reversestereo
  382. # default is no
  383. #saveaudio_reversestereo = no
  384. # ogg quality - from -0.1 to 1.0 (low to best) - this affect size of the OGG
  385. ogg_quality = 0.4
  386. # default path to WEB GUI used to construct path to key check for codecs
  387. # default paths:
  388. #keycheck = /var/www/voipmonitor/php/keycheck.php
  389. #keycheck = /var/www/html/voipmonitor/php/keycheck.php
  390. # in case you are not saving RTP at all but you still want to save DTMF carried over RTP packets (RFC2833)
  391. # you can enable this option. This feature slows down a bit processing RTP packets in main read thread
  392. # in casse voipmonitor runs in threads.
  393. # default = 0
  394. #saverfc2833 = 0
  395. # Enable storing DTMF (SIP INFO or RFC2833) to cdr_dtmf database. It will store DTMF time and key
  396. # then it will be shown in SIP history in the GUI
  397. # default is 0
  398. #dtmf2db = 0
  399. # save graph data for web GUI.
  400. savegraph = yes
  401. # if any of SIP message during the call contains header X-VoipMonitor-norecord call will be not converted to wav and pcap file will be deleted.
  402. #norecord-header = yes
  403. # if any of SIP message during the call contains DTMF INFO sequence "*0" call will be not converted to wav and pcap file will be deleted.
  404. # default: disabled
  405. #norecord-dtmf = yes
  406. # enable pausing RTP/WAV recording if DTMF sequence detected.
  407. # default: disabled
  408. #pauserecordingdtmf = *9
  409. # in case you need to have ethernet encapsulation and you are sniffing on interface = any set this to = yes.
  410. # this is needed only in case you need to merge pcap files with different encapsulations. default is no
  411. # convert_dlt_sll2en10 = no
  412. # dump all packets to /tmp/voipmonitor-[UNIX_TIMESTAMP].pcap
  413. #dumpallpackets = yes
  414. # new spooldir schema stores all files to year-mon-day/hour/minute/[ALL|SIP|RTP|AUDIO] directories
  415. # if you need to have the old schema year-mon-day/* enable spooldiroldschema = yes.
  416. # default = no
  417. #spooldiroldschema = no
  418. ########### cleaning spool directory ####################
  419. # since version 8 sniffer uses different cleaning mechanism which was developed to minimize I/O operations and it also finally brings more features
  420. # each created file is indexed in SPOOLDIR/filesindex/ in hours interval and the file size is added to aggregation mysql table files. Cleaning
  421. # procedure iterates through index files and unlink files without need to scan directories.
  422. # cleaning procedure runs every hour and checks size or days according to following options. Rules are executed in this
  423. # order. If you set maxpoolsize it will wipe out the oldest data every hour until the size is reached. maxpooldays keeps
  424. # maximum number of data to set days. The same is for sip rtp and graph so you can keep sip pcaps longer than rtp pcaps.
  425. # all options can be activated at once
  426. # cleaning files can cause huge performance I/O drop during your peaks and in this case it is recommended to set cleaning outside your peaks
  427. # following example will run cleaning only between 1am - 5am (it is 24hour format)
  428. #cleanspool_enable_fromto = 1-5
  429. # it is good to always have maxpoolsize = N where the N is maximum disk space you are willing to use by sniffer
  430. # all size are in MB
  431. #set default maxpoolsize to 100 GB (102400 MB)
  432. maxpoolsize = 102400
  433. #maxpooldays = 30
  434. #maxpoolsipsize =
  435. #maxpoolsipdays =
  436. #maxpoolrtpsize =
  437. #maxpoolrtpdays =
  438. #maxpoolgraphsize =
  439. #maxpoolgraphdays =
  440. # clean files which are not indexed
  441. # default is no
  442. #maxpool_clean_obsolete = yes
  443. #
  444. # in case the space is below 1% and below 5GB (which is default threshold) reindexfiles procedure will be executed and cleaning will be restarted.
  445. # in case this will not help the new maxpoolsize will be set to size of current spool directory and will keep free space MIN(1% freespace, 5GB)
  446. # default is autoclean enabled, 1% free space or 5GB free space
  447. #
  448. autocleanspool = yes
  449. autocleanspoolminpercent = 1
  450. autocleanmingb = 5
  451. #usefull command to clean all RTP files older 7 days - this is not configuration option.
  452. # find /var/spool/voipmonitor -maxdepth 1 -type d -mtime +7 -name '20*' | (while read d; do rm -rf $d/*/*/RTP; done)
  453. ########### end storing packets into pcap files ###############
  454. # enable MOS score for G.729 codec. If enabled, all cdr with 0 packet loss and stable delays will have maximum MOS of 3.92
  455. # and for loss and unstable delay MOS will be calculated according to ITU-T objective PESQ method for G.729 codec.
  456. # if you want to use MOS as good search value which corellates loss and delay into single value leave it disabled (which is
  457. # by default). If set to no, all calls will be calculated like it is G.711.
  458. mos_g729 = no
  459. # ITU-T P.862 PESQ
  460. mos_lqo = no
  461. mos_lqo_bin = pesq
  462. mos_lqo_ref = /usr/local/share/voipmonitor/audio/mos_lqe_original.wav
  463. mos_lqo_ref16 = /usr/local/share/voipmonitor/audio/mos_lqe_original_16khz.wav
  464. # enable saving dscp to cdr.dscp which is 32bit number. The first 8 bits are dscp (6bits) from SIP packets from caller. Next 8 bits
  465. # are from SIP packets from called. Next 8 bits are from caller RTP and last 8 bits are from called RTP. If you enable this
  466. # feature it will auto upgrade cdr table which can take long time depending on ammount of CDR in tables and I/O speed.
  467. # default is disabled
  468. dscp = yes
  469. # if you want to update destination number when callee answer for case where multiple phones (hunt group) are called within the same
  470. # SIP Call-ID enable this option which matches it based on 200 OK and SIP branch.
  471. #update_dstnum_onanswer = no
  472. # enable storing custom sip headers to database column cdr_next.custom_header_headername. You can specify more headers
  473. # delimited by ";". WARNING - when you enable this feature voipmonitor will autoupgrade cdr_next table which can take
  474. # hours depending on how large the table is. In GUI there is new section Settings#Custom_headers.
  475. # WARNING - when you enable this feature voipmonitor will autoupgrade cdr_next table which can take hours depending on how large the table is
  476. # INFO: in GUI there is new section in Settings - http://www.voipmonitor.org/doc/Settings#Custom_headers
  477. #custom_headers = X-asterisk-Info ; X-myheader
  478. # analogical for SIP message is custom_headers_message
  479. #custom_headers_message = X-asterisk-Info ; X-myheader
  480. # by default custom header is overwritten by last occurrence. if you need to keep the first occurence set this to no:
  481. #custom_headers_last_value = yes
  482. # enable saving content of custom header (typicaly in-reply-to) to cdr_next.match_header
  483. # this header is used in related CDR GUI for matching legs to onen call
  484. #matchheader = in-reply-to
  485. # enable merging calls based on matching call-id. The idea is that the second leg with different call-id has in the first INVITE
  486. # special header which has the call-id of the parent SIP call. The configuration option specifies name of that header
  487. # if you want to not expose this header you can encrypt it with secret (XOR) and encode with base64encode. If callidmerge_secret
  488. # is specified the header will be decoded with base64decode and XORed with this secret string
  489. #callidmerge_header = Parent-Call-ID
  490. #callidmerge_secret = yourSecretString
  491. # save also port in domain user@domain:port default is to only save domain without port
  492. # default is = no
  493. #domainport = yes
  494. # pcapcommand will run command after pcap file is closed (after call ends). %pcap% is substitution for real pcap file name.
  495. # execution is guaranteed to run in serialized way.
  496. # WARNING - pcapcommand is implemented by forking program which is very expensive and is causing TLB shootouts on multicore
  497. # system which can generate 500 000 interrupts / sec causing system to drop packets. Watch the performance carefuly
  498. # (with "vmstat 1" column "in").
  499. #
  500. #pcapcommand = echo %pcap% >> /tmp/list
  501. # filtercommand will run command after each call which matches script == 1 in filter_ip or filter_telnum (capture rules in GUI)
  502. # WARNING - filtercommand is implemented by forking program which is very expensive and is causing TLB shootouts on multicore system which can generate 500 000 interrupts / sec
  503. # causing system to drop packets. Watch the performance carefuly (with "vmstat 1" column "in").
  504. #
  505. # all non alphanum characters except '/' '#' ' ' '+' ':' '-' '.' and '@' in callid, dirname, caller, called and calldate are substituted to '_'
  506. #
  507. #filtercommand = myscript '%callid%' '%dirname%' '%caller%' '%called%' '%calldate%'
  508. # if enabled CDRID:num will be printed to stdout on every CDR insert
  509. #printinsertid = yes
  510. # enable monitoring IP traffic
  511. #ipaccount = no
  512. #ipaccountport = 22
  513. #ipaccountport = 80
  514. #ipaccountport = 443
  515. # if https failes when upgrading the sniffer try also http
  516. #upgrade_try_http_if_https_fail = yes
  517. # set http proxy in case you want to use upgrades initiated from the GUI
  518. # curlproxy = http://192.168.0.1:8080
  519. #-rpbsN:{file} for read packet in real speed (Read via Packet Buffer with speed N; N >= 1; 1 for real speed, 2 for speed x2 ...)