<div dir="ltr"><div><div>Somebody have at least an idea if this is suposed to work ?<br><br></div>the package come to me, i check the did, change the $ru, and send to the location, the location find the user and the package dont reach the other side.<br>
<br></div>Thanks<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/22 Mike Tesliuk <span dir="ltr">&lt;<a href="mailto:mike@ultra.net.br" target="_blank">mike@ultra.net.br</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div><div><div><div>Hello Guys, <br><br><br>Im trying to implement a system to manipulate DID&#39;s, the forward for external address is ok, but in trying now to do the same with  a user that is registered <br>

<br><br></div>i create a new table where i have the did, the account and the destination, if the destination is null so the opensips will check the account on the location table.<br><br></div>basically i have this<br><br>

if(!$avp(91)){<br>                                        xlog(&quot;Did nao encontrado&quot;);<br>                                        sl_send_reply(&quot;404&quot;, &quot;Not Found&quot;);<br>                                        exit;<br>

                                }else{<br>                                        xlog(&quot;Did encontrado, seguindo regras para utilizacao em location&quot;);<br>                                        $ru = &quot;sip:&quot; + $avp(91) + &quot;@IP_ADDRESS:5060&quot;;<br>

                                        xlog(&quot;Novo destino $ru&quot;);<br>                                }<br><br><br></div>the avp(91) is the user account, the same that the user use to register<br><br><br></div>when in this situation, the call go trouhg the location module, and the system find the correct address.<br>

<br></div>i have on the log the same information that i have on opensipsctl ul show<br><br>Fazendo relay &lt;null&gt; - sip:055011395010100000@IP_ADDR:5081;rinstance=0f9054bc313f0cf1;transport=UDP<br><br><br></div>below the output from ul show<br>

<br>    AOR:: 055011395010100000<br>        Contact:: sip:055011395010100000@IP_ADDR:5081;rinstance=0f9054bc313f0cf1;transport=UDP Q=<br>            Expires:: 525<br>            Callid:: MTZhNzE1ZDYzYWU4Y2ViZDMzZTQzZWU1N2M0ZGFiZjQ.<br>

            Cseq:: 2<br>            User-agent:: Zoiper Communicator 2.04.10164 rev.10204<br>            State:: CS_SYNC<br>            Flags:: 0<br>            Cflag:: 0<br>            Socket:: udp:GW_IP_ADDR:5060<br>            Methods:: 5951<br>

<br><div><br><br></div><div>But when i make the call, the ngrep show me the send of the invite, but i dont see nothing on the other side.<br><br><br></div><div>Below you have the invite<br><br>U GW_IP_ADDR:5060 -&gt; CUSTOMER_IP_ADDR:5081<br>

INVITE sip:055011395010100000@CUSTOMER_IP_ADDR:5081;rinstance=0f9054bc313f0cf1;transport=UDP SIP/2.0.<br>Record-Route: &lt;sip:GW_IP_ADDR;lr;ftag=as657116d5;did=5b6.6e3954b;nat=yes&gt;.<br>Via: SIP/2.0/UDP GW_IP_ADDR:5060;branch=z9hG4bK485d.8be72863.0.<br>

Via: SIP/2.0/UDP CALLER_IP_ADDR:5060;received=CALLER_IP_ADDR;branch=z9hG4bK1f912c35;rport=5060.<br>Max-Forwards: 69.<br>From: &quot;testemike&quot; &lt;sip:testemike@CALLER_IP_ADDR&gt;;tag=as657116d5.<br>To: &lt;sip:551133992377@GW_IP_ADDR&gt;.<br>

Contact: &lt;sip:testemike@CALLER_IP_ADDR:5060&gt;.<br>Call-ID: 40d32e5b3c52c58646d996d871ad8471@CALLER_IP_ADDR:5060.<br>CSeq: 102 INVITE.<br>User-Agent: SIP.Ultranet.<br>Date: Mon, 23 Sep 2013 00:20:27 GMT.<br>Session-Expires: 600.<br>

Min-SE: 90.<br>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH.<br>Supported: replaces, timer.<br>Content-Type: application/sdp.<br>Content-Length: 446.<br>.<br>v=0.<br>o=root 985357135 985357135 IN IP4 CALLER_IP_ADDR.<br>

s=SDP.Ultranet.<br>c=IN IP4 GW_IP_ADDRGW_IP_ADDR.<br>t=0 0.<br>m=audio 4229242292 RTP/AVP 8 0 3 111 97 18 101.<br>a=rtpmap:8 PCMA/8000.<br>a=rtpmap:0 PCMU/8000.<br>a=rtpmap:3 GSM/8000.<br>a=rtpmap:111 G726-32/8000.<br>a=rtpmap:97 iLBC/8000.<br>

a=fmtp:97 mode=30.<br>a=rtpmap:18 G729/8000.<br>a=fmtp:18 annexb=no.<br>a=rtpmap:101 telephone-event/8000.<br>a=fmtp:101 0-16.<br>a=ptime:20.<br>a=sendrecv.<br>a=nortpproxy:yes.<br>a=nortpproxy:yes.<br><br><br></div><div>

after the invite, i get a request timeout message<br><br></div><div>i try to create some firewall rules on the customer side but i dont see any package, from the opensips is like the package is beeing sended<br><br></div>

<div>i made a try using another machine that dont have nat and i cant see the package in this case too.<br><br><br></div><div><br></div><div>anyone have an idea about this ?<br><br></div><div>Thanks.<br></div></div>
</blockquote></div><br></div>