Asterisk-13-Function_JITTERBUFFER_29394672.html 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Asterisk Project : Asterisk 13 Function_JITTERBUFFER</title>
  5. <link rel="stylesheet" href="styles/site.css" type="text/css" />
  6. <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7. </head>
  8. <body class="theme-default aui-theme-default">
  9. <div id="page">
  10. <div id="main" class="aui-page-panel">
  11. <div id="main-header">
  12. <div id="breadcrumb-section">
  13. <ol id="breadcrumbs">
  14. <li class="first">
  15. <span><a href="index.html">Asterisk Project</a></span>
  16. </li>
  17. <li>
  18. <span><a href="Asterisk-13-Command-Reference_29394274.html">Asterisk 13 Command Reference</a></span>
  19. </li>
  20. <li>
  21. <span><a href="Asterisk-13-Dialplan-Functions_29394287.html">Asterisk 13 Dialplan Functions</a></span>
  22. </li>
  23. </ol>
  24. </div>
  25. <h1 id="title-heading" class="pagetitle">
  26. <span id="title-text">
  27. Asterisk Project : Asterisk 13 Function_JITTERBUFFER
  28. </span>
  29. </h1>
  30. </div>
  31. <div id="content" class="view">
  32. <div class="page-metadata">
  33. Created and last modified by <span class='author'> wikibot</span> on Aug 11, 2014
  34. </div>
  35. <div id="main-content" class="wiki-content group">
  36. <h1 id="Asterisk13Function_JITTERBUFFER-JITTERBUFFER()">JITTERBUFFER()</h1>
  37. <h3 id="Asterisk13Function_JITTERBUFFER-Synopsis">Synopsis</h3>
  38. <p>Add a Jitterbuffer to the Read side of the channel. This dejitters the audio stream before it reaches the Asterisk core. This is a write only function.</p>
  39. <h3 id="Asterisk13Function_JITTERBUFFER-Description">Description</h3>
  40. <p>Jitterbuffers are constructed in two different ways. The first always take three arguments: <em>max_size</em>, <em>resync_threshold</em>, and <em>target_extra</em>. Alternatively, a single argument of <code>default</code> can be provided, which will construct the default jitterbuffer for the given <em>jitterbuffer type</em>.</p>
  41. <p>The arguments are:</p>
  42. <p>max_size: Length in milliseconds of the buffer. Defaults to 200 ms.</p>
  43. <p>resync_threshold: The length in milliseconds over which a timestamp difference will result in resyncing the jitterbuffer. Defaults to 1000ms.</p>
  44. <p>target_extra: This option only affects the adaptive jitterbuffer. It represents the amount time in milliseconds by which the new jitter buffer will pad its size. Defaults to 40ms.</p>
  45. <div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Example: Fixed with defaults</b></div><div class="codeContent panelContent pdl">
  46. <pre class="theme: Confluence; brush: text; gutter: true" style="font-size:12px;">
  47. exten =&gt; 1,1,Set(JITTERBUFFER(fixed)=default)
  48. </pre>
  49. </div></div>
  50. <div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Example: Fixed with 200ms max size</b></div><div class="codeContent panelContent pdl">
  51. <pre class="theme: Confluence; brush: text; gutter: true" style="font-size:12px;">
  52. exten =&gt; 1,1,Set(JITTERBUFFER(fixed)=200)
  53. </pre>
  54. </div></div>
  55. <div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Example: Fixed with 200ms max size, resync threshold 1500</b></div><div class="codeContent panelContent pdl">
  56. <pre class="theme: Confluence; brush: text; gutter: true" style="font-size:12px;">
  57. exten =&gt; 1,1,Set(JITTERBUFFER(fixed)=200,1500)
  58. </pre>
  59. </div></div>
  60. <div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Example: Adaptive with defaults</b></div><div class="codeContent panelContent pdl">
  61. <pre class="theme: Confluence; brush: text; gutter: true" style="font-size:12px;">
  62. exten =&gt; 1,1,Set(JITTERBUFFER(adaptive)=default)
  63. </pre>
  64. </div></div>
  65. <div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Example: Adaptive with 200ms max size, 60ms target extra</b></div><div class="codeContent panelContent pdl">
  66. <pre class="theme: Confluence; brush: text; gutter: true" style="font-size:12px;">
  67. exten =&gt; 1,1,Set(JITTERBUFFER(adaptive)=200,,60)
  68. </pre>
  69. </div></div>
  70. <div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Example: Set a fixed jitterbuffer with defaults; then remove it</b></div><div class="codeContent panelContent pdl">
  71. <pre class="theme: Confluence; brush: text; gutter: true" style="font-size:12px;">
  72. exten =&gt; 1,1,Set(JITTERBUFFER(fixed)=default)
  73. exten =&gt; 1,n,Set(JITTERBUFFER(disabled)=)
  74. </pre>
  75. </div></div>
  76. <div class="aui-message hint shadowed information-macro">
  77. <p class="title">Note</p>
  78. <span class="aui-icon icon-hint">Icon</span>
  79. <div class="message-content">
  80. <p>If a channel specifies a jitterbuffer due to channel driver configuration and the JITTERBUFFER function has set a jitterbuffer for that channel, the jitterbuffer set by the JITTERBUFFER function will take priority and the jitterbuffer set by the channel configuration will not be applied.</p>
  81. </div>
  82. </div>
  83. <h3 id="Asterisk13Function_JITTERBUFFER-Syntax">Syntax</h3>
  84. <div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
  85. <pre>JITTERBUFFER(jitterbuffer type)</pre>
  86. </div></div>
  87. <h5 id="Asterisk13Function_JITTERBUFFER-Arguments">Arguments</h5>
  88. <ul>
  89. <li><code>jitterbuffer type</code>
  90. <ul>
  91. <li><code>fixed</code> - Set a fixed jitterbuffer on the channel.</li>
  92. <li><code>adaptive</code> - Set an adaptive jitterbuffer on the channel.</li>
  93. <li><code>disabled</code> - Remove a previously set jitterbuffer from the channel.</li>
  94. </ul>
  95. </li>
  96. </ul>
  97. <h3 id="Asterisk13Function_JITTERBUFFER-SeeAlso">See Also</h3>
  98. <h3 id="Asterisk13Function_JITTERBUFFER-ImportVersion">Import Version</h3>
  99. <p>This documentation was imported from Asterisk Version SVN-branch-13-r420717</p>
  100. </div>
  101. </div> </div>
  102. <div id="footer">
  103. <section class="footer-body">
  104. <p>Document generated by Confluence on Aug 11, 2014 13:46</p>
  105. </section>
  106. </div>
  107. </div> </body>
  108. </html>