Skip to content

Commit dc2f7b3

Browse files
author
Emir Aganovic
committed
fix: add more api docs
1 parent f3a90ae commit dc2f7b3

File tree

4 files changed

+34
-37
lines changed

4 files changed

+34
-37
lines changed

docs/api_docs/index.html

+19-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
Dialog Sessions diago can act as UAS(User Agent Server) and UAC(User Agent Client), and adds bridging capability to build B2BUA services.
4343
It intentionally distincts dialog received (Acting as server) and dialog created (Acting as client):
4444
DialogServerSession when receving incoming dialog (SIP INVITE) and setups session (media) DialogClientSession when it creates outgoing dialog (SIP INVITE) and setups session (media) For best understanding here some docs with short code reference.">
45-
<meta itemprop="wordCount" content="577">
45+
<meta itemprop="wordCount" content="639">
4646
<meta name="twitter:card" content="summary">
4747
<meta name="twitter:title" content="API Docs">
4848
<meta name="twitter:description" content="Library API tries to be well documented through comments. For more reference visit GO DOC
@@ -258,6 +258,12 @@
258258
class="hx-flex hx-rounded hx-px-2 hx-py-1.5 hx-text-sm hx-transition-colors [word-break:break-word] hx-cursor-pointer [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] contrast-more:hx-border hx-gap-2 before:hx-opacity-25 before:hx-content-['#'] hx-text-gray-500 hover:hx-bg-gray-100 hover:hx-text-gray-900 dark:hx-text-neutral-400 dark:hover:hx-bg-primary-100/5 dark:hover:hx-text-gray-50 contrast-more:hx-text-gray-900 contrast-more:dark:hx-text-gray-50 contrast-more:hx-border-transparent contrast-more:hover:hx-border-gray-900 contrast-more:dark:hover:hx-border-gray-50"
259259
>Answering call</a>
260260
</li>
261+
<li>
262+
<a
263+
href="#media-handling"
264+
class="hx-flex hx-rounded hx-px-2 hx-py-1.5 hx-text-sm hx-transition-colors [word-break:break-word] hx-cursor-pointer [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] contrast-more:hx-border hx-gap-2 before:hx-opacity-25 before:hx-content-['#'] hx-text-gray-500 hover:hx-bg-gray-100 hover:hx-text-gray-900 dark:hx-text-neutral-400 dark:hover:hx-bg-primary-100/5 dark:hover:hx-text-gray-50 contrast-more:hx-text-gray-900 contrast-more:dark:hx-text-gray-50 contrast-more:hx-border-transparent contrast-more:hover:hx-border-gray-900 contrast-more:dark:hover:hx-border-gray-50"
265+
>Media handling</a>
266+
</li>
261267
<li>
262268
<a
263269
href="#playback"
@@ -383,6 +389,10 @@
383389
<a class="hx-font-semibold hx-inline-block hx-text-gray-500 hover:hx-text-gray-900 dark:hx-text-gray-400 dark:hover:hx-text-gray-300 contrast-more:hx-text-gray-900 contrast-more:hx-underline contrast-more:dark:hx-text-gray-50 hx-w-full hx-break-words" href="#answering-call">Answering call
384390
</a>
385391
</li>
392+
<li class="hx-my-2 hx-scroll-my-6 hx-scroll-py-6">
393+
<a class="hx-font-semibold hx-inline-block hx-text-gray-500 hover:hx-text-gray-900 dark:hx-text-gray-400 dark:hover:hx-text-gray-300 contrast-more:hx-text-gray-900 contrast-more:hx-underline contrast-more:dark:hx-text-gray-50 hx-w-full hx-break-words" href="#media-handling">Media handling
394+
</a>
395+
</li>
386396
<li class="hx-my-2 hx-scroll-my-6 hx-scroll-py-6">
387397
<a class="hx-font-semibold hx-inline-block hx-text-gray-500 hover:hx-text-gray-900 dark:hx-text-gray-400 dark:hover:hx-text-gray-300 contrast-more:hx-text-gray-900 contrast-more:hx-underline contrast-more:dark:hx-text-gray-50 hx-w-full hx-break-words" href="#playback">Playback
388398
</a>
@@ -570,6 +580,14 @@ <h2>Answering call<span class="hx-absolute -hx-mt-20" id="answering-call"></span
570580

571581

