<div>Olá,</div><div><br></div><div>Estou tentando autenticar/limitar as chamadas IAX2.</div><div><br></div><div>Tenho um servidor (A) com o asterisk 1.4.42 e freepbx 2.9.0.7.</div><div>Configurei um outro servidor (B) com as mesmas configurações e criei um trunk IAX2 para o servidor A.</div>

<div><br></div><div>Tenho também um ramal no servidor B e uma rota de saída no servidor B que direciona para o trunk.</div><div>Quando eu faço chamadas do ramal B saindo pelo trunk vejo a seguinte mensagem no console do servidor A:</div>

<div><br></div><div><div> Accepting UNAUTHENTICATED call from ip_servidor_B:</div><div>       &gt; requested format = alaw,</div><div>       &gt; requested prefs = (alaw|ulaw),</div><div>       &gt; actual format = ulaw,</div>

<div>       &gt; host prefs = (ulaw|alaw),</div><div>       &gt; priority = mine</div></div><div><br></div><div><br></div><div>Gostaria que esta chamada fosse rejeitada. Como devo proceder?</div><div><br></div><div>A configuração do trunk IAX2 é a seguinte:</div>

<div><div>disallow=all</div><div>allow=ulaw&amp;alaw</div><div>context=from-internal</div><div>deny=0.0.0.0</div><div>qualify=yes</div><div>type=friend</div><div>language=pt_BR</div><div>host=ip_servidor_A</div><div>port=4569</div>

</div><div><br></div><div>Arquivo: iax.conf do servidor A:<br><div>[general]</div><div><br></div><div>; These will all be included in the [general] context</div><div>#include iax_general_additional.conf</div><div>#include iax_general_custom.conf</div>

<div>#include iax_registrations_custom.conf</div><div>#include iax_registrations.conf</div><div><br></div><div>; These should all be expected to come after the [general] context</div><div>;</div><div>;iax_custom.conf is the proper place to start creating new contexts that you</div>

<div>;might have a need for.  Dundi IAX trunks is one example of when this file is needed.</div><div>;</div><div>#include iax_custom.conf</div><div>#include iax_additional.conf</div><div>;</div><div>;iax_custom_post.conf will allow you to modify FreePBX generated IAX setups so</div>

<div>;that you can add additional parameters to a auto-generated setup.</div><div>;if you have a auto-generated context of [foobar] and need to add a parameter</div><div>;to it then create this line [foobar](+) and place your additions on the next line</div>

<div>;</div><div>#include iax_custom_post.conf</div></div><div><br></div><div>Arquivo: iax_general_additional.conf do servidor A:</div><div><div>mailboxdetail=yes</div><div>tos=ef</div><div>disallow=all</div><div>allow=g729</div>

<div>allow=speex</div><div>allow=ulaw</div><div>allow=alaw</div><div>allow=gsm</div><div>allow=ilbc</div><div>codecpriority=host</div><div>delayreject=yes</div><div>language=pt_BR</div><div>jitterbuffer=no</div><div>minregexpire=60</div>

<div>maxregexpire=3600</div></div><div><br></div>Os outros arquivos incluídos no iax.conf estão vazios.<div><br></div><div><div>Murilo Lima<br>
</div></div>