<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi all!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have an Asterisk instance (15.4.1) with a MySQL DB in realtime configuration (using MySQL ODBC connector).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I noticed, that when I issue “pjsip show endpoints” in the CLI this takes forever (on average about 1 minute with 1029 entries in ps_endpoints table).<o:p></o:p></p>
<p class="MsoNormal">If I query the database over the same ODBC connector with isql, this takes less than a second.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have enabled caching in sorcery.conf but it doesn’t really help (at least not concerning the output of “pjsip show xxxxx” commands).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any idea what might be causing this and how I can optimize it?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">With best regards<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black"><br>
<b>Florian Floimair<br>
</b>Innovation - Software-Development<br>
<br>
<b>COMMEND INTERNATIONAL GMBH<br>
</b>A-5020 Salzburg, Saalachstraße 51<br>
</span><span lang="DE-AT"><a href="http://www.commend.com/"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#0563C1">http://www.commend.com</span></a></span><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black"><br>
<br>
<b>Security and Communication by Commend<br>
<br>
</b></span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:gray">FN 178618z | LG Salzburg</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">asterisk-users <asterisk-users-bounces@lists.digium.com> on behalf of David P <davidswalkabout@gmail.com><br>
<b>Reply-To: </b>Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users@lists.digium.com><br>
<b>Date: </b>Monday, 18. June 2018 at 04:26<br>
<b>To: </b>Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users@lists.digium.com><br>
<b>Subject: </b>Re: [asterisk-users] Only 8kHz recorded after disallowing all but G722 codec on inbound<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I also just tried adding this: <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> same => n,Set(SIP_CODEC_INBOUND=g722)<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Sat, Jun 16, 2018 at 4:36 PM David P <<a href="mailto:davidswalkabout@gmail.com">davidswalkabout@gmail.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p class="MsoNormal">We want to record inbound channels at 16kHz, but send only 8kHz to our peers. I've set our default profile in sip.conf to disallow all but g722, and the peers disallow all but ulaw. We have a proxy in front of Asterisk that is configured
 to disallow all but G722 also. <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">My test calls show inbound to the proxy is recorded at 16kHz, inbound in Asterisk is only 8kHz, and the peers receive 8kHz. So the only thing not working is Asterisk's sampling rate on inbound, and it seems to be downsampling.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">After a lot of web searching, I can't find any explanation of why we're not getting 16kHz for G722. We're using Asterisk 14.7.6.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Cheers,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">David<o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
</div>
</body>
</html>