<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>Asterisk 1.4.x e canreinvite=update</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P ALIGN=LEFT><SPAN LANG="pt-br"><FONT SIZE=2 FACE="Arial">Pessoal:</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="pt-br"><FONT SIZE=2 FACE="Arial">No</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"> <FONT SIZE=2 FACE="Arial">arquivo</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"> <FONT SIZE=2 FACE="Arial">sip.conf</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"><FONT SIZE=2 FACE="Arial">.sample do Asterisk 1.4.x, informa que a media pode ser redirecionada</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"> <FONT SIZE=2 FACE="Arial">entre os dispositivos SIP</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"><FONT SIZE=2 FACE="Arial">, de forma que a voz pode passar diretamente entre eles,</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"><FONT SIZE=2 FACE="Arial"> sem precisar fazer um re-invite conforme</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"> <FONT SIZE=2 FACE="Arial">explicado</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"> <FONT SIZE=2 FACE="Arial">abaixo</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"><FONT SIZE=2 FACE="Arial">.</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="pt-br"><FONT SIZE=2 FACE="Arial">Quem está usando o Asterisk 1.4.x?</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"> <FONT SIZE=2 FACE="Arial">Sabe informa</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"><FONT SIZE=2 FACE="Arial">r</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"><FONT SIZE=2 FACE="Arial"> se isso está funciona</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"><FONT SIZE=2 FACE="Arial">n</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"><FONT SIZE=2 FACE="Arial">do assim mesmo?</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="pt-br"><FONT SIZE=2 FACE="Arial">Se</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"> <FONT SIZE=2 FACE="Arial">estiver funcionando</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"> <FONT SIZE=2 FACE="Arial">assim</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"><FONT SIZE=2 FACE="Arial"> talvez tenha resolvido um dos maiores gargalos do Asterisk.</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"><FONT SIZE=2 FACE="Arial"> Porque agora podemos mandar</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"> <FONT SIZE=2 FACE="Arial">dígitos</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"><FONT SIZE=2 FACE="Arial"> no header do SIP em vez do RTP.</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="pt-br"><FONT SIZE=2 FACE="Arial">Alguém</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"><FONT SIZE=2 FACE="Arial"> já testou isso?</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"></SPAN></P>
<BR>

<P ALIGN=LEFT><SPAN LANG="pt-br"><FONT SIZE=2 FACE="Arial">Cléviton.</FONT></SPAN></P>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">;----------------------------------- MEDIA HANDLING --------------------------------</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">; By default, Asterisk tries to re-invite the audio to an optimal path. If there's</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">; no reason for Asterisk to stay in the media path, the media will be redirected.</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">; This does not really work with in the case where Asterisk is outside and have</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">; clients on the inside of a NAT. In that case, you want to set canreinvite=nonat</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">;</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">;canreinvite=yes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Asterisk by default tries to redirect the</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">; RTP media stream (audio) to go directly from</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">; the caller to the callee.&nbsp; Some devices do not</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">; support this (especially if one of them is behind a NAT).</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">; The default setting is YES. If you have all clients</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">; behind a NAT, or for some other reason wants Asterisk to</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">; stay in the audio path, you may want to turn this off.</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">; In Asterisk 1.4 this setting also affect direct RTP</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">; at call setup (a new feature in 1.4 - setting up the</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">; call directly between the endpoints instead of sending</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">; a re-INVITE).</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">;canreinvite=nonat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; An additional option is to allow media path redirection</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">; (reinvite) but only when the peer where the media is being</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">; sent is known to not be behind a NAT (as the RTP core can</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">; determine it based on the apparent IP address the media</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">; arrives from).</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">;canreinvite=update&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Yet a third option... use UPDATE for media path redirection,</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">; instead of INVITE. This can be combined with 'nonat', as</FONT></SPAN></P>

<P ALIGN=LEFT><SPAN LANG="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">; 'canreinvite=update,nonat'. It implies 'yes'.</FONT></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="pt-br"></SPAN><SPAN LANG="en-us"></SPAN></P>
<BR>
<BR>
<BR>

</BODY>
</HTML>