<div dir="ltr">Ok, the problem is caused by an engage_rtp_proxy() , i remove this options and everything seems to work now.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/25 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>I dont know exactly why ( im trying to find this why ), if i after check te $ru immediatly call the lookup , and send to the relay the package reach the destination , i will now investigate which rule cause the problem.<br>

<br></div>if you guys find something on the log that i send please tell me<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/25 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>Hello Vlad, first of all thanks for your reply .<br><br><br></div>Below some information that i hope you can check , in advice i say that the package dont go out from opensips, i see on the debug, but i dont see the package on my router (near opensips)<br>


<br></div>i change the ip address information below to this<br><div><br><br><br>___ASTERISK___DESTINATION___ = the final destination of the call<br><br>____OPENSIPS___IP___ = the opensips ip address<br><br>___ASTERISK_ORIGINATE____ = the asterisk that originate the call to opensips<br>


<br> <br><br></div><div>Just to remember the case, i receive on opensips a call  did@opensips_ip , i check everything , and change the $ru to account@opensips_ip  and send to lookup(location), the user was find and the send to t_relay <br>


<br></div><div>I will apreciate a lot if you or someone else can check the logs below because i can&#39;t figure out why this is not working, i dont see any relevant message on log about the packege, everything seems to be executed, the only strange thing that i check is this information (<br>


<br>Sep 25 21:22:19 [25420] DBG:tm:matching_3261: RFC3261 transaction matching failed<br>Sep 25 21:22:19 [25420] DBG:tm:t_lookup_request: no transaction found<br>Sep 25 21:22:19 [25420] DBG:tm:run_reqin_callbacks: trans=0x7fd613156710, callback type 1, id 2 entered<br>


Sep 25 21:22:19 [25420] DBG:core:parse_headers: flags=78<br>Sep 25 21:22:19 [25420] DBG:dialog:new_dlg_val: inserting &lt;accX_created&gt;=&lt;K?CR&gt;<br>Sep 25 21:22:19 [25420] DBG:rr:is_direction: param ftag not found<br>


<br><br>)<br><br><br></div><div>im using for this test an opensips 1.9.1 <br><br><br>thanks in advice for any help that you guys can provide.<br></div><div><br><br><br>opensipsctl ul show<br><br>Domain:: location table=512 records=1<br>


    AOR:: 055011395010100000<br>        Contact:: sip:s@___ASTERISK___DESTINATION___:5060 Q=<br>            Expires:: 94<br>            Callid:: 2dd8bd5d6570d1a47caa8ec67ae4197b@___ASTERISK___DESTINATION___<br>            Cseq:: 103<br>


            User-agent:: PBXUltranet<div><br>            State:: CS_SYNC<br>            Flags:: 0<br>            Cflag:: 0<br></div>            Socket:: udp:____OPENSIPS___IP___:5060<br>            Methods:: 4294967295<br>

<br><br><br>
iptables -L -n<br><br>Chain INPUT (policy ACCEPT)<br>target     prot opt source               destination         <br><br>Chain FORWARD (policy ACCEPT)<br>target     prot opt source               destination         <br>

<br>
Chain OUTPUT (policy ACCEPT)<br>target     prot opt source               destination   <br><br><br><br><br>----- tcpdump on opensips ------<br><br><br>21:17:51.194560 16:44:c7:4e:35:2d &gt; 00:30:48:94:6d:b6, ethertype IPv4 (0x0800), length 1261: (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 1247)<br>


    ____OPENSIPS___IP___.5060 &gt; ___ASTERISK___DESTINATION___.5060: [bad udp cksum fe56!] SIP, length: 1219<br>    INVITE sip:s@___ASTERISK___DESTINATION___:5060 SIP/2.0<br><br><br><br><br>on my router i don&#39;t see any package, on the debug i have the result below<br>


<br><br><br>Sep 25 21:22:19 [25420] DBG:core:parse_msg: SIP Request:<br>Sep 25 21:22:19 [25420] DBG:core:parse_msg:  method:  &lt;INVITE&gt;<br>Sep 25 21:22:19 [25420] DBG:core:parse_msg:  uri:     &lt;sip:551133992377@____OPENSIPS___IP___&gt;<br>


