<h4>Pre-Submission Checklist</h4>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Commit message has the format required by CONTRIBUTING guide</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Commits are split per component (core, individual modules, libs, utils, ...)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Each component has a single commit (if not, squash them into one commit)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> No commits to README files for modules (changes must be done to docbook files<br>
in <code>doc/</code> subfolder, the README file is autogenerated)</li>
</ul>
<h4>Type Of Change</h4>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> New module</li>
</ul>
<h4>Checklist:</h4>
<p>Tested with various sofphones : Ekiga, Linphone, CSipSimple</p>
<h4>Description</h4>
<p>By combining  Kamailio, oRTP and mediastreamer2<br>
this module is providing some very good foundation to support RTP endpoint and various media processing features.</p>
<p>This  seems like a great idea for various use cases like IoT, IVR or other specific needs.</p>
<p>Kamailio is handling everything related to SIP/SDP (the module is adding some SDP parsing) as well as providing a scripting engine.</p>
<p>oRTP is providing RTP endpoints compliant with (RFC 3550)</p>
<p>MediaStreamer2, even if written in C is quite a high level library, because it is implementing a framework for audio processing using graphs of filters, filters can be to do various things.<br>
Similar to playing with lego blocks :)</p>
<ul>
<li>Support for most free and some non free codecs can be added easily.</li>
<li>Work to bridge calls is already in progress in the module.</li>
<li>Mobile phone support ARM CPU</li>
<li>other embedded scenario should be supported</li>
<li>much more ...</li>
</ul>
<p>Mediastream2 is creating one thread per call "msticker", this can work smoothly in Kamailio even if it is forking processes.<br>
Shared memory allocation is supported using wrapper around malloc/free used by the libraries.</p>
<p>Some extra work that needs to be done shorty</p>
<ul>
<li>Syncronization with locks is not completed (minor task, only access to a linked list needs to be syncronized properly)</li>
<li>Memory leak not tested properly (not take the time to test with valgrind yet)</li>
</ul>
<p>This project was started last year, I think it is time to submit it, I will surely find the time to do the extra work needed shortly.</p>
<p>Example config using the features already implemented</p>
<pre><code>event_route[rms:start] {
        xnotice("[rms:start] play ...\n");
        rms_play("/tmp/reference_8000.wav", "rms:after_play");
};

event_route[rms:after_play] {
        xnotice("[rms:after_play] play done...\n");
        rms_hangup();
};

route {
        if (t_precheck_trans()) {
                t_check_trans();
                exit;
        }
        t_check_trans();
        if (is_method("INVITE") &amp;&amp; !has_totag()) {
                if (!rms_answer()) {
                        t_reply("503", "server error");
                }
        }

        if (is_method("BYE")){
                rms_media_stop();
        }
}
</code></pre>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/kamailio/kamailio/pull/1701'>https://github.com/kamailio/kamailio/pull/1701</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>rtp_media_server: adding module</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1701/files#diff-0">src/Makefile.groups</a>
    (6)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1701/files#diff-1">src/modules/rtp_media_server/Makefile</a>
    (13)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1701/files#diff-2">src/modules/rtp_media_server/config_example/kamailio.cfg</a>
    (56)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1701/files#diff-3">src/modules/rtp_media_server/doc/Makefile</a>
    (4)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1701/files#diff-4">src/modules/rtp_media_server/doc/rtp_media_server.xml</a>
    (42)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1701/files#diff-5">src/modules/rtp_media_server/doc/rtp_media_server_admin.xml</a>
    (193)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1701/files#diff-6">src/modules/rtp_media_server/install_bc.sh</a>
    (45)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1701/files#diff-7">src/modules/rtp_media_server/rms_media.c</a>
    (320)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1701/files#diff-8">src/modules/rtp_media_server/rms_media.h</a>
    (103)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1701/files#diff-9">src/modules/rtp_media_server/rms_sdp.c</a>
    (301)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1701/files#diff-10">src/modules/rtp_media_server/rms_sdp.h</a>
    (45)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1701/files#diff-11">src/modules/rtp_media_server/rtp_media_server.c</a>
    (718)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1701/files#diff-12">src/modules/rtp_media_server/rtp_media_server.h</a>
    (91)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1701/files#diff-13">src/modules/rtp_media_server/voice_file/Bach_10s_8000.wav</a>
    (0)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/kamailio/kamailio/pull/1701.patch'>https://github.com/kamailio/kamailio/pull/1701.patch</a></li>
  <li><a href='https://github.com/kamailio/kamailio/pull/1701.diff'>https://github.com/kamailio/kamailio/pull/1701.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/1701">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZbFOvcqLi6zbOXUDSZy-Kn71EU0zks5uqqWagaJpZM4YF7gV">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZaKYWVlqphb_--SsAgZh-n6v2Gq2ks5uqqWagaJpZM4YF7gV.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"rtp_media_server: adding module (#1701)"}],"action":{"name":"View Pull Request","url":"https://github.com/kamailio/kamailio/pull/1701"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/1701",
