[OpenSIPS-Users] how to make rtpproxy_stream2uac to work

Răzvan Crainea razvan at opensips.org
Thu Aug 21 16:15:17 CEST 2014


Hi, Frank!

What happens after the call establishes? Do you hear the media being played?
My assumption is that there is a problem on the rtpproxy side. Can you 
apply the following patch[1] and re-test?

[1] https://gist.github.com/razvancrainea/e83c075fed688412efec

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 08/14/2014 09:19 PM, frank fox wrote:
> Greetings:
>
> 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 rtpproxy_stream2uac 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.
>
> 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.
>
> Can someone please tell me about how it works and give me some hints?
>
> Thank you,
>
> (Enclosed is the detail log)
>
>     # account only INVITEs
>     if (is_method("INVITE")) {
>                 create_dialog();
> *xlog("==== aaaaa");**
> rtpproxy_offer();**
> rtpproxy_stream2uac("/usr/local/bin/tt_frank.wav", "5");**
> xlog("==== bbbb");*
>         setflag(ACC_DO); # do accounting
>     }
>
>     if (!uri==myself) {
>         append_hf("P-hint: outbound\r\n");
>         route(relay);
>     }
>
>     # requests for my domain
>     if (is_method("PUBLISH|SUBSCRIBE"))
>     {
>         sl_send_reply("503", "Service Unavailable");
>         exit;
>     }
>
>     if (is_method("REGISTER"))
>     {
>         if (   0 ) setflag(TCP_PERSISTENT);
>         if (!save("location"))
>             sl_reply_error();
>
>         exit;
>     }
>
>     if ($rU==NULL) {
>         # request with no Username in RURI
>         sl_send_reply("484","Address Incomplete");
>         exit;
>     }
>
>     # do lookup with method filtering
>     if (!lookup("location","m")) {
>         t_newtran();
>         t_reply("404", "Not Found");
>         exit;
>     }
>
>     # when routing via usrloc, log the missed calls also
>     setflag(ACC_MISSED);
>     route(relay);
> }
>
> ===============================
>
> /usr/local/sbin/opensips[2620]: DBG:core:parse_msg: SIP Request:
> /usr/local/sbin/opensips[2620]: DBG:core:parse_msg: method:  <INVITE>
> /usr/local/sbin/opensips[2620]: DBG:core:parse_msg: uri:     
> <sip:1001 at 192.168.122.213>
> /usr/local/sbin/opensips[2620]: DBG:core:parse_msg: version: <SIP/2.0>
> /usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=2
> /usr/local/sbin/opensips[2620]: DBG:core:parse_via_param: found param 
> type 235, <rport> = <n/a>; state=6
> /usr/local/sbin/opensips[2620]: DBG:core:parse_via_param: found param 
> type 232, <branch> = <z9hG4bKPjd9cf9a60-e85e-43e1-bb72-2bf6c3594249>; 
> state=16
> /usr/local/sbin/opensips[2620]: DBG:core:parse_via: end of header 
> reached, state=5
> /usr/local/sbin/opensips[2620]: DBG:core:parse_headers: via found, flags=2
> /usr/local/sbin/opensips[2620]: DBG:core:parse_headers: this is the 
> first via
> /usr/local/sbin/opensips[2620]: DBG:core:parse_headers: 
> flags=ffffffffffffffff
> /usr/local/sbin/opensips[2620]: DBG:core:parse_to: end of header 
> reached, state=10
> /usr/local/sbin/opensips[2620]: DBG:core:parse_to: display={}, 
> ruri={sip:1001 at 192.168.122.213}
> /usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: <To> [28]; 
> uri=[sip:1001 at 192.168.122.213]
> /usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: to body 
> [<sip:1001 at 192.168.122.213>#015#012]
> /usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: cseq <CSeq>: 
> <17555> <INVITE>
> /usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: content_length=243
> /usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: found end of 
> header
> /usr/local/sbin/opensips[2620]: DBG:core:parse_to_param: 
> tag=78872ef9-3f6e-4624-a4f2-46b2300278c7
> /usr/local/sbin/opensips[2620]: DBG:core:parse_to: end of header 
> reached, state=29
> /usr/local/sbin/opensips[2620]: DBG:core:parse_to: display={}, 
> ruri={sip:1000 at 192.168.122.213}
> /usr/local/sbin/opensips[2620]: DBG:core:parse_msg: SIP Request:
> /usr/local/sbin/opensips[2620]: DBG:core:parse_msg: method:  <INVITE>
> /usr/local/sbin/opensips[2620]: DBG:core:parse_msg: uri:     
> <sip:1001 at 192.168.122.213>
> /usr/local/sbin/opensips[2620]: DBG:core:parse_msg: version: <SIP/2.0>
> /usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=2
> /usr/local/sbin/opensips[2620]: DBG:core:parse_via_param: found param 
> type 235, <rport> = <n/a>; state=6
> /usr/local/sbin/opensips[2620]: DBG:core:parse_via_param: found param 
> type 232, <branch> = <z9hG4bKPjd9cf9a60-e85e-43e1-bb72-2bf6c3594249>; 
> state=16
> /usr/local/sbin/opensips[2620]: DBG:core:parse_via: end of header 
> reached, state=5
> /usr/local/sbin/opensips[2620]: DBG:core:parse_headers: via found, flags=2
> /usr/local/sbin/opensips[2620]: DBG:core:parse_headers: this is the 
> first via
> /usr/local/sbin/opensips[2620]: DBG:core:receive_msg: After parse_msg...
> /usr/local/sbin/opensips[2620]: DBG:core:receive_msg: preparing to run 
> routing scripts...
> /usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=100
> /usr/local/sbin/opensips[2620]: DBG:maxfwd:is_maxfwd_present: value = 70
> /usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=8
> /usr/local/sbin/opensips[2620]: DBG:core:parse_to: end of header 
> reached, state=10
> /usr/local/sbin/opensips[2620]: DBG:core:parse_to: display={}, 
> ruri={sip:1001 at 192.168.122.213}
> /usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: <To> [28]; 
> uri=[sip:1001 at 192.168.122.213]
> /usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: to body 
> [<sip:1001 at 192.168.122.213>#015#012]
> /usr/local/sbin/opensips[2620]: DBG:uri:has_totag: no totag
> /usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=78
> /usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: cseq <CSeq>: 
> <17555> <INVITE>
> /usr/local/sbin/opensips[2620]: DBG:tm:t_lookup_request: start 
> searching: hash=2984, isACK=0
> /usr/local/sbin/opensips[2620]: DBG:tm:matching_3261: RFC3261 
> transaction matching failed
> /usr/local/sbin/opensips[2620]: DBG:tm:t_lookup_request: no 
> transaction found
> /usr/local/sbin/opensips[2620]: DBG:core:parse_to_param: 
> tag=78872ef9-3f6e-4624-a4f2-46b2300278c7
> /usr/local/sbin/opensips[2620]: DBG:core:parse_to: end of header 
> reached, state=29
> /usr/local/sbin/opensips[2620]: DBG:core:parse_to: display={}, 
> ruri={sip:1000 at 192.168.122.213}
> /usr/local/sbin/opensips[2620]: DBG:core:grep_sock_info: checking if 
> host==us: 15==15 &&  [192.168.122.213] == [192.168.122.213]
> /usr/local/sbin/opensips[2620]: DBG:core:grep_sock_info: checking if 
> port 5060 matches port 5060
> /usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=200
> /usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: content_length=243
> /usr/local/sbin/opensips[2620]: DBG:core:get_hdr_field: found end of 
> header
> /usr/local/sbin/opensips[2620]: DBG:rr:find_first_route: No Route 
> headers found
> /usr/local/sbin/opensips[2620]: DBG:rr:loose_route: There is no Route HF
> /usr/local/sbin/opensips[2620]: DBG:dialog:build_new_dlg: new dialog 
> 0x7f9b56d57d58 
> (c=f3600248-f58b-4434-bba5-902ca597cc6b,f=sip:1000 at 192.168.122.213,t=sip:1001 at 192.168.122.213,ft=78872ef9-3f6e-4624-a4f2-46b2300278c7) 
> on hash 3756
> /usr/local/sbin/opensips[2620]: DBG:core:parse_headers: 
> flags=ffffffffffffffff
> /usr/local/sbin/opensips[2620]: DBG:dialog:init_leg_info: route_set , 
> contact sip:1000 at 192.168.40.100:5060, cseq 17555 and bind_addr 
> udp:192.168.122.213:5060
> /usr/local/sbin/opensips[2620]: DBG:dialog:dlg_add_leg_info: set leg 0 
> for 0x7f9b56d57d58: tag=<78872ef9-3f6e-4624-a4f2-46b2300278c7> rcseq=<0>
> /usr/local/sbin/opensips[2620]: DBG:dialog:link_dlg: ref dlg 
> 0x7f9b56d57d58 with 3 -> 3 in h_entry 0x7f9b56d45ee0 - 3756
> /usr/local/sbin/opensips[2620]: DBG:rr:add_rr_param: adding 
> (;did=cae.00e4a543) 0x7f9b5a68d9a8
> */usr/local/sbin/opensips[2620]: ==== aaaaa*
> /usr/local/sbin/opensips[2620]: DBG:core:parse_headers: 
> flags=ffffffffffffffff
> /usr/local/sbin/opensips[2620]: DBG:core:decode_mime_type: Decoding 
> MIME type for:[application/sdp]
> /usr/local/sbin/opensips[2620]: DBG:rtpproxy:force_rtp_proxy: force 
> rtp proxy with param1 <none> and param2 <none>
> /usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=40
> /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]
> /usr/local/sbin/opensips[2620]: DBG:rtpproxy:force_rtp_proxy_body: 
> trying new rtpproxy node 127.0.0.1:22222
> rtpproxy[2524]: DBUG:get_command: received command "*2620_5 Uc0,101* 
> f3600248-f58b-4434-bba5-902ca597cc6b 192.168.122.1 18526 
> 78872ef9-3f6e-4624-a4f2-46b2300278c7;1"
> rtpproxy[2524]: INFO:handle_command: new session 
> f3600248-f58b-4434-bba5-902ca597cc6b, tag 
> 78872ef9-3f6e-4624-a4f2-46b2300278c7;1 requested, type strong
> rtpproxy[2524]: INFO:handle_command: new session on a port 35002 
> created, tag 78872ef9-3f6e-4624-a4f2-46b2300278c7;1
> rtpproxy[2524]: INFO:handle_copy: starting recording RTP session on 
> port 35002
> /usr/local/sbin/opensips[2620]: DBG:rtpproxy:force_rtp_proxy_body: 
> proxy reply: 35002 192.168.122.213#012
> rtpproxy[2524]: INFO:handle_copy: starting recording RTP session on port 0
> rtpproxy[2524]: INFO:handle_command: pre-filling caller's address with 
> 192.168.122.1:18526
> rtpproxy[2524]: DBUG:doreply: sending reply "2620_5 35002 
> 192.168.122.213#012"
> /usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=40
> 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 "
> rtpproxy[2524]: INFO:handle_play: *5 times playing prompt 
> /usr/local/bin/tt_frank.wav codec 0*
> rtpproxy[2524]: DBUG:doreply: sending reply "2620_6 0#012"
> */usr/local/sbin/opensips[2620]: ==== bbbb*
> /usr/local/sbin/opensips[2620]: DBG:core:grep_sock_info: checking if 
> host==us: 15==15 &&  [192.168.122.213] == [192.168.122.213]
> /usr/local/sbin/opensips[2620]: DBG:core:grep_sock_info: checking if 
> port 5060 matches port 5060
> /usr/local/sbin/opensips[2620]: DBG:registrar:lookup: found a complete 
> match
> /usr/local/sbin/opensips[2620]: DBG:registrar:lookup: setting as ruri 
> <sip:1001 at 192.168.122.1:5060>
> /usr/local/sbin/opensips[2620]: DBG:registrar:lookup: looking for branches
> /usr/local/sbin/opensips[2620]: DBG:tm:t_newtran: transaction on 
> entrance=(nil)
> /usr/local/sbin/opensips[2620]: DBG:core:parse_headers: 
> flags=ffffffffffffffff
> /usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=78
> /usr/local/sbin/opensips[2620]: DBG:tm:t_lookup_request: start 
> searching: hash=2984, isACK=0
> /usr/local/sbin/opensips[2620]: DBG:tm:matching_3261: RFC3261 
> transaction matching failed
> /usr/local/sbin/opensips[2620]: DBG:tm:t_lookup_request: no 
> transaction found
> /usr/local/sbin/opensips[2620]: DBG:tm:run_reqin_callbacks: 
> trans=0x7f9b56d588f0, callback type 1, id 1 entered
> /usr/local/sbin/opensips[2620]: DBG:dialog:dlg_onreq: t hash_index = 
> 2984, t label = 710902548
> /usr/local/sbin/opensips[2620]: DBG:tm:run_reqin_callbacks: 
> trans=0x7f9b56d588f0, callback type 1, id 0 entered
> /usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=78
> /usr/local/sbin/opensips[2620]: DBG:core:parse_headers: 
> flags=ffffffffffffffff
> /usr/local/sbin/opensips[2620]: DBG:core:_shm_resize: resize(0) called
> /usr/local/sbin/opensips[2620]: DBG:tm:_reply_light: reply sent out. 
> buf=0x7f9b5a68e1e8: SIP/2.0 1..., shmem=0x7f9b56d5cd88: SIP/2.0 1
> /usr/local/sbin/opensips[2620]: DBG:tm:_reply_light: finished
> /usr/local/sbin/opensips[2620]: new branch at sip:1001 at 192.168.122.1:5060
> /usr/local/sbin/opensips[2620]: DBG:core:mk_proxy: doing DNS lookup...
> /usr/local/sbin/opensips[2620]: DBG:core:parse_headers: flags=2000
> /usr/local/sbin/opensips[2620]: DBG:core:parse_headers: 
> flags=ffffffffffffffff
> /usr/local/sbin/opensips[2620]: DBG:core:clen_builder: content-length: 
> 263 (263)
> /usr/local/sbin/opensips[2620]: DBG:tm:set_timer: relative timeout is 
> 500000
> /usr/local/sbin/opensips[2620]: DBG:tm:insert_timer_unsafe: [4]: 
> 0x7f9b56d58b10 (82700000)
> /usr/local/sbin/opensips[2620]: DBG:tm:insert_timer_unsafe: [0]: 
> 0x7f9b56d58b40 (87)
> /usr/local/sbin/opensips[2620]: DBG:tm:t_relay_to: new transaction fwd'ed
> /usr/local/sbin/opensips[2620]: DBG:tm:t_unref: UNREF_UNSAFE: 
> [0x7f9b56d588f0] after is 0
> /usr/local/sbin/opensips[2620]: DBG:dialog:unref_dlg: unref dlg 
> 0x7f9b56d57d58 with 1 -> 2 in entry 0x7f9b56d45ee0
> /usr/local/sbin/opensips[2620]: DBG:core:destroy_avp_list: destroying 
> list (nil)
> /usr/local/sbin/opensips[2620]: DBG:core:receive_msg: cleaning up
> /usr/local/sbin/opensips[2618]: DBG:core:parse_msg: SIP Reply  (status):
> /usr/local/sbin/opensips[2618]: DBG:core:parse_msg: version: <SIP/2.0>
> /usr/local/sbin/opensips[2618]: DBG:core:parse_msg: status:  <100>
> /usr/local/sbin/opensips[2618]: DBG:core:parse_msg: reason:  <Trying>
> /usr/local/sbin/opensips[2618]: DBG:core:parse_headers: flags=2
> /usr/local/sbin/opensips[2618]: DBG:core:parse_via_param: found param 
> type 234, <received> = <192.168.122.213>; state=6
> /usr/local/sbin/opensips[2618]: DBG:core:parse_via_param: found param 
> type 232, <branch> = <z9hG4bK8ab.4138f5a2.0>; state=16
> /usr/local/sbin/opensips[2618]: DBG:core:parse_via: end of header 
> reached, state=5
> /usr/local/sbin/opensips[2618]: DBG:core:parse_headers: via found, flags=2
> /usr/local/sbin/opensips[2618]: DBG:core:parse_headers: this is the 
> first via
> /usr/local/sbin/opensips[2618]: DBG:core:parse_headers: 
> flags=ffffffffffffffff
> /usr/local/sbin/opensips[2619]: DBG:core:parse_msg: SIP Reply  (status):
> /usr/local/sbin/opensips[2619]: DBG:core:parse_msg: version: <SIP/2.0>
> /usr/local/sbin/opensips[2619]: DBG:core:parse_msg: status:  <180>
> /usr/local/sbin/opensips[2619]: DBG:core:parse_msg: reason:  <Ringing>
> /usr/local/sbin/opensips[2619]: DBG:core:parse_headers: flags=2
> /usr/local/sbin/opensips[2619]: DBG:core:parse_via_param: found param 
> type 234, <received> = <192.168.122.213>; state=6
> /usr/local/sbin/opensips[2619]: DBG:core:parse_via_param: found param 
> type 232, <branch> = <z9hG4bK8ab.4138f5a2.0>; state=16
>
>
> Thank you,
> Frank
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20140821/8a6b4096/attachment-0001.htm>


More information about the Users mailing list