Sep 25 21:22:19 [25420] DBG:core:parse_msg:  version: &lt;SIP/2.0&gt;<br>Sep 25 21:22:19 [25420] DBG:core:parse_headers: flags=2<br>Sep 25 21:22:19 [25420] DBG:core:parse_via_param: found param type 232, &lt;branch&gt; = &lt;z9hG4bK2b4132f9&gt;; state=6<br>


Sep 25 21:22:19 [25420] DBG:core:parse_via_param: found param type 235, &lt;rport&gt; = &lt;n/a&gt;; state=17<br>Sep 25 21:22:19 [25420] DBG:core:parse_via: end of header reached, state=5<br>Sep 25 21:22:19 [25420] DBG:core:parse_headers: via found, flags=2<br>


Sep 25 21:22:19 [25420] DBG:core:parse_headers: this is the first via<br>Sep 25 21:22:19 [25420] DBG:core:receive_msg: After parse_msg...<br>Sep 25 21:22:19 [25420] DBG:core:receive_msg: preparing to run routing scripts...<br>


Sep 25 21:22:19 [25420] DBG:core:parse_headers: flags=ffffffffffffffff<br>Sep 25 21:22:19 [25420] DBG:core:parse_to: end of header reached, state=10<br>Sep 25 21:22:19 [25420] DBG:core:parse_to: display={}, ruri={sip:551133992377@____OPENSIPS___IP___}<br>


Sep 25 21:22:19 [25420] DBG:core:get_hdr_field: &lt;To&gt; [32]; uri=[sip:551133992377@____OPENSIPS___IP___] <br>Sep 25 21:22:19 [25420] DBG:core:get_hdr_field: to body [&lt;sip:551133992377@____OPENSIPS___IP___&gt;<br>]<br>


Sep 25 21:22:19 [25420] DBG:core:get_hdr_field: cseq &lt;CSeq&gt;: &lt;102&gt; &lt;INVITE&gt;<br>Sep 25 21:22:19 [25420] DBG:core:get_hdr_field: content_length=396<br>Sep 25 21:22:19 [25420] DBG:core:get_hdr_field: found end of header<br>


Sep 25 21:22:19 [25420] DBG:core:decode_mime_type: Decoding MIME type for:[application/sdp]<br>Sep 25 21:22:19 [25420] DBG:maxfwd:is_maxfwd_present: value = 70 <br>Sep 25 21:22:19 [25420] DBG:uri:has_totag: no totag<br>Sep 25 21:22:19 [25420] DBG:core:parse_headers: flags=78<br>


Sep 25 21:22:19 [25420] DBG:tm:t_lookup_request: start searching: hash=21685, isACK=0<br>Sep 25 21:22:19 [25420] DBG:tm:matching_3261: RFC3261 transaction matching failed<br>Sep 25 21:22:19 [25420] DBG:tm:t_lookup_request: no transaction found<br>


Sep 25 21:22:19 [25420] DBG:permissions:check_src_addr_3: Looking for : &lt;99, ___ASTERISK_ORIGINATE____, 5060, 1&gt; in tables<br>Sep 25 21:22:19 [25420] DBG:permissions:hash_match: no pattern to match<br>Sep 25 21:22:19 [25420] DBG:permissions:hash_match: match found in the hash table<br>


Sep 25 21:22:19 [25420] DBG:core:buf_init: initializing...<br>Chamada de entrada oriunda de ___ASTERISK_ORIGINATE____ para 551133992377Sep 25 21:22:19 [25420] DBG:avpops:ops_dbquery_avps: query [SELECT master,concurrency,dst FROM did WHERE did = &#39;551133992377&#39;]<br>


Sep 25 21:22:19 [25420] DBG:db_mysql:mysql_raise_event: MySQL status has not changed: connected<br>Sep 25 21:22:19 [25420] DBG:core:db_new_result: allocate 48 bytes for result set at 0x7fd61fcc8328<br>Sep 25 21:22:19 [25420] DBG:db_mysql:db_mysql_get_columns: 3 columns returned from the query<br>


Sep 25 21:22:19 [25420] DBG:core:db_allocate_columns: allocate 84 bytes for result columns at 0x7fd61fcc93d0<br>Sep 25 21:22:19 [25420] DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x7fd61fcc93e8)[0]=[master]<br>Sep 25 21:22:19 [25420] DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type<br>


