<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="IncrediMail 1.0">
<STYLE>v\:* {
        BEHAVIOR: url (#default#vml)
}
</STYLE>

<!--IncrdiXMLRemarkStart>
<IncrdiX-Info>
<X-FID>B433CDFE-B71C-42C2-A5C1-D34C076A9851</X-FID>
<X-FVER></X-FVER>
<X-FIT></X-FIT>
<X-FILE></X-FILE>
<X-FCOL></X-FCOL>
<X-FCAT></X-FCAT>
<X-FDIS></X-FDIS>
<X-Extensions></X-Extensions>
<X-BG></X-BG>
<X-BGT>repeat</X-BGT>
<X-BGC>#ffffff</X-BGC>
<X-BGPX></X-BGPX>
<X-BGPY></X-BGPY>
<X-ASN></X-ASN>
<X-ASNF></X-ASNF>
<X-ASH></X-ASH>
<X-ASHF></X-ASHF>
<X-AN></X-AN>
<X-ANF></X-ANF>
<X-AP></X-AP>
<X-APF></X-APF>
<X-AD></X-AD>
<X-ADF></X-ADF>
<X-AUTO>X-ASN,X-ASH,X-AN,X-AP,X-AD</X-AUTO>
<X-CNT>;</X-CNT>
</IncrdiX-Info>
<IncrdiXMLRemarkEnd-->
</HEAD>
<BODY bottomMargin=5 leftMargin=5 rightMargin=5 scroll=yes topMargin=5 bgColor=#ffffff marginheight="0" marginwidth="0" webfixed="1">
<TABLE id=INCREDIMAINTABLE border=0 cellSpacing=0 cellPadding=0 width="100%" background="" bgColor=#ffffff height="100%">
<TBODY>
<TR>
<TD style="POSITION: relative; PADDING-BOTTOM: 20px; PADDING-LEFT: 20px; PADDING-RIGHT: 20px; FONT-FAMILY: Verdana; DIRECTION: ltr; COLOR: #1c3966; FONT-SIZE: 12pt; PADDING-TOP: 20px" id=INCREDITEXTREGION vAlign=top>
<DIV style="PADDING-LEFT: 2px" id=INCREDI_TEXT_AREA>
<DIV>Boa tarde amigo.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Tenho esse tipo de solução rodando com Opensips 1.5, Kamailio 1.5 e Kamailio&nbsp;3.0.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Poste como está seu sip.conf e seu openser.cfg.&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Os passos para esse tipo de integração é simples. Visto que&nbsp;o&nbsp;OpenSIPS deve rodar em uma porta, e o asterisl em outra, segue-se a lógica:</DIV>
<DIV>&nbsp;</DIV>
<UL>
<LI>Asterisk deve estar impedido de receber REGISTER.</LI>
<LI>Asterisk só aceita chamadas do sip opensips que vc deve cadastrar como peer no sip.conf</LI>
<LI>OpenSIPS gerencia REGISTER, chamadas de voipxvoip e Roteamento para o Asteris.</LI></UL>
<DIV>Mas sem seus arquivos de configuração e uma melhor explicação do seu cenário fica meio difícil ajudar.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV style="FONT-FAMILY: Verdana; FONT-SIZE: 12pt" dir=ltr id=IncrediOriginalFontSize>
<DIV id=INCREDISIGNATUREID ondrag="return false;">
<DIV style="FONT-FAMILY: Times New Roman"><FONT size=2>____________________________________</FONT></DIV>
<DIV style="FONT-FAMILY: Times New Roman"><FONT size=2>Fernando da Silva Santos</FONT></DIV>
<DIV style="FONT-FAMILY: Times New Roman"><FONT size=2>Desenvolvedor - 7Billing</FONT></DIV>
<DIV style="FONT-FAMILY: Times New Roman"><FONT size=2>http://<A href="http://www.7billing.com.br/">www.7billing.com.br</A></FONT></DIV></DIV>
<DIV style="FONT-SIZE: 11pt" dir=ltr id=IncrediOriginalMessage><I>-------Original Message-------</I></DIV>
<DIV>&nbsp;</DIV>
<DIV id=receivestrings>
<DIV style="FONT-SIZE: 11pt" dir=ltr><I><B>From:</B></I> <A href="mailto:marcelobaxo@hotmail.com">marcelo ferreira</A></DIV>
<DIV style="FONT-SIZE: 11pt" dir=ltr><I><B>Date:</B></I> 13/10/2010 19:39:15</DIV>
<DIV style="FONT-SIZE: 11pt" dir=ltr><I><B>To:</B></I> <A href="mailto:asteriskbrasil@listas.asteriskbrasil.org">asteriskbrasil@listas.asteriskbrasil.org</A></DIV>
<DIV style="FONT-SIZE: 11pt" dir=ltr><I><B>Subject:</B></I> [AsteriskBrasil] Opensips + msg erro asterisk</DIV></DIV>
<DIV>&nbsp;</DIV>Pessoal,<BR>sou novato ainda nas tecnologias sip+asterisk+opensips+afins.<BR>Mas estou trabalhando e estudando há lgum tempo.<BR>Então, esta semana eu configurei um Opensips em um servidor (A) e o Asterisk em um servidor (B).<BR><BR>As primeiras configurações e testes pelos quais passei foi ligar de ramal para ramal utilizando somente o opensips. Deram OK.<BR><BR>A partir disso, efetuei o rewrite do osips para enviar chamadas pstn para os troncos do asterisk e serem bilhetadas no A2Billing.<BR><BR>Bem o problema é que agora aparece o (famoso) warning: username mismatch, have &lt;100.200.250.1&gt;, digest has &lt;35418&gt;.<BR>Com o debug ativado, o cabeçalho é o seguinte:<BR>O opensips está no ip 100.200.250.1<BR>O meu softphone é o 150.150.200.132<BR><BR>&lt;--- SIP read from UDP:100.200.250.1:5060 ---&gt;<BR>INVITE sip:01799998888@sip.liguetone.com.br SIP/2.0<BR>Record-Route: &lt;sip:100.200.250.1;lr=on;ftag=eubeh&gt;<BR>Via: SIP/2.0/UDP 100.200.250.1;branch=z9hG4bKded3.f8b73e07.0<BR>Via: SIP/2.0/UDP 192.168.0.18:5060;received=150.150.200.132;rport=5060;branch=z9hG4bKkhfpcdbl<BR>Max-Forwards: 69<BR>To: &lt;sip:01799998888@100.200.250.1&gt;<BR>From: "35418" &lt;sip:35418@100.200.250.1&gt;;tag=eubeh<BR>Call-ID: soljjmshjthguwo@calango<BR>CSeq: 616 INVITE<BR>Contact: &lt;sip:35418@192.168.0.18:5060&gt;<BR>Content-Type: application/sdp<BR>Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,REFER,NOTIFY,SUBSCRIBE,INFO,MESSAGE<BR>Supported: replaces,norefersub,100rel<BR>User-Agent: Twinkle/1.4.2<BR>Content-Length: 308<BR><BR>Bem, a partir dessa tentativa, o asterisk está mostrando o warning e depois responde com 403: Forbidden.<BR><BR>No asterisk configurei um contexto padrão "context=opensips"<BR>e inclusive já tentei o "Autocreatepeer=yes" que não fez diferença.<BR><BR>Tentei utilizar no osips o uac_replace_from setando para o numero do ramal, mas fica na mesma (óbvio :)<BR>e tentei colocar alguns cabeçalhos no osips para testar se era algum parâmetro que falta pro asterisk.<BR><BR>O que os senhores acham? Eu tenho de enviar/alterar algum cabeçalho pelo osips?<BR>Eu estou fazendo dessa maneira simplesmente para poder aproveitar o meu A2Billing que já está em produção no asterisk.<BR><BR>Abraços e muito obrigado!<BR><BR>Marcelo Amorim Ferreira<BR>
<DIV>&nbsp;</DIV></DIV></DIV></TD>
<TD vAlign=bottom width=1 align=right><IMG src="cid:D4658ECC-7D20-4AEC-B924-95A612AB2B50"></TD></TR></TBODY></TABLE></BODY></HTML>