572582
</div>
583+
<h2>Media handling<span class="hx-absolute -hx-mt-20" id="media-handling"></span>
584+
<a href="#media-handling" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Every session comes with 2 streams (Audio for now). In diago case it is referenced as reader/writer.</p>
585+
<ul>
586+
<li><code>AudioReader</code> reads incoming stream</li>
587+
<li><code>AudioWriter</code> writes outgoing stream</li>
588+
</ul>
589+
<p>Normally you mostly deal with writing audio so <strong>Playback</strong> is created for easier dealing with audio streams.</p>
590+
<p><strong>NOTE</strong>: Diago does not automatically reads audio stream in background. This can happen with explicit call or <em>bridging</em>.</p>
573591
<h2>Playback<span class="hx-absolute -hx-mt-20" id="playback"></span>
574592
<a href="#playback" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Playing audio file is done with audio playback. Library provides prebuilt playback functionality</p>
575593
<p>Playback can:</p>

docs/index.xml

+9-6
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,14 @@ Dialog created is scoped (Like HTTP request serving). Once dialog exists, it is
294294

295295

296296
&lt;/div&gt;
297+
&lt;h2&gt;Media handling&lt;span class=&#34;hx-absolute -hx-mt-20&#34; id=&#34;media-handling&#34;&gt;&lt;/span&gt;
298+
&lt;a href=&#34;#media-handling&#34; class=&#34;subheading-anchor&#34; aria-label=&#34;Permalink for this section&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Every session comes with 2 streams (Audio for now). In diago case it is referenced as reader/writer.&lt;/p&gt;
299+
&lt;ul&gt;
300+
&lt;li&gt;&lt;code&gt;AudioReader&lt;/code&gt; reads incoming stream&lt;/li&gt;
301+
&lt;li&gt;&lt;code&gt;AudioWriter&lt;/code&gt; writes outgoing stream&lt;/li&gt;
302+
&lt;/ul&gt;
303+
&lt;p&gt;Normally you mostly deal with writing audio so &lt;strong&gt;Playback&lt;/strong&gt; is created for easier dealing with audio streams.&lt;/p&gt;
304+
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: Diago does not automatically reads audio stream in background. This can happen with explicit call or &lt;em&gt;bridging&lt;/em&gt;.&lt;/p&gt;
297305
&lt;h2&gt;Playback&lt;span class=&#34;hx-absolute -hx-mt-20&#34; id=&#34;playback&#34;&gt;&lt;/span&gt;
298306
&lt;a href=&#34;#playback&#34; class=&#34;subheading-anchor&#34; aria-label=&#34;Permalink for this section&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Playing audio file is done with audio playback. Library provides prebuilt playback functionality&lt;/p&gt;
299307
&lt;p&gt;Playback can:&lt;/p&gt;
@@ -514,12 +522,7 @@ Publishing local IP like above is problem for NAT and there different approaches
514522
<description>
515523

516524

517-
&lt;h2&gt;Why Diago?&lt;span class=&#34;hx-absolute -hx-mt-20&#34; id=&#34;why-diago&#34;&gt;&lt;/span&gt;
518-
&lt;a href=&#34;#why-diago&#34; class=&#34;subheading-anchor&#34; aria-label=&#34;Permalink for this section&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Development of VOIP services can be slow or it was full workarrounds.
519-
Diago try to offer more modern Stack and put you closer to protcol,network,media but offering High level and low level API calls.&lt;/p&gt;
520-
&lt;p&gt;Diago is built with GO language and we are keeping well optimized sip and media stack to have performance and low GC latency. Major win is Go offers fast development speed and memory safety, but also tooling to tweak best performance.&lt;/p&gt;
521-
&lt;p&gt;In case you wondering is Go right language, there are already good benchmark results with just &lt;a href=&#34;https://github.com/emiago/sipgo&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;sipgo&lt;/a&gt;.&lt;/p&gt;
522-
525+
523526
</description>
524527
</item>
525528

docs/why_diago/index.html

+5-29
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
<link fetchpriority="low" href="/diago/site.webmanifest" rel="manifest" />
1313

1414
<title>Diago</title>
15-
<meta name="description" content="Why Diago? Development of VOIP services can be slow or it was full workarrounds. Diago try to offer more modern Stack and put you closer to protcol,network,media but offering High level and low level API calls.
16-
Diago is built with GO language and we are keeping well optimized sip and media stack to have performance and low GC latency. Major win is Go offers fast development speed and memory safety, but also tooling to tweak best performance." />
15+
<meta name="description" content="" />
1716