"url": "https://github.com/kamailio/kamailio/pull/1701",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "rtp_media_server: adding module (#1701)",
"sections": [
{
"text": "",
"activityTitle": "**Julien Chavanton**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@jchavanton",
"facts": [

]
},
{
"title": "Commit Summary",
"facts": [
{
"name": "536628f",
"value": "rtp_media_server: adding module"
}
]
},
{
"title": "File Changes",
"facts": [
{
"name": "Modified",
"value": "[src/Makefile.groups](https://github.com/kamailio/kamailio/pull/1701/files#diff-0) (6 changes)"
},
{
"name": "Added",
"value": "[src/modules/rtp_media_server/Makefile](https://github.com/kamailio/kamailio/pull/1701/files#diff-1) (13 changes)"
},
{
"name": "Added",
"value": "[src/modules/rtp_media_server/config_example/kamailio.cfg](https://github.com/kamailio/kamailio/pull/1701/files#diff-2) (56 changes)"
},
{
"name": "Added",
"value": "[src/modules/rtp_media_server/doc/Makefile](https://github.com/kamailio/kamailio/pull/1701/files#diff-3) (4 changes)"
},
{
"name": "Added",
"value": "[src/modules/rtp_media_server/doc/rtp_media_server.xml](https://github.com/kamailio/kamailio/pull/1701/files#diff-4) (42 changes)"
},
{
"name": "Added",
"value": "[src/modules/rtp_media_server/doc/rtp_media_server_admin.xml](https://github.com/kamailio/kamailio/pull/1701/files#diff-5) (193 changes)"
},
{
"name": "Added",
"value": "[src/modules/rtp_media_server/install_bc.sh](https://github.com/kamailio/kamailio/pull/1701/files#diff-6) (45 changes)"
},
{
"name": "Added",
"value": "[src/modules/rtp_media_server/rms_media.c](https://github.com/kamailio/kamailio/pull/1701/files#diff-7) (320 changes)"
},
{
"name": "Added",
"value": "[src/modules/rtp_media_server/rms_media.h](https://github.com/kamailio/kamailio/pull/1701/files#diff-8) (103 changes)"
},
{
"name": "Added",
"value": "[src/modules/rtp_media_server/rms_sdp.c](https://github.com/kamailio/kamailio/pull/1701/files#diff-9) (301 changes)"
},
{
"name": "Added",
"value": "[src/modules/rtp_media_server/rms_sdp.h](https://github.com/kamailio/kamailio/pull/1701/files#diff-10) (45 changes)"
},
{
"name": "Added",
"value": "[src/modules/rtp_media_server/rtp_media_server.c](https://github.com/kamailio/kamailio/pull/1701/files#diff-11) (718 changes)"
},
{
"name": "Added",
"value": "[src/modules/rtp_media_server/rtp_media_server.h](https://github.com/kamailio/kamailio/pull/1701/files#diff-12) (91 changes)"
},
{
"name": "Added",
"value": "[src/modules/rtp_media_server/voice_file/Bach_10s_8000.wav](https://github.com/kamailio/kamailio/pull/1701/files#diff-13) (0 changes)"
}
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"issueId\": 1701,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close pull request",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"PullRequestClose\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"pullRequestId\": 1701\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/kamailio/kamailio/pull/1701"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/kamailio/kamailio/pull/1701.patch"
}
],
"@type": "OpenUri",
"name": "View patch"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/kamailio/kamailio/pull/1701.diff"
}
],
"@type": "OpenUri",
"name": "View diff"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 404207637\n}"
}
],
"themeColor": "26292E"
}
]</script>