README 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718
  1. rtpengine Module
  2. Maxim Sobolev
  3. Sippy Software, Inc.
  4. Juha Heinanen
  5. TuTPro, Inc.
  6. Edited by
  7. Maxim Sobolev
  8. Edited by
  9. Bogdan-Andrei Iancu
  10. Edited by
  11. Juha Heinanen
  12. Edited by
  13. Sas Ovidiu
  14. Edited by
  15. Carsten Bock
  16. ng-voice GmbH
  17. Edited by
  18. Richard Fuchs
  19. Sipwise GmbH
  20. Copyright (c) 2003-2008 Sippy Software, Inc.
  21. Copyright (c) 2005 Voice Sistem SRL
  22. Copyright (c) 2009-2014 TuTPro Inc.
  23. Copyright (c) 2010 VoIPEmbedded Inc.
  24. Copyright (c) 2013-2014 Sipwise GmbH
  25. __________________________________________________________________
  26. Table of Contents
  27. 1. Admin Guide
  28. 1. Overview
  29. 2. Multiple RTP proxy usage
  30. 3. Dependencies
  31. 3.1. Kamailio Modules
  32. 3.2. External Libraries or Applications
  33. 4. Parameters
  34. 4.1. rtpengine_sock (string)
  35. 4.2. rtpengine_disable_tout (integer)
  36. 4.3. rtpengine_tout (integer)
  37. 4.4. rtpengine_retr (integer)
  38. 4.5. extra_id_pv (string)
  39. 4.6. setid_avp (string)
  40. 5. Functions
  41. 5.1. set_rtpengine_set(setid[, setid])
  42. 5.2. rtpengine_offer([flags])
  43. 5.3. rtpengine_answer([flags])
  44. 5.4. rtpengine_delete([flags])
  45. 5.5. rtpengine_manage([flags])
  46. 5.6. start_recording()
  47. 6. Exported Pseudo Variables
  48. 6.1. $rtpstat
  49. 7. MI Commands
  50. 7.1. nh_enable_rtpp
  51. 7.2. nh_show_rtpp
  52. 2. Frequently Asked Questions
  53. List of Examples
  54. 1.1. Set rtpengine_sock parameter
  55. 1.2. Set rtpengine_disable_tout parameter
  56. 1.3. Set rtpengine_tout parameter
  57. 1.4. Set rtpengine_retr parameter
  58. 1.5. Set extra_id_pv parameter
  59. 1.6. Set setid_avp parameter
  60. 1.7. set_rtpengine_set usage
  61. 1.8. rtpengine_offer usage
  62. 1.9. rtpengine_answer usage
  63. 1.10. rtpengine_delete usage
  64. 1.11. rtpengine_manage usage
  65. 1.12. start_recording usage
  66. 1.13. $rtpstat Usage
  67. 1.14. nh_enable_rtpp usage
  68. 1.15. nh_show_rtpp usage
  69. Chapter 1. Admin Guide
  70. Table of Contents
  71. 1. Overview
  72. 2. Multiple RTP proxy usage
  73. 3. Dependencies
  74. 3.1. Kamailio Modules
  75. 3.2. External Libraries or Applications
  76. 4. Parameters
  77. 4.1. rtpengine_sock (string)
  78. 4.2. rtpengine_disable_tout (integer)
  79. 4.3. rtpengine_tout (integer)
  80. 4.4. rtpengine_retr (integer)
  81. 4.5. extra_id_pv (string)
  82. 4.6. setid_avp (string)
  83. 5. Functions
  84. 5.1. set_rtpengine_set(setid[, setid])
  85. 5.2. rtpengine_offer([flags])
  86. 5.3. rtpengine_answer([flags])
  87. 5.4. rtpengine_delete([flags])
  88. 5.5. rtpengine_manage([flags])
  89. 5.6. start_recording()
  90. 6. Exported Pseudo Variables
  91. 6.1. $rtpstat
  92. 7. MI Commands
  93. 7.1. nh_enable_rtpp
  94. 7.2. nh_show_rtpp
  95. 1. Overview
  96. This is a module that enables media streams to be proxied via an RTP
  97. proxy. The only RTP proxy currently known to work with this module is
  98. the Sipwise rtpengine https://github.com/sipwise/rtpengine. The
  99. rtpengine module is a modified version of the original rtpproxy module
  100. using a new control protocol. The module is designed to be a drop-in
  101. replacement for the old module from a configuration file point of view,
  102. however due to the incompatible control protocol, it only works with
  103. RTP proxies which specifically support it.
  104. 2. Multiple RTP proxy usage
  105. The rtpengine module can support multiple RTP proxies for
  106. balancing/distribution and control/selection purposes.
  107. The module allows definition of several sets of rtpproxies.
  108. Load-balancing will be performed over a set and the admin has the
  109. ability to choose what set should be used. The set is selected via its
  110. id - the id being defined with the set. Refer to the "rtpengine_sock"
  111. module parameter definition for syntax description.
  112. The balancing inside a set is done automatically by the module based on
  113. the weight of each RTP proxy from the set.
  114. The selection of the set is done from script prior using
  115. rtpengine_delete(), rtpengine_offer() or rtpengine_answer() functions -
  116. see the set_rtpengine_set() function.
  117. Another way to select the set is to define setid_avp module parameter
  118. and assign setid to the defined avp before calling rtpengine_offer() or
  119. rtpengine_manage() function. If forwarding of the requests fails and
  120. there is another branch to try, remember to unset the avp after calling
  121. rtpengine_delete() function.
  122. For backward compatibility reasons, a set with no id take by default
  123. the id 0. Also if no set is explicitly set before rtpengine_delete(),
  124. rtpengine_offer() or rtpengine_answer() the 0 id set will be used.
  125. IMPORTANT: if you use multiple sets, take care and use the same set for
  126. both rtpengine_offer()/rtpengine_answer() and rtpengine_delete()!! If
  127. the set was selected using setid_avp, the avp needs to be set only once
  128. before rtpengine_offer() or rtpengine_manage() call.
  129. 3. Dependencies
  130. 3.1. Kamailio Modules
  131. 3.2. External Libraries or Applications
  132. 3.1. Kamailio Modules
  133. The following modules must be loaded before this module:
  134. * tm module - (optional) if you want to have rtpengine_manage() fully
  135. functional
  136. 3.2. External Libraries or Applications
  137. The following libraries or applications must be installed before
  138. running Kamailio with this module loaded:
  139. * None.
  140. 4. Parameters
  141. 4.1. rtpengine_sock (string)
  142. 4.2. rtpengine_disable_tout (integer)
  143. 4.3. rtpengine_tout (integer)
  144. 4.4. rtpengine_retr (integer)
  145. 4.5. extra_id_pv (string)
  146. 4.6. setid_avp (string)
  147. 4.1. rtpengine_sock (string)
  148. Definition of socket(s) used to connect to (a set) RTP proxy. It may
  149. specify a UNIX socket or an IPv4/IPv6 UDP socket.
  150. Default value is "NONE" (disabled).
  151. Example 1.1. Set rtpengine_sock parameter
  152. ...
  153. # single rtproxy
  154. modparam("rtpengine", "rtpengine_sock", "udp:localhost:12221")
  155. # multiple rtproxies for LB
  156. modparam("rtpengine", "rtpengine_sock",
  157. "udp:localhost:12221 udp:localhost:12222")
  158. # multiple sets of multiple rtproxies
  159. modparam("rtpengine", "rtpengine_sock",
  160. "1 == udp:localhost:12221 udp:localhost:12222")
  161. modparam("rtpengine", "rtpengine_sock",
  162. "2 == udp:localhost:12225")
  163. ...
  164. 4.2. rtpengine_disable_tout (integer)
  165. Once an RTP proxy was found unreachable and marked as disabled, the
  166. rtpengine module will not attempt to establish communication to that
  167. RTP proxy for rtpengine_disable_tout seconds.
  168. Default value is "60".
  169. Example 1.2. Set rtpengine_disable_tout parameter
  170. ...
  171. modparam("rtpengine", "rtpengine_disable_tout", 20)
  172. ...
  173. 4.3. rtpengine_tout (integer)
  174. Timeout value in waiting for reply from RTP proxy.
  175. Default value is "1".
  176. Example 1.3. Set rtpengine_tout parameter
  177. ...
  178. modparam("rtpengine", "rtpengine_tout", 2)
  179. ...
  180. 4.4. rtpengine_retr (integer)
  181. How many times the module should retry to send and receive after
  182. timeout was generated.
  183. Default value is "5".
  184. Example 1.4. Set rtpengine_retr parameter
  185. ...
  186. modparam("rtpengine", "rtpengine_retr", 2)
  187. ...
  188. 4.5. extra_id_pv (string)
  189. The parameter sets the PV defination to use when the "b" parameter is
  190. used on rtpengine_delete(), rtpengine_offer(), rtpengine_answer() or
  191. rtpengine_manage() command.
  192. Default is empty, the "b" parameter may not be used then.
  193. Example 1.5. Set extra_id_pv parameter
  194. ...
  195. modparam("rtpengine", "extra_id_pv", "$avp(extra_id)")
  196. ...
  197. 4.6. setid_avp (string)
  198. The parameter defines an AVP that, if set, determines which RTP proxy
  199. set rtpengine_offer(), rtpengine_answer(), rtpengine_delete(), and
  200. rtpengine_manage() functions use.
  201. There is no default value.
  202. Example 1.6. Set setid_avp parameter
  203. ...
  204. modparam("rtpengine", "setid_avp", "$avp(setid)")
  205. ...
  206. 5. Functions
  207. 5.1. set_rtpengine_set(setid[, setid])
  208. 5.2. rtpengine_offer([flags])
  209. 5.3. rtpengine_answer([flags])
  210. 5.4. rtpengine_delete([flags])
  211. 5.5. rtpengine_manage([flags])
  212. 5.6. start_recording()
  213. 5.1. set_rtpengine_set(setid[, setid])
  214. Sets the ID of the RTP proxy set to be used for the next
  215. rtpengine_delete(), rtpengine_offer(), rtpengine_answer() or
  216. rtpengine_manage() command. The parameter can be an integer or a config
  217. variable holding an integer.
  218. A second set ID can be specified to daisy-chain two RTP proxies. The
  219. two set IDs must be distinct from each other and there must not be any
  220. overlap in the proxies present in both sets. In this use case, the
  221. request (offer, answer, etc) is first sent to an RTP proxy from the
  222. first set, which rewrites the SDP body and sends it back to the module.
  223. The rewritten SDP body is then used to make another request to an RTP
  224. proxy from the second set, which rewrites the SDP body another time and
  225. sends it back to the module to be placed back into the SIP message.
  226. This is useful if you have a set of RTP proxies that the caller must
  227. use, and another distinct set of RTP proxies that the callee must use.
  228. This is supported by all rtpengine commands except rtpengine_manage().
  229. This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
  230. BRANCH_ROUTE.
  231. Example 1.7. set_rtpengine_set usage
  232. ...
  233. set_rtpengine_set("2");
  234. rtpengine_offer();
  235. ...
  236. 5.2. rtpengine_offer([flags])
  237. Rewrites SDP body to ensure that media is passed through an RTP proxy.
  238. To be invoked on INVITE for the cases the SDP bodies are in INVITE and
  239. 200 OK and on 200 OK when SDP bodies are in 200 OK and ACK.
  240. Meaning of the parameters is as follows:
  241. * flags - flags to turn on some features.
  242. The "flags" string is a list of space-separated items. Each item is
  243. either an individual token, or a token in "key=value" format. The
  244. possible tokens are described below.
  245. + via-branch=... - Include the "branch" value of one of the
  246. "Via" headers in the request to the RTP proxy. Possible values
  247. are: "1" - use the first "Via" header; "2" - use the second
  248. "Via" header; "auto" - use the first "Via" header if this is a
  249. request, or the second one if this is a reply; "extra" - don't
  250. take the value from a header, but instead use the value of the
  251. "extra_id_pv" variable. This can be used to create one media
  252. session per branch on the RTP proxy. When sending a subsequent
  253. "delete" command to the RTP proxy, you can then stop just the
  254. session for a specific branch when passing the flag '1' or '2'
  255. in the "rtpengine_delete", or stop all sessions for a call
  256. when not passing one of those two flags there. This is
  257. especially useful if you have serially forked call scenarios
  258. where the RTP proxy gets an "offer" command for a new branch,
  259. and then a "delete" command for the previous branch, which
  260. would otherwise delete the full call, breaking the subsequent
  261. "answer" for the new branch. This flag is only supported by
  262. the Sipwise rtpengine RTP proxy at the moment!
  263. + asymmetric - flags that UA from which message is received
  264. doesn't support symmetric RTP. Disables learning of endpoint
  265. addresses in the Sipwise rtpengine proxy.
  266. + force-answer - force "answer", that is, only rewrite SDP when
  267. corresponding session already exists in the RTP proxy. By
  268. default is on when the session is to be completed.
  269. + direction=... - this option specifies a logical network
  270. interface and should be given exactly twice. It enables RTP
  271. bridging between different addresses or networks of the same
  272. family (e.g. IPv4 to IPv4). The first instance of the option
  273. specifies the interface that the originator of this message
  274. should be using, while the second instance specifies the
  275. interface that the target should be using. For example, if the
  276. SIP message was sent by an endpoint on a private network and
  277. will be sent to an endpoint on the public internet, you would
  278. use "direction=priv direction=pub" if those two logical
  279. network interfaces were called "priv" and "pub" in your RTP
  280. proxy's configuration respectively. The direction must only be
  281. specified in for initial SDP offer; answers or subsequent
  282. offers can omit this option.
  283. + internal, external - shorthand for "direction=internal" and
  284. "direction=external" respectively. Useful for brevity or as
  285. legacy option if the RTP proxy only supports two network
  286. interfaces instead of multiple, arbitrarily named ones.
  287. + auto-bridge - this flag an alternative to the "internal" and
  288. "external" flags in order to do automatic bridging between
  289. IPv4 on the "internal network" and IPv6 on the "external
  290. network". Instead of explicitly instructing the RTP proxy to
  291. select a particular address family, the distinction is done by
  292. the given IP in the SDP body by the RTP proxy itself. Not
  293. supported by Sipwise rtpengine.
  294. + address-family=... - instructs the RTP proxy that the
  295. recipient of this SDP body expects to see addresses of a
  296. particular family. Possible values are "IP4" and "IP6". For
  297. example, if the SDP body contains IPv4 addresses but the
  298. recipient only speaks IPv6, you would use "address-family=IP6"
  299. to bridge between the two address families.
  300. Sipwise rtpengine remembers the address family preference of
  301. each party after it has seen an SDP body from them. This means
  302. that normally it is only necessary to explicitly specify the
  303. address family in the "offer", but not in the "answer".
  304. Note: Please note, that this will only work properly with
  305. non-dual-stack user-agents or with dual-stack clients
  306. according to RFC6157 (which suggest ICE for Dual-Stack
  307. implementations). This short-cut will not work properly with
  308. RFC4091 (ANAT) compatible clients, which suggests having
  309. different m-lines with different IP-protocols grouped
  310. together.
  311. + force - instructs the RTP proxy to ignore marks inserted by
  312. another RTP proxy in transit to indicate that the session is
  313. already goes through another proxy. Allows creating a chain of
  314. proxies. Not supported and ignored by Sipwise rtpengine.
  315. + trust-address - flags that IP address in SDP should be
  316. trusted. Without this flag, the RTP proxy ignores address in
  317. the SDP and uses source address of the SIP message as media
  318. address which is passed to the RTP proxy.
  319. + replace-origin - flags that IP from the origin description
  320. (o=) should be also changed.
  321. + replace-session-connection - flags to change the session-level
  322. SDP connection (c=) IP if media description also includes
  323. connection information.
  324. + symmetric - flags that for the UA from which message is
  325. received, support symmetric RTP must be forced. Does nothing
  326. with the Sipwise rtpengine proxy as it is the default.
  327. + repacketize=NN - requests the RTP proxy to perform
  328. re-packetization of RTP traffic coming from the UA which has
  329. sent the current message to increase or decrease payload size
  330. per each RTP packet forwarded if possible. The NN is the
  331. target payload size in ms, for the most codecs its value
  332. should be in 10ms increments, however for some codecs the
  333. increment could differ (e.g. 30ms for GSM or 20ms for G.723).
  334. The RTP proxy would select the closest value supported by the
  335. codec. This feature could be used for significantly reducing
  336. bandwith overhead for low bitrate codecs, for example with
  337. G.729 going from 10ms to 100ms saves two thirds of the network
  338. bandwith. Not supported by Sipwise rtpengine.
  339. + ICE=... - controls the RTP proxy's behaviour regarding ICE
  340. attributes within the SDP body. Possible values are: "force" -
  341. discard any ICE attributes already present in the SDP body and
  342. then generate and insert new ICE data, leaving itself as the
  343. only ICE candidates; "force-relay" - discard any "relay" type
  344. ICE attributes already present in the SDP body and then
  345. generate and insert itself as the only ICE "relay" candidates;
  346. "remove" instructs the RTP proxy to discard any ICE attributes
  347. and not insert any new ones into the SDP. The default (if no
  348. "ICE=..." is given at all), new ICE data will only be
  349. generated if no ICE was present in the SDP originally;
  350. otherwise the RTP proxy will only insert itself as additional
  351. ICE candidate. Other SDP substitutions (c=, m=, etc) are
  352. unaffected by this flag.
  353. + RTP, SRTP, AVP, AVPF - These flags control the RTP transport
  354. protocol that should be used towards the recipient of the SDP.
  355. If none of them are specified, the protocol given in the SDP
  356. is left untouched. Otherwise, the "SRTP" flag indicates that
  357. SRTP should be used, while "RTP" indicates that SRTP should
  358. not be used. "AVPF" indicates that the advanced RTCP profile
  359. with feedback messages should be used, and "AVP" indicates
  360. that the regular RTCP profile should be used. See also the
  361. next set of flags below.
  362. + RTP/AVP, RTP/SAVP, RTP/AVPF, RTP/SAVPF - these serve as an
  363. alternative, more explicit way to select between the different
  364. RTP protocols and profiles supported by the RTP proxy. For
  365. example, giving the flag "RTP/SAVPF" has the same effect as
  366. giving the two flags "SRTP AVPF".
  367. + to-tag - force inclusion of the "To" tag. Normally, the "To"
  368. tag is always included when present, except for "delete"
  369. messages. Including the "To" tag in a "delete" messages allows
  370. you to be more selective about which dialogues within a call
  371. are being torn down.
  372. + rtcp-mux-demux - if rtcp-mux (RFC 5761) was offered, make the
  373. RTP proxy accept the offer, but not offer it to the recipient
  374. of this message.
  375. + rtcp-mux-reject - if rtcp-mux was offered, make the RTP proxy
  376. reject the offer, but still offer it to the recipient. Can be
  377. combined with "rtcp-mux-offer" to always offer it.
  378. + rtcp-mux-offer - make the RTP proxy offer rtcp-mux to the
  379. recipient of this message, regardless of whether it was
  380. offered originally or not.
  381. + rtcp-mux-accept - if rtcp-mux was offered, make the RTP proxy
  382. accept the offer and also offer it to the recipient of this
  383. message. Can be combined with "rtcp-mux-offer" to always offer
  384. it.
  385. + media-address=... - force a particular media address to be
  386. used in the SDP body. Address family is detected
  387. automatically.
  388. + TOS=... - change the IP TOS value for all outgoing RTP packets
  389. within the entire call in both directions. Only honoured in an
  390. "offer", ignored for an "answer". Valid values are 0 through
  391. 255, given in decimal. If this option is not specified, the
  392. TOS value will revert to the default TOS (normally 184). A
  393. value of -1 may be used to leave the currently used TOS
  394. unchanged.
  395. This function can be used from ANY_ROUTE.
  396. Example 1.8. rtpengine_offer usage
  397. route {
  398. ...
  399. if (is_method("INVITE")) {
  400. if (has_body("application/sdp")) {
  401. if (rtpengine_offer())
  402. t_on_reply("1");
  403. } else {
  404. t_on_reply("2");
  405. }
  406. }
  407. if (is_method("ACK") && has_body("application/sdp"))
  408. rtpengine_answer();
  409. ...
  410. }
  411. onreply_route[1]
  412. {
  413. ...
  414. if (has_body("application/sdp"))
  415. rtpengine_answer();
  416. ...
  417. }
  418. onreply_route[2]
  419. {
  420. ...
  421. if (has_body("application/sdp"))
  422. rtpengine_offer();
  423. ...
  424. }
  425. 5.3. rtpengine_answer([flags])
  426. Rewrites SDP body to ensure that media is passed through an RTP proxy.
  427. To be invoked on 200 OK for the cases the SDP bodies are in INVITE and
  428. 200 OK and on ACK when SDP bodies are in 200 OK and ACK.
  429. See rtpengine_offer() function description above for the meaning of the
  430. parameters.
  431. This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
  432. FAILURE_ROUTE, BRANCH_ROUTE.
  433. Example 1.9. rtpengine_answer usage
  434. See rtpengine_offer() function example above for example.
  435. 5.4. rtpengine_delete([flags])
  436. Tears down the RTPProxy session for the current call.
  437. See rtpengine_offer() function description above for the meaning of the
  438. parameters. Note that not all flags make sense for a "delete".
  439. This function can be used from ANY_ROUTE.
  440. Example 1.10. rtpengine_delete usage
  441. ...
  442. rtpengine_delete();
  443. ...
  444. 5.5. rtpengine_manage([flags])
  445. Manage the RTPProxy session - it combines the functionality of
  446. rtpengine_offer(), rtpengine_answer() and rtpengine_delete(), detecting
  447. internally based on message type and method which one to execute.
  448. It can take the same parameters as rtpengine_offer(). The flags
  449. parameter to rtpengine_manage() can be a configuration variable
  450. containing the flags as a string.
  451. Functionality:
  452. * If INVITE with SDP, then do rtpengine_offer()
  453. * If INVITE with SDP, when the tm module is loaded, mark transaction
  454. with internal flag FL_SDP_BODY to know that the 1xx and 2xx are for
  455. rtpengine_answer()
  456. * If ACK with SDP, then do rtpengine_answer()
  457. * If BYE or CANCEL, or called within a FAILURE_ROUTE[], then do
  458. rtpengine_delete()
  459. * If reply to INVITE with code >= 300 do rtpengine_delete()
  460. * If reply with SDP to INVITE having code 1xx and 2xx, then do
  461. rtpengine_answer() if the request had SDP or tm is not loaded,
  462. otherwise do rtpengine_offer()
  463. This function can be used from ANY_ROUTE.
  464. Example 1.11. rtpengine_manage usage
  465. ...
  466. rtpengine_manage();
  467. ...
  468. 5.6. start_recording()
  469. This function will send a signal to the RTP proxy to record the RTP
  470. stream on the RTP proxy. This function is not supported by Sipwise
  471. rtpengine at the moment!
  472. This function can be used from REQUEST_ROUTE and ONREPLY_ROUTE.
  473. Example 1.12. start_recording usage
  474. ...
  475. start_recording();
  476. ...
  477. 6. Exported Pseudo Variables
  478. 6.1. $rtpstat
  479. 6.1. $rtpstat
  480. Returns the RTP statistics from the RTP proxy. The RTP statistics from
  481. the RTP proxy are provided as a string and it does contain several
  482. packet counters. The statistics must be retrieved before the session is
  483. deleted (before rtpengine_delete()).
  484. Example 1.13. $rtpstat Usage
  485. ...
  486. append_hf("X-RTP-Statistics: $rtpstat\r\n");
  487. ...
  488. 7. MI Commands
  489. 7.1. nh_enable_rtpp
  490. 7.2. nh_show_rtpp
  491. 7.1. nh_enable_rtpp
  492. Enables a RTP proxy if parameter value is greater than 0. Disables it
  493. if a zero value is given.
  494. The first parameter is the RTP proxy url (exactly as defined in the
  495. config file).
  496. The second parameter value must be a number in decimal.
  497. NOTE: if a RTP proxy is defined multiple times (in the same or
  498. diferente sete), all of its instances will be enables/disabled.
  499. Example 1.14. nh_enable_rtpp usage
  500. ...
  501. $ kamctl fifo nh_enable_rtpp udp:192.168.2.133:8081 0
  502. ...
  503. 7.2. nh_show_rtpp
  504. Displays all the RTP proxies and their information: set and status
  505. (disabled or not, weight and recheck_ticks).
  506. No parameter.
  507. Example 1.15. nh_show_rtpp usage
  508. ...
  509. $ kamctl fifo nh_show_rtpp
  510. ...
  511. Chapter 2. Frequently Asked Questions
  512. 2.1. How do I migrate from "rtpproxy" or "rtpproxy-ng" to "rtpengine"?
  513. 2.2. Where can I find more about Kamailio?
  514. 2.3. Where can I post a question about this module?
  515. 2.4. How can I report a bug?
  516. 2.1.
  517. How do I migrate from "rtpproxy" or "rtpproxy-ng" to "rtpengine"?
  518. For the most part, only the names of the functions have changed, with
  519. "rtpproxy" in each name replaced with "rtpengine". For example,
  520. "rtpproxy_manage()" has become "rtpengine_manage()". A few name
  521. duplications have also been resolved, for example there is now a single
  522. "rtpengine_delete()" instead of "unforce_rtp_proxy()" and the identical
  523. "rtpproxy_destroy()".
  524. The largest difference to the old module is how flags are passed to
  525. "rtpengine_offer()", "rtpengine_answer()", "rtpengine_manage()" and
  526. "rtpengine_delete()". Instead of having a string of single-letter
  527. flags, they now take a string of space-separated items, with each item
  528. being either a single token (word) or a "key=value" pair.
  529. For example, if you had a call "rtpproxy_offer("FRWOC+PS");", this
  530. would then become:
  531. rtpengine_offer("force trust-address symmetric replace-origin replace-session-co
  532. nnection ICE=force RTP/SAVPF");
  533. Finally, if you were using the second paramater (explicit media
  534. address) to any of these functions, this has been replaced by the
  535. "media-address=..." option within the first string of flags.
  536. 2.2.
  537. Where can I find more about Kamailio?
  538. Take a look at http://www.kamailio.org/.
  539. 2.3.
  540. Where can I post a question about this module?
  541. First at all check if your question was already answered on one of our
  542. mailing lists:
  543. * User Mailing List -
  544. http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
  545. * Developer Mailing List -
  546. http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
  547. E-mails regarding any stable Kamailio release should be sent to
  548. <[email protected]> and e-mails regarding development
  549. versions should be sent to <[email protected]>.
  550. If you want to keep the mail private, send it to
  551. <[email protected]>.
  552. 2.4.
  553. How can I report a bug?
  554. Please follow the guidelines provided at:
  555. http://sip-router.org/tracker.