1817

1918
<link rel="canonical" href="https://emiago.github.io/diago/docs/why_diago/" itemprop="url" />
@@ -22,22 +21,16 @@
2221

2322

2423
<meta property="og:title" content="" />
25-
<meta property="og:description" content="Why Diago? Development of VOIP services can be slow or it was full workarrounds. Diago try to offer more modern Stack and put you closer to protcol,network,media but offering High level and low level API calls.
26-
Diago is built with GO language and we are keeping well optimized sip and media stack to have performance and low GC latency. Major win is Go offers fast development speed and memory safety, but also tooling to tweak best performance." />
24+
<meta property="og:description" content="" />
2725
<meta property="og:type" content="article" />
2826
<meta property="og:url" content="https://emiago.github.io/diago/docs/why_diago/" /><meta property="article:section" content="docs" />
2927

3028

3129

3230

3331
<meta itemprop="name" content="Diago">
34-
<meta itemprop="description" content="Why Diago? Development of VOIP services can be slow or it was full workarrounds. Diago try to offer more modern Stack and put you closer to protcol,network,media but offering High level and low level API calls.
35-
Diago is built with GO language and we are keeping well optimized sip and media stack to have performance and low GC latency. Major win is Go offers fast development speed and memory safety, but also tooling to tweak best performance.">
36-
<meta itemprop="wordCount" content="94">
3732
<meta name="twitter:card" content="summary">
3833
<meta name="twitter:title" content="Diago">
39-
<meta name="twitter:description" content="Why Diago? Development of VOIP services can be slow or it was full workarrounds. Diago try to offer more modern Stack and put you closer to protcol,network,media but offering High level and low level API calls.
40-
Diago is built with GO language and we are keeping well optimized sip and media stack to have performance and low GC latency. Major win is Go offers fast development speed and memory safety, but also tooling to tweak best performance.">
4134

4235
<link rel="preload" href="/diago/css/compiled/main.min.c1fe2c80102c9dc9ddc66184191e646769052d36a21b38ac5ab5077713cf7a81.css" as="style" integrity="sha256-wf4sgBAsncndxmGEGR5kZ2kFLTaiGzisWrUHdxPPeoE=" />
4336
<link href="/diago/css/compiled/main.min.c1fe2c80102c9dc9ddc66184191e646769052d36a21b38ac5ab5077713cf7a81.css" rel="stylesheet" integrity="sha256-wf4sgBAsncndxmGEGR5kZ2kFLTaiGzisWrUHdxPPeoE=" />
@@ -224,14 +217,6 @@
224217
>Why Diago
225218
</a>
226219

227-
<ul class='hx-flex hx-flex-col hx-gap-1 hx-relative before:hx-absolute before:hx-inset-y-1 before:hx-w-px before:hx-bg-gray-200 before:hx-content-[""] dark:before:hx-bg-neutral-800 ltr:hx-pl-3 ltr:before:hx-left-0 rtl:hx-pr-3 rtl:before:hx-right-0 ltr:hx-ml-3 rtl:hx-mr-3'><li>
228-
<a
229-
href="#why-diago"
230-
class="hx-flex hx-rounded hx-px-2 hx-py-1.5 hx-text-sm hx-transition-colors [word-break:break-word] hx-cursor-pointer [-webkit-tap-highlight-color:transparent] [-webkit-touch-callout:none] contrast-more:hx-border hx-gap-2 before:hx-opacity-25 before:hx-content-['#'] hx-text-gray-500 hover:hx-bg-gray-100 hover:hx-text-gray-900 dark:hx-text-neutral-400 dark:hover:hx-bg-primary-100/5 dark:hover:hx-text-gray-50 contrast-more:hx-text-gray-900 contrast-more:dark:hx-text-gray-50 contrast-more:hx-border-transparent contrast-more:hover:hx-border-gray-900 contrast-more:dark:hover:hx-border-gray-50"
231-
>Why Diago?</a>
232-
</li>
233-
</ul>
234-
235220

236221
</li></ul>
237222
</div></li>
@@ -310,12 +295,8 @@
310295
</div></div></aside>
311296

