<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>
# account only INVITEs<br>
if (is_method("INVITE")) {<br>
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>
setflag(ACC_DO); # do accounting<br>
}<br>
<br>
if (!uri==myself) {<br>
append_hf("P-hint: outbound\r\n"); <br>
route(relay);<br>
}<br>
<br>
# requests for my domain<br>
if (is_method("PUBLISH|SUBSCRIBE"))<br>
{<br>
sl_send_reply("503", "Service Unavailable");<br>
exit;<br>
}<br>
<br>
if (is_method("REGISTER"))<br>
{<br>
if ( 0 ) setflag(TCP_PERSISTENT);<br>
if (!save("location"))<br>
sl_reply_error();<br>
<br>
exit;<br>
}<br>
<br>
if ($rU==NULL) {<br>
# request with no Username in RURI<br>
sl_send_reply("484","Address Incomplete");<br>
exit;<br>
}<br>
<br>
# do lookup with method filtering<br>
if (!lookup("location","m")) {<br>
t_newtran();<br>
t_reply("404", "Not Found");<br>
exit;<br>
} <br>
<br>
# when routing via usrloc, log the missed calls also<br>
setflag(ACC_MISSED);<br>
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: method: <INVITE><br>
/usr/local/sbin/opensips[2620]: DBG:core:parse_msg: uri: <sip:1001@192.168.122.213><br>
/usr/local/sbin/opensips[2620]: DBG:core:parse_msg: version: <SIP/2.0><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, <rport> = <n/a>; state=6<br>
/usr/local/sbin/opensips[2620]: DBG:core:parse_via_param: found param
type 232, <branch> =
<z9hG4bKPjd9cf9a60-e85e-43e1-bb72-2bf6c3594249>; 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: <To> [28]; uri=[sip:1001@192.168.122.213] <br>
/usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: to body [<sip:1001@192.168.122.213>#015#012]<br>
/usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: cseq <CSeq>: <17555> <INVITE><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: method: <INVITE><br>
/usr/local/sbin/opensips[2620]: DBG:core:parse_msg: uri: <sip:1001@192.168.122.213><br>
/usr/local/sbin/opensips[2620]: DBG:core:parse_msg: version: <SIP/2.0><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, <rport> = <n/a>; state=6<br>
/usr/local/sbin/opensips[2620]: DBG:core:parse_via_param: found param
type 232, <branch> =
<z9hG4bKPjd9cf9a60-e85e-43e1-bb72-2bf6c3594249>; 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: <To> [28]; uri=[sip:1001@192.168.122.213] <br>
/usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: to body [<sip:1001@192.168.122.213>#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 <CSeq>: <17555> <INVITE><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 && [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=<78872ef9-3f6e-4624-a4f2-46b2300278c7>
rcseq=<0><br>
/usr/local/sbin/opensips[2620]: DBG:dialog:link_dlg: ref dlg 0x7f9b56d57d58 with 3 -> 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 <none> and param2 <none><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 && [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 <sip:1001@192.168.122.1:5060><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 -> 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 (status):<br>
/usr/local/sbin/opensips[2618]: DBG:core:parse_msg: version: <SIP/2.0><br>
/usr/local/sbin/opensips[2618]: DBG:core:parse_msg: status: <100><br>
/usr/local/sbin/opensips[2618]: DBG:core:parse_msg: reason: <Trying><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, <received> = <192.168.122.213>; state=6<br>
/usr/local/sbin/opensips[2618]: DBG:core:parse_via_param: found param
type 232, <branch> = <z9hG4bK8ab.4138f5a2.0>; 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 (status):<br>
/usr/local/sbin/opensips[2619]: DBG:core:parse_msg: version: <SIP/2.0><br>
/usr/local/sbin/opensips[2619]: DBG:core:parse_msg: status: <180><br>
/usr/local/sbin/opensips[2619]: DBG:core:parse_msg: reason: <Ringing><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, <received> = <192.168.122.213>; state=6<br>
/usr/local/sbin/opensips[2619]: DBG:core:parse_via_param: found param
type 232, <branch> = <z9hG4bK8ab.4138f5a2.0>; state=16<br>
<br>
<br>
Thank you,<br>
Frank</div></div></div>                                            </div></body>
</html>