<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Greetings:<br>


<div>
<div>
<div><br>

I am trying to play an announcement to my Caller/Alice before Callee/Bob
 gets the B-leg Invite. Can rtpproxy_stream2uac do what I need to do 
according to " invoking the <font face="Courier New" size="-1">rtpproxy_stream2uac</font>
 in the request processing
block on ACK transaction will play the prompt to the UA that has 
generated original INVITE and ACK...." ? I am not sure I really 
understood the purpose of playing announcements to "Alice" at ACK 
transaction.<br>

<br>

According to the log I have, my rtpproxy actually tried to play the 
audio with codec 0 and it doesn't seem to have any problems from the log
 file below. However I didn't here anything and I didn't get any rtp 
stream out from my rtpproxy.<br>

<br>

Can someone please tell me about how it works and give me some hints?<br>

<br>

Thank you,<br>

<br>

(Enclosed is the detail log)<br>

<br>

&nbsp;&nbsp;&nbsp; # account only INVITEs<br>

&nbsp;&nbsp;&nbsp; if (is_method("INVITE")) {<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; create_dialog();<br>

<b>xlog("==== aaaaa");</b><b><br>

rtpproxy_offer();</b><b><br>

rtpproxy_stream2uac("/usr/local/bin/tt_frank.wav", "5");</b><b><br>

xlog("==== bbbb");</b><br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; setflag(ACC_DO); # do accounting<br>

&nbsp;&nbsp;&nbsp; }<br>

<br>

&nbsp;&nbsp;&nbsp; if (!uri==myself) {<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; append_hf("P-hint: outbound\r\n"); <br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; route(relay);<br>

&nbsp;&nbsp;&nbsp; }<br>

<br>

&nbsp;&nbsp;&nbsp; # requests for my domain<br>

&nbsp;&nbsp;&nbsp; if (is_method("PUBLISH|SUBSCRIBE"))<br>

&nbsp;&nbsp;&nbsp; {<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sl_send_reply("503", "Service Unavailable");<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; exit;<br>

&nbsp;&nbsp;&nbsp; }<br>

<br>

&nbsp;&nbsp;&nbsp; if (is_method("REGISTER"))<br>

&nbsp;&nbsp;&nbsp; {<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (&nbsp;&nbsp; 0 ) setflag(TCP_PERSISTENT);<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (!save("location"))<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sl_reply_error();<br>

<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; exit;<br>

&nbsp;&nbsp;&nbsp; }<br>

<br>

&nbsp;&nbsp;&nbsp; if ($rU==NULL) {<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # request with no Username in RURI<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sl_send_reply("484","Address Incomplete");<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; exit;<br>

&nbsp;&nbsp;&nbsp; }<br>

<br>

&nbsp;&nbsp;&nbsp; # do lookup with method filtering<br>

&nbsp;&nbsp;&nbsp; if (!lookup("location","m")) {<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; t_newtran();<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; t_reply("404", "Not Found");<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; exit;<br>

&nbsp;&nbsp;&nbsp; } <br>

<br>

&nbsp;&nbsp;&nbsp; # when routing via usrloc, log the missed calls also<br>

&nbsp;&nbsp;&nbsp; setflag(ACC_MISSED);<br>

&nbsp;&nbsp;&nbsp; route(relay);<br>

}<br>

<br>

===============================<br>

<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_msg: SIP Request:<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_msg:&nbsp; method:&nbsp; &lt;INVITE&gt;<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_msg:&nbsp; uri:&nbsp;&nbsp;&nbsp;&nbsp; &lt;sip:1001@192.168.122.213&gt;<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_msg:&nbsp; version: &lt;SIP/2.0&gt;<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=2<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_via_param: found param type 235, &lt;rport&gt; = &lt;n/a&gt;; state=6<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_via_param: found param 
type 232, &lt;branch&gt; = 
&lt;z9hG4bKPjd9cf9a60-e85e-43e1-bb72-2bf6c3594249&gt;; state=16<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_via: end of header reached, state=5<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_headers: via found, flags=2<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_headers: this is the first via<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=ffffffffffffffff<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_to: end of header reached, state=10<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_to: display={}, ruri={sip:1001@192.168.122.213}<br>

/usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: &lt;To&gt; [28]; uri=[sip:1001@192.168.122.213] <br>

/usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: to body [&lt;sip:1001@192.168.122.213&gt;#015#012]<br>

/usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: cseq &lt;CSeq&gt;: &lt;17555&gt; &lt;INVITE&gt;<br>

/usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: content_length=243<br>

/usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: found end of header<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_to_param: tag=78872ef9-3f6e-4624-a4f2-46b2300278c7<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_to: end of header reached, state=29<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_to: display={}, ruri={sip:1000@192.168.122.213}<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_msg: SIP Request:<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_msg:&nbsp; method:&nbsp; &lt;INVITE&gt;<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_msg:&nbsp; uri:&nbsp;&nbsp;&nbsp;&nbsp; &lt;sip:1001@192.168.122.213&gt;<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_msg:&nbsp; version: &lt;SIP/2.0&gt;<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=2<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_via_param: found param type 235, &lt;rport&gt; = &lt;n/a&gt;; state=6<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_via_param: found param 
type 232, &lt;branch&gt; = 
&lt;z9hG4bKPjd9cf9a60-e85e-43e1-bb72-2bf6c3594249&gt;; state=16<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_via: end of header reached, state=5<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_headers: via found, flags=2<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_headers: this is the first via<br>

/usr/local/sbin/opensips[2620]: DBG:core:receive_msg: After parse_msg...<br>

/usr/local/sbin/opensips[2620]: DBG:core:receive_msg: preparing to run routing scripts...<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=100<br>

/usr/local/sbin/opensips[2620]: DBG:maxfwd:is_maxfwd_present: value = 70 <br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=8<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_to: end of header reached, state=10<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_to: display={}, ruri={sip:1001@192.168.122.213}<br>

/usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: &lt;To&gt; [28]; uri=[sip:1001@192.168.122.213] <br>

/usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: to body [&lt;sip:1001@192.168.122.213&gt;#015#012]<br>

/usr/local/sbin/opensips[2620]: DBG:uri:has_totag: no totag<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=78<br>

/usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: cseq &lt;CSeq&gt;: &lt;17555&gt; &lt;INVITE&gt;<br>

/usr/local/sbin/opensips[2620]: DBG:tm:t_lookup_request: start searching: hash=2984, isACK=0<br>

/usr/local/sbin/opensips[2620]: DBG:tm:matching_3261: RFC3261 transaction matching failed<br>

/usr/local/sbin/opensips[2620]: DBG:tm:t_lookup_request: no transaction found<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_to_param: tag=78872ef9-3f6e-4624-a4f2-46b2300278c7<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_to: end of header reached, state=29<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_to: display={}, ruri={sip:1000@192.168.122.213}<br>

/usr/local/sbin/opensips[2620]: DBG:core:grep_sock_info: checking if 
host==us: 15==15 &amp;&amp;&nbsp; [192.168.122.213] == [192.168.122.213]<br>

/usr/local/sbin/opensips[2620]: DBG:core:grep_sock_info: checking if port 5060 matches port 5060<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=200<br>

/usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: content_length=243<br>

/usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: found end of header<br>

/usr/local/sbin/opensips[2620]: DBG:rr:find_first_route: No Route headers found<br>

/usr/local/sbin/opensips[2620]: DBG:rr:loose_route: There is no Route HF<br>

/usr/local/sbin/opensips[2620]: DBG:dialog:build_new_dlg: new dialog 
0x7f9b56d57d58 
(c=f3600248-f58b-4434-bba5-902ca597cc6b,f=sip:1000@192.168.122.213,t=sip:1001@192.168.122.213,ft=78872ef9-3f6e-4624-a4f2-46b2300278c7)
 on hash 3756<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=ffffffffffffffff<br>

/usr/local/sbin/opensips[2620]: DBG:dialog:init_leg_info: route_set , 
contact sip:1000@192.168.40.100:5060, cseq 17555 and bind_addr 
udp:192.168.122.213:5060<br>

/usr/local/sbin/opensips[2620]: DBG:dialog:dlg_add_leg_info: set leg 0 
for 0x7f9b56d57d58: tag=&lt;78872ef9-3f6e-4624-a4f2-46b2300278c7&gt; 
rcseq=&lt;0&gt;<br>

/usr/local/sbin/opensips[2620]: DBG:dialog:link_dlg: ref dlg 0x7f9b56d57d58 with 3 -&gt; 3 in h_entry 0x7f9b56d45ee0 - 3756 <br>

/usr/local/sbin/opensips[2620]: DBG:rr:add_rr_param: adding (;did=cae.00e4a543) 0x7f9b5a68d9a8<br>

<b>/usr/local/sbin/opensips[2620]: ==== aaaaa</b><br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=ffffffffffffffff<br>

/usr/local/sbin/opensips[2620]: DBG:core:decode_mime_type: Decoding MIME type for:[application/sdp]<br>

/usr/local/sbin/opensips[2620]: DBG:rtpproxy:force_rtp_proxy: force rtp proxy with param1 &lt;none&gt; and param2 &lt;none&gt;<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=40<br>

/usr/local/sbin/opensips[2620]: DBG:rtpproxy:force_rtp_proxy: Forcing 
body:#012[v=0#015#012o=ffox 3617025278 0 IN IP4 
192.168.40.100#015#012s=sflphone#015#012c=IN IP4 
192.168.40.100#015#012t=0 0#015#012m=audio 18526 RTP/AVP 0 
101#015#012a=rtpmap:0 PCMU/8000#015#012a=sendrecv#015#012a=rtpmap:101
telephone-event/8000#015#012a=fmtp:101 0-15#015#012a=rtcp:18527 IN IP4 
192.168.40.100#015#012]<br>

/usr/local/sbin/opensips[2620]: DBG:rtpproxy:force_rtp_proxy_body: trying new rtpproxy node 127.0.0.1:22222<br>

rtpproxy[2524]: DBUG:get_command: received command "<b>2620_5 Uc0,101</b> f3600248-f58b-4434-bba5-902ca597cc6b 192.168.122.1 18526 78872ef9-3f6e-4624-a4f2-46b2300278c7;1"<br>

rtpproxy[2524]: INFO:handle_command: new session 
f3600248-f58b-4434-bba5-902ca597cc6b, tag 
78872ef9-3f6e-4624-a4f2-46b2300278c7;1 requested, type strong<br>

rtpproxy[2524]: INFO:handle_command: new session on a port 35002 created, tag 78872ef9-3f6e-4624-a4f2-46b2300278c7;1<br>

rtpproxy[2524]: INFO:handle_copy: starting recording RTP session on port 35002<br>

/usr/local/sbin/opensips[2620]: DBG:rtpproxy:force_rtp_proxy_body: proxy reply: 35002 192.168.122.213#012<br>

rtpproxy[2524]: INFO:handle_copy: starting recording RTP session on port 0<br>

rtpproxy[2524]: INFO:handle_command: pre-filling caller's address with 192.168.122.1:18526<br>

rtpproxy[2524]: DBUG:doreply: sending reply "2620_5 35002 192.168.122.213#012"<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=40<br>

rtpproxy[2524]: DBUG:get_command: received command "2620_6 P5 
f3600248-f58b-4434-bba5-902ca597cc6b /usr/local/bin/tt_frank.wav session
 78872ef9-3f6e-4624-a4f2-46b2300278c7;1 "<br>

rtpproxy[2524]: INFO:handle_play: <b>5 times playing prompt /usr/local/bin/tt_frank.wav codec 0</b><br>

rtpproxy[2524]: DBUG:doreply: sending reply "2620_6 0#012"<br>

<b>/usr/local/sbin/opensips[2620]: ==== bbbb</b><br>

/usr/local/sbin/opensips[2620]: DBG:core:grep_sock_info: checking if 
host==us: 15==15 &amp;&amp;&nbsp; [192.168.122.213] == [192.168.122.213]<br>

/usr/local/sbin/opensips[2620]: DBG:core:grep_sock_info: checking if port 5060 matches port 5060<br>

/usr/local/sbin/opensips[2620]: DBG:registrar:lookup: found a complete match<br>

/usr/local/sbin/opensips[2620]: DBG:registrar:lookup: setting as ruri &lt;sip:1001@192.168.122.1:5060&gt;<br>

/usr/local/sbin/opensips[2620]: DBG:registrar:lookup: looking for branches<br>

/usr/local/sbin/opensips[2620]: DBG:tm:t_newtran: transaction on entrance=(nil)<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=ffffffffffffffff<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=78<br>

/usr/local/sbin/opensips[2620]: DBG:tm:t_lookup_request: start searching: hash=2984, isACK=0<br>

/usr/local/sbin/opensips[2620]: DBG:tm:matching_3261: RFC3261 transaction matching failed<br>

/usr/local/sbin/opensips[2620]: DBG:tm:t_lookup_request: no transaction found<br>

/usr/local/sbin/opensips[2620]: DBG:tm:run_reqin_callbacks: trans=0x7f9b56d588f0, callback type 1, id 1 entered<br>

/usr/local/sbin/opensips[2620]: DBG:dialog:dlg_onreq: t hash_index = 2984, t label = 710902548<br>

/usr/local/sbin/opensips[2620]: DBG:tm:run_reqin_callbacks: trans=0x7f9b56d588f0, callback type 1, id 0 entered<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=78<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=ffffffffffffffff<br>

/usr/local/sbin/opensips[2620]: DBG:core:_shm_resize: resize(0) called<br>

/usr/local/sbin/opensips[2620]: DBG:tm:_reply_light: reply sent out. 
buf=0x7f9b5a68e1e8: SIP/2.0 1..., shmem=0x7f9b56d5cd88: SIP/2.0 1<br>

/usr/local/sbin/opensips[2620]: DBG:tm:_reply_light: finished<br>

/usr/local/sbin/opensips[2620]: new branch at sip:1001@192.168.122.1:5060<br>

/usr/local/sbin/opensips[2620]: DBG:core:mk_proxy: doing DNS lookup...<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=2000<br>

/usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=ffffffffffffffff<br>

/usr/local/sbin/opensips[2620]: DBG:core:clen_builder: content-length: 263 (263)<br>

/usr/local/sbin/opensips[2620]: DBG:tm:set_timer: relative timeout is 500000<br>

/usr/local/sbin/opensips[2620]: DBG:tm:insert_timer_unsafe: [4]: 0x7f9b56d58b10 (82700000)<br>

/usr/local/sbin/opensips[2620]: DBG:tm:insert_timer_unsafe: [0]: 0x7f9b56d58b40 (87)<br>

/usr/local/sbin/opensips[2620]: DBG:tm:t_relay_to: new transaction fwd'ed<br>

/usr/local/sbin/opensips[2620]: DBG:tm:t_unref: UNREF_UNSAFE: [0x7f9b56d588f0] after is 0<br>

/usr/local/sbin/opensips[2620]: DBG:dialog:unref_dlg: unref dlg 0x7f9b56d57d58 with 1 -&gt; 2 in entry 0x7f9b56d45ee0<br>

/usr/local/sbin/opensips[2620]: DBG:core:destroy_avp_list: destroying list (nil)<br>

/usr/local/sbin/opensips[2620]: DBG:core:receive_msg: cleaning up<br>

/usr/local/sbin/opensips[2618]: DBG:core:parse_msg: SIP Reply&nbsp; (status):<br>

/usr/local/sbin/opensips[2618]: DBG:core:parse_msg:&nbsp; version: &lt;SIP/2.0&gt;<br>

/usr/local/sbin/opensips[2618]: DBG:core:parse_msg:&nbsp; status:&nbsp; &lt;100&gt;<br>

/usr/local/sbin/opensips[2618]: DBG:core:parse_msg:&nbsp; reason:&nbsp; &lt;Trying&gt;<br>

/usr/local/sbin/opensips[2618]: DBG:core:parse_headers: flags=2<br>

/usr/local/sbin/opensips[2618]: DBG:core:parse_via_param: found param 
type 234, &lt;received&gt; = &lt;192.168.122.213&gt;; state=6<br>

/usr/local/sbin/opensips[2618]: DBG:core:parse_via_param: found param 
type 232, &lt;branch&gt; = &lt;z9hG4bK8ab.4138f5a2.0&gt;; state=16<br>

/usr/local/sbin/opensips[2618]: DBG:core:parse_via: end of header reached, state=5<br>

/usr/local/sbin/opensips[2618]: DBG:core:parse_headers: via found, flags=2<br>

/usr/local/sbin/opensips[2618]: DBG:core:parse_headers: this is the first via<br>

/usr/local/sbin/opensips[2618]: DBG:core:parse_headers: flags=ffffffffffffffff<br>

/usr/local/sbin/opensips[2619]: DBG:core:parse_msg: SIP Reply&nbsp; (status):<br>

/usr/local/sbin/opensips[2619]: DBG:core:parse_msg:&nbsp; version: &lt;SIP/2.0&gt;<br>

/usr/local/sbin/opensips[2619]: DBG:core:parse_msg:&nbsp; status:&nbsp; &lt;180&gt;<br>

/usr/local/sbin/opensips[2619]: DBG:core:parse_msg:&nbsp; reason:&nbsp; &lt;Ringing&gt;<br>

/usr/local/sbin/opensips[2619]: DBG:core:parse_headers: flags=2<br>

/usr/local/sbin/opensips[2619]: DBG:core:parse_via_param: found param 
type 234, &lt;received&gt; = &lt;192.168.122.213&gt;; state=6<br>

/usr/local/sbin/opensips[2619]: DBG:core:parse_via_param: found param 
type 232, &lt;branch&gt; = &lt;z9hG4bK8ab.4138f5a2.0&gt;; state=16<br>

<br>

<br>

Thank you,<br>

Frank</div></div></div>                                               </div></body>
</html>