312297
<nav class="hextra-toc hx-order-last hx-hidden hx-w-64 hx-shrink-0 xl:hx-block print:hx-hidden hx-px-4" aria-label="table of contents">
313-
<div class="hextra-scrollbar hx-sticky hx-top-16 hx-overflow-y-auto hx-pr-4 hx-pt-6 hx-text-sm [hyphens:auto] hx-max-h-[calc(100vh-var(--navbar-height)-env(safe-area-inset-bottom))] ltr:hx--mr-4 rtl:hx--ml-4"><p class="hx-mb-4 hx-font-semibold hx-tracking-tight">On this page</p><ul>
314-
<li class="hx-my-2 hx-scroll-my-6 hx-scroll-py-6">
315-
<a class="hx-font-semibold hx-inline-block hx-text-gray-500 hover:hx-text-gray-900 dark:hx-text-gray-400 dark:hover:hx-text-gray-300 contrast-more:hx-text-gray-900 contrast-more:hx-underline contrast-more:dark:hx-text-gray-50 hx-w-full hx-break-words" href="#why-diago">Why Diago?
316-
</a>
317-
</li></ul>
318-
<div class="hx-mt-8 hx-border-t hx-bg-white hx-pt-8 hx-shadow-[0_-12px_16px_white] dark:hx-bg-dark dark:hx-shadow-[0_-12px_16px_#111] hx-sticky hx-bottom-0 hx-flex hx-flex-col hx-items-start hx-gap-2 hx-pb-8 dark:hx-border-neutral-800 contrast-more:hx-border-t contrast-more:hx-border-neutral-400 contrast-more:hx-shadow-none contrast-more:dark:hx-border-neutral-400">
298+
<div class="hextra-scrollbar hx-sticky hx-top-16 hx-overflow-y-auto hx-pr-4 hx-pt-6 hx-text-sm [hyphens:auto] hx-max-h-[calc(100vh-var(--navbar-height)-env(safe-area-inset-bottom))] ltr:hx--mr-4 rtl:hx--ml-4">
299+
<div class=" hx-sticky hx-bottom-0 hx-flex hx-flex-col hx-items-start hx-gap-2 hx-pb-8 dark:hx-border-neutral-800 contrast-more:hx-border-t contrast-more:hx-border-neutral-400 contrast-more:hx-shadow-none contrast-more:dark:hx-border-neutral-400">
319300
<button aria-hidden="true" id="backToTop" onClick="scrollUp();" class="hx-transition-all hx-duration-75 hx-opacity-0 hx-text-xs hx-font-medium hx-text-gray-500 hover:hx-text-gray-900 dark:hx-text-gray-400 dark:hover:hx-text-gray-100 contrast-more:hx-text-gray-800 contrast-more:dark:hx-text-gray-50">
320301
<span>Scroll to top</span>
321302
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="hx-inline ltr:hx-ml-1 rtl:hx-mr-1 hx-h-3.5 hx-w-3.5 hx-border hx-rounded-full hx-border-gray-500 hover:hx-border-gray-900 dark:hx-border-gray-400 dark:hover:hx-border-gray-100 contrast-more:hx-border-gray-800 contrast-more:dark:hx-border-gray-50">
@@ -338,12 +319,7 @@
338319

339320
<div class="content">
340321
<h1></h1>
341-
<h2>Why Diago?<span class="hx-absolute -hx-mt-20" id="why-diago"></span>
342-
<a href="#why-diago" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Development of VOIP services can be slow or it was full workarrounds.
343-
Diago try to offer more modern Stack and put you closer to protcol,network,media but offering High level and low level API calls.</p>
344-
<p>Diago is built with GO language and we are keeping well optimized sip and media stack to have performance and low GC latency. Major win is Go offers fast development speed and memory safety, but also tooling to tweak best performance.</p>
345-
<p>In case you wondering is Go right language, there are already good benchmark results with just <a href="https://github.com/emiago/sipgo" target="_blank" rel="noopener">sipgo</a>.</p>
346-
322+
347323
</div>
348324
<div class="hx-mt-16"></div>
349325
<div class="hx-mb-8 hx-flex hx-items-center hx-border-t hx-pt-8 dark:hx-border-neutral-800 contrast-more:hx-border-neutral-400 dark:contrast-more:hx-border-neutral-400 print:hx-hidden"><a

0 commit comments

Comments
 (0)