Sep 25 21:22:19 [25420] DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x7fd61fcc93f8)[1]=[concurrency]<br>Sep 25 21:22:19 [25420] DBG:db_mysql:db_mysql_get_columns: use DB_INT result type<br>Sep 25 21:22:19 [25420] DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x7fd61fcc9408)[2]=[dst]<br>


Sep 25 21:22:19 [25420] DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type<br>Sep 25 21:22:19 [25420] DBG:core:db_allocate_rows: allocate 112 bytes for result rows and values at 0x7fd61fcc9440<br>Sep 25 21:22:19 [25420] DBG:db_mysql:db_mysql_str2val: converting STRING [055011395010100000]<br>


Sep 25 21:22:19 [25420] DBG:db_mysql:db_mysql_str2val: converting INT [1]<br>Sep 25 21:22:19 [25420] DBG:db_mysql:db_mysql_str2val: converting STRING []<br>Sep 25 21:22:19 [25420] DBG:avpops:db_query_avp: rows [1]<br>Sep 25 21:22:19 [25420] DBG:avpops:db_query_avp: row [0]<br>


Sep 25 21:22:19 [25420] DBG:avpops:db_close_query: close avp query<br>Sep 25 21:22:19 [25420] DBG:core:db_free_columns: freeing result columns at 0x7fd61fcc93d0<br>Sep 25 21:22:19 [25420] DBG:core:db_free_rows: freeing 1 rows<br>


Sep 25 21:22:19 [25420] DBG:core:db_free_row: freeing row values at 0x7fd61fcc9450<br>Sep 25 21:22:19 [25420] DBG:core:db_free_rows: freeing rows at 0x7fd61fcc9440<br>Sep 25 21:22:19 [25420] DBG:core:db_free_result: freeing result set at 0x7fd61fcc8328<br>


Did encontrado, seguindo regras para utilizacao em locationNovo destino sip:055011395010100000@____OPENSIPS___IP___:5060Sep 25 21:22:19 [25420] DBG:core:parse_headers: flags=200<br>Sep 25 21:22:19 [25420] DBG:rr:find_first_route: No Route headers found<br>


Sep 25 21:22:19 [25420] DBG:rr:loose_route: There is no Route HF<br>Sep 25 21:22:19 [25420] DBG:core:parse_to_param: tag=as12dd45c8<br>Sep 25 21:22:19 [25420] DBG:core:parse_to: end of header reached, state=29<br>Sep 25 21:22:19 [25420] DBG:core:parse_to: display={&quot;testemike&quot;}, ruri={sip:testemike@___ASTERISK_ORIGINATE____}<br>


Sep 25 21:22:19 [25420] DBG:rtpproxy:engage_rtp_proxy2_f: engage called from script<br>Sep 25 21:22:19 [25420] DBG:dialog:build_new_dlg: new dialog 0x7fd61314a418 (c=481350dc261b4c297700ab3c51395c55@___ASTERISK_ORIGINATE____:5060,f=sip:testemike@___ASTERISK_ORIGINATE____,t=sip:551133992377@____OPENSIPS___IP___,ft=as12dd45c8) on hash 1509<br>


Sep 25 21:22:19 [25420] DBG:core:parse_headers: flags=ffffffffffffffff<br>Sep 25 21:22:19 [25420] DBG:dialog:init_leg_info: route_set , contact sip:testemike@___ASTERISK_ORIGINATE____:5060, cseq 102 and bind_addr udp:____OPENSIPS___IP___:5060<br>


Sep 25 21:22:19 [25420] DBG:dialog:dlg_add_leg_info: set leg 0 for 0x7fd61314a418: tag=&lt;as12dd45c8&gt; rcseq=&lt;0&gt;<br>Sep 25 21:22:19 [25420] DBG:dialog:link_dlg: ref dlg 0x7fd61314a418 with 4 -&gt; 4 in h_entry 0x7fd613131f78 - 1509 <br>


Sep 25 21:22:19 [25420] DBG:rr:add_rr_param: adding (;did=5e5.91711eb7) 0x7fd61fcc98d8<br>Sep 25 21:22:19 [25420] DBG:core:parse_headers: flags=2000<br>Sep 25 21:22:19 [25420] DBG:rtpproxy:engage_rtp_proxy2_f: message has sdp body -&gt; forcing rtp proxy<br>


Sep 25 21:22:19 [25420] DBG:rtpproxy:force_rtp_proxy: force rtp proxy with param1 &lt;&gt; and param2 &lt;none&gt;<br>Sep 25 21:22:19 [25420] DBG:core:parse_headers: flags=40<br>Sep 25 21:22:19 [25420] DBG:rtpproxy:force_rtp_proxy: Forcing body:<br>


[v=0<br>o=root 1965651698 1965651698 IN IP4 ___ASTERISK_ORIGINATE____<br>s=SDP.Ultranet<br>c=IN IP4 ___ASTERISK_ORIGINATE____<br>t=0 0<br>m=audio 12566 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>


]<br>Sep 25 21:22:19 [25420] DBG:rtpproxy:force_rtp_proxy_body: proxy reply: 39410 ____OPENSIPS___IP___<br><br>Sep 25 21:22:19 [25420] DBG:dialog:new_dlg_val: inserting &lt;rtpproxy_1&gt;=&lt;&gt;<br>Sep 25 21:22:19 [25420] DBG:rtpproxy:engage_rtp_proxy2_f: stored values in dialog<br>


Sep 25 21:22:19 [25420] DBG:rtpproxy:engage_rtp_proxy2_f: registered engage_callback<br>Sep 25 21:22:19 [25420] DBG:core:grep_sock_info: checking if host==us: 11==11 &amp;&amp;  [____OPENSIPS___IP___] == [____OPENSIPS___IP___]<br>


Sep 25 21:22:19 [25420] DBG:core:grep_sock_info: checking if port 5060 matches port 5060<br>Sep 25 21:22:19 [25420] DBG:core:comp_scriptvar: int 20 : 0 / 1<br>Verificando locationSep 25 21:22:19 [25420] DBG:registrar:lookup: found a complete match<br>


Sep 25 21:22:19 [25420] DBG:registrar:lookup: setting as ruri &lt;sip:s@___ASTERISK___DESTINATION___:5060&gt;<br>Sep 25 21:22:19 [25420] DBG:registrar:lookup: looking for branches<br>Sep 25 21:22:19 [25420] DBG:rtpproxy:force_rtp_proxy: force rtp proxy with param1 &lt;(null)&gt; and param2 &lt;none&gt;<br>


Sep 25 21:22:19 [25420] DBG:core:parse_headers: flags=40<br>Sep 25 21:22:19 [25420] DBG:rtpproxy:force_rtp_proxy: Forcing body:<br>[v=0<br>o=root 1965651698 1965651698 IN IP4 ___ASTERISK_ORIGINATE____<br>s=SDP.Ultranet<br>


c=IN IP4 ___ASTERISK_ORIGINATE____<br>t=0 0<br>m=audio 12566 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>]<br>Sep 25 21:22:19 [25420] DBG:rtpproxy:force_rtp_proxy_body: proxy reply: 39410 ____OPENSIPS___IP___<br>


<br>Sep 25 21:22:19 [25420] DBG:rr:add_rr_param: adding (;nat=yes) 0x7fd61fcc9de8<br>Sep 25 21:22:19 [25420] DBG:core:pv_get_dsturi: no destination URI<br>Fazendo relay &lt;null&gt; - sip:s@___ASTERISK___DESTINATION___:5060Sep 25 21:22:19 [25420] DBG:tm:t_newtran: transaction on entrance=(nil)<br>


Sep 25 21:22:19 [25420] DBG:core:parse_headers: flags=ffffffffffffffff<br>Sep 25 21:22:19 [25420] DBG:core:parse_headers: flags=78<br>Sep 25 21:22:19 [25420] DBG:tm:t_lookup_request: start searching: hash=21685, isACK=0<br>


Sep 25 21:22:19 [25420] DBG:tm:matching_3261: RFC3261 transaction matching failed<br>Sep 25 21:22:19 [25420] DBG:tm:t_lookup_request: no transaction found<br>Sep 25 21:22:19 [25420] DBG:tm:run_reqin_callbacks: trans=0x7fd613156710, callback type 1, id 2 entered<br>


Sep 25 21:22:19 [25420] DBG:core:parse_headers: flags=78<br>Sep 25 21:22:19 [25420] DBG:dialog:new_dlg_val: inserting &lt;accX_created&gt;=&lt;K?CR&gt;<br>Sep 25 21:22:19 [25420] DBG:rr:is_direction: param ftag not found<br>


Sep 25 21:22:19 [25420] DBG:tm:run_reqin_callbacks: trans=0x7fd613156710, callback type 1, id 1 entered<br>Sep 25 21:22:19 [25420] DBG:siptrace:trace_onreq_in: trace off...<br>Sep 25 21:22:19 [25420] DBG:tm:run_reqin_callbacks: trans=0x7fd613156710, callback type 1, id 0 entered<br>


Sep 25 21:22:19 [25420] DBG:dialog:dlg_onreq: t hash_index = 21685, t label = 931045251<br>Sep 25 21:22:19 [25420] DBG:dialog:get_dlg_timeout: invalid AVP value, use default timeout<br>Sep 25 21:22:19 [25420] DBG:core:parse_headers: flags=ffffffffffffffff<br>


Sep 25 21:22:19 [25420] DBG:core:_shm_resize: resize(0) called<br>Sep 25 21:22:19 [25420] DBG:tm:_reply_light: reply sent out. buf=0x7fd61fcca4f0: SIP/2.0 1..., shmem=0x7fd61315a0d0: SIP/2.0 1<br>Sep 25 21:22:19 [25420] DBG:tm:_reply_light: finished<br>


Nova perna criada sip:s@___ASTERISK___DESTINATION___:5060Sep 25 21:22:19 [25420] DBG:core:mk_proxy: doing DNS lookup...<br>Sep 25 21:22:19 [25420] DBG:core:parse_headers: flags=2000<br>Sep 25 21:22:19 [25420] DBG:core:parse_headers: flags=ffffffffffffffff<br>


Sep 25 21:22:19 [25420] DBG:core:clen_builder: content-length: 448 (448)<br>Sep 25 21:22:19 [25420] DBG:tm:set_timer: relative timeout is 500000<br>Sep 25 21:22:19 [25420] DBG:tm:insert_timer_unsafe: [4]: 0x7fd613156930 (10600000)<br>


Sep 25 21:22:19 [25420] DBG:tm:set_timer: relative timeout is 5<br>Sep 25 21:22:19 [25420] DBG:tm:insert_timer_unsafe: [0]: 0x7fd613156960 (15)<br>Sep 25 21:22:19 [25420] DBG:tm:t_relay_to: new transaction fwd&#39;ed<br>

Sep 25 21:22:19 [25420] DBG:tm:t_unref: UNREF_UNSAFE: [0x7fd613156710] after is 0<br>
Sep 25 21:22:19 [25420] DBG:dialog:unref_dlg: unref dlg 0x7fd61314a418 with 1 -&gt; 3 in entry 0x7fd613131f78<br>Sep 25 21:22:19 [25420] DBG:core:destroy_avp_list: destroying list (nil)<br>Sep 25 21:22:19 [25420] DBG:core:receive_msg: cleaning up<br>


Sep 25 21:22:19 [25423] DBG:tm:utimer_routine: timer routine:4,tl=0x7fd613156930 next=(nil), timeout=10600000<br>Sep 25 21:22:19 [25423] DBG:tm:retransmission_handler: retransmission_handler : request resending (t=0x7fd613156710, INVITE si ... )<br>


Sep 25 21:22:19 [25423] DBG:tm:set_timer: relative timeout is 1000000<br>Sep 25 21:22:19 [25423] DBG:tm:insert_timer_unsafe: [5]: 0x7fd613156930 (11600000)<br>Sep 25 21:22:19 [25423] DBG:tm:retransmission_handler: retransmission_handler : done<br>


Sep 25 21:22:20 [25423] DBG:tm:utimer_routine: timer routine:5,tl=0x7fd613156930 next=(nil), timeout=11600000<br>Sep 25 21:22:20 [25423] DBG:tm:retransmission_handler: retransmission_handler : request resending (t=0x7fd613156710, INVITE si ... )<br>


Sep 25 21:22:20 [25423] DBG:tm:set_timer: relative timeout is 2000000<br>Sep 25 21:22:20 [25423] DBG:tm:insert_timer_unsafe: [6]: 0x7fd613156930 (13600000)<br>Sep 25 21:22:20 [25423] DBG:tm:retransmission_handler: retransmission_handler : done<br>


Sep 25 21:22:23 [25423] DBG:tm:utimer_routine: timer routine:6,tl=0x7fd613156930 next=(nil), timeout=13600000<br>Sep 25 21:22:23 [25423] DBG:tm:retransmission_handler: retransmission_handler : request resending (t=0x7fd613156710, INVITE si ... )<br>


Sep 25 21:22:23 [25423] DBG:tm:set_timer: relative timeout is 4000000<br>Sep 25 21:22:23 [25423] DBG:tm:insert_timer_unsafe: [7]: 0x7fd613156930 (17600000)<br>Sep 25 21:22:23 [25423] DBG:tm:retransmission_handler: retransmission_handler : done<br>


Sep 25 21:22:25 [25423] DBG:tm:timer_routine: timer routine:0,tl=0x7fd613156960 next=(nil), timeout=15<br>Sep 25 21:22:25 [25423] DBG:tm:final_response_handler: Cancel sent out, sending 408 (0x7fd613156710)<br>Sep 25 21:22:25 [25423] DBG:tm:t_should_relay_response: T_code=100, new_code=408<br>


Sep 25 21:22:25 [25423] DBG:tm:t_pick_branch: picked branch 0, code 408 (prio=800)<br>Sep 25 21:22:25 [25423] DBG:tm:is_3263_failure: dns-failover test: branch=0, last_recv=408, flags=1<br>Sep 25 21:22:25 [25423] DBG:tm:t_should_relay_response: trying DNS-based failover<br>


Sep 25 21:22:25 [25423] DBG:tm:run_trans_callbacks: trans=0x7fd613156710, callback type 32, id 2 entered<br><br><br></div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/9/25 Vlad Paiu <span dir="ltr">&lt;<a href="mailto:vladpaiu@opensips.org" target="_blank">vladpaiu@opensips.org</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Hello,<br>
      <br>
      The approach you&#39;re taking seems good, and it should definitely
      work.<br>
      <br>
      Do you receive any errors in the OpenSIPS logs ? If you make a SIP
      trace ( ngrep / tcpdump ) on the OpenSIPS machine, do you see the
      INVITE message getting out of OpenSIPS ? <br>
      <br>
      If you don&#39;t see the package being sent out even on the OpenSIPS
      machine, then it means that somehow your script doesn&#39;t forward
      that request, but drops it ( because ngrep on the OpenSIPS machine
      excludes any firewall issues - ngrep gets in even before the local
      iptables output chain ).<br>
      <br>
      Best Regards,<br>
      <pre cols="72">Vlad Paiu
OpenSIPS Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a>
</pre><div><div>
      On <a href="tel:25.09.2013%2015" value="+12509201315" target="_blank">25.09.2013 15</a>:36, Mike Tesliuk wrote:<br>
    </div></div></div>
    <blockquote type="cite"><div><div>
      <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>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>