[OpenSIPS-Users] Media Proxy Problems

Ross Beer ross_beer at hotmail.com
Tue Oct 27 17:24:19 CET 2009


I am having a problem getting phones to talk to mediaproxy. I get oneway audio however when I dial an asterisk server and do an echo test audio passes correctly.
 
I can see that RTP streams are not reaching the mediaproxy even though the SDP is updated to the correct addresses. Firwall ports are open.
 
Can anyone spot where I have gone wrong?
 
----------------------------------------------------------------------------------------------
 
 
media-relay[579]: debug: Received new SDP offer
media-relay[579]: mediaproxy.mediacontrol.StreamListenerProtocol starting on 50760
media-relay[579]: mediaproxy.mediacontrol.StreamListenerProtocol starting on 50761
media-relay[579]: mediaproxy.mediacontrol.StreamListenerProtocol starting on 50762
media-relay[579]: mediaproxy.mediacontrol.StreamListenerProtocol starting on 50763
media-relay[579]: debug: Added new stream: (audio) 192.168.2.200:23164 (RTP: Unknown, RTCP: Unknown) <-> <SERVER IP>:50760 <-> <SERVER IP>:50762 <-> Unknown (RTP: Unknown, RTCP: Unknown)
media-relay[579]: debug: created new session YjUxMDU5OTA4ODNkZTY3Yzc0YmQxMzQ3NWEyZjlmYjI.: 10000*202@<SERVER IP> (db1c905c) --> 10001*200@<SERVER IP>
media-relay[579]: debug: Got traffic information for stream: (audio) 192.168.2.200:23164 (RTP: Unknown, RTCP: Unknown) <-> <SERVER IP>:50760 <-> <SERVER IP>:50762 <-> Unknown (RTP: <IP Router One>:57076, RTCP: Unknown)
media-dispatcher[582]: debug: Issuing "update" command to relay at <SERVER IP>
media-relay[579]: debug: updating existing session YjUxMDU5OTA4ODNkZTY3Yzc0YmQxMzQ3NWEyZjlmYjI.: 10000*202@<SERVER IP> (db1c905c) --> 10001*200@<SERVER IP>
media-relay[579]: debug: Received updated SDP answer
media-relay[579]: debug: Got initial answer from callee for stream: (audio) 192.168.2.200:23164 (RTP: Unknown, RTCP: Unknown) <-> <SERVER IP>:50760 <-> <SERVER IP>:50762 <-> 192.168.2.2:40010 (RTP: <IP Router One>:57076, RTCP: Unknown)
media-relay[579]: debug: Got traffic information for stream: (audio) 192.168.2.200:23164 (RTP: Unknown, RTCP: <IP Router One>:40429) <-> <SERVER IP>:50760 <-> <SERVER IP>:50762 <-> 192.168.2.2:40010 (RTP: <IP Router One>:57076, RTCP: Unknown)
media-relay[579]: debug: Got traffic information for stream: (audio) 192.168.2.200:23164 (RTP: <IP Router One>:40428, RTCP: <IP Router One>:40429) <-> <SERVER IP>:50760 <-> <SERVER IP>:50762 <-> 192.168.2.2:40010 (RTP: <IP Router One>:57076, RTCP: Unknown)
media-dispatcher[582]: debug: Issuing "update" command to relay at <SERVER IP>
media-relay[579]: debug: updating existing session YjUxMDU5OTA4ODNkZTY3Yzc0YmQxMzQ3NWEyZjlmYjI.: 10000*202@<SERVER IP> (db1c905c) --> 10001*200@<SERVER IP>
media-relay[579]: debug: Received updated SDP answer
media-relay[579]: debug: Unchanged stream: (audio) 192.168.2.200:23164 (RTP: <IP Router One>:40428, RTCP: <IP Router One>:40429) <-> <SERVER IP>:50760 <-> <SERVER IP>:50762 <-> 192.168.2.2:40010 (RTP: <IP Router One>:57076, RTCP: Unknown)
media-dispatcher[582]: debug: Issuing "update" command to relay at <SERVER IP>
media-relay[579]: debug: updating existing session YjUxMDU5OTA4ODNkZTY3Yzc0YmQxMzQ3NWEyZjlmYjI.: 10000*202@<SERVER IP> (db1c905c) --> 10001*200@<SERVER IP>
media-relay[579]: debug: Received updated SDP answer
media-relay[579]: debug: Unchanged stream: (audio) 192.168.2.200:23164 (RTP: <IP Router One>:40428, RTCP: <IP Router One>:40429) <-> <SERVER IP>:50760 <-> <SERVER IP>:50762 <-> 192.168.2.2:40010 (RTP: <IP Router One>:57076, RTCP: Unknown)
media-dispatcher[582]: debug: Issuing "update" command to relay at <SERVER IP>
media-relay[579]: debug: updating existing session YjUxMDU5OTA4ODNkZTY3Yzc0YmQxMzQ3NWEyZjlmYjI.: 10000*202@<SERVER IP> (db1c905c) --> 10001*200@<SERVER IP>
media-relay[579]: debug: Received updated SDP answer
media-relay[579]: debug: Unchanged stream: (audio) 192.168.2.200:23164 (RTP: <IP Router One>:40428, RTCP: <IP Router One>:40429) <-> <SERVER IP>:50760 <-> <SERVER IP>:50762 <-> 192.168.2.2:40010 (RTP: <IP Router One>:57076, RTCP: Unknown)
media-dispatcher[582]: debug: Issuing "remove" command to relay at <SERVER IP>
media-relay[579]: debug: removing session YjUxMDU5OTA4ODNkZTY3Yzc0YmQxMzQ3NWEyZjlmYjI.: 10000*202@<SERVER IP> (db1c905c) --> 10001*200@<SERVER IP>
media-relay[579]: (Port 50760 Closed)
media-relay[579]: (Port 50761 Closed)
media-relay[579]: (Port 50762 Closed)
media-relay[579]: (Port 50763 Closed)
media-dispatcher[582]: debug: Got statistics: {'from_tag': 'db1c905c', 'dialog_id': '1487:1287562064', 'start_time': 1256658924.01, 'timed_out': False, 'call_id': 'YjUxMDU5OTA4ODNkZTY3Yzc0YmQxMzQ3NWEyZjlmYjI.', 'to_tag': 'tprgkluos4', 'streams': [{'status': 'closed', 'caller_codec': 'G711u', 'post_dial_delay': 4.3661558628100003, 'callee_codec': '1016', 'start_time': 0, 'caller_bytes': 482400, 'callee_bytes': 494400, 'caller_packets': 2412, 'end_time': 49, 'callee_remote': '<IP Router One>:57076', 'caller_remote': '<IP Router One>:40428', 'media_type': 'audio', 'callee_local': '<SERVER IP>:50762', 'timeout_wait': 0, 'caller_local': '<SERVER IP>:50760', 'callee_packets': 2472}], 'duration': 49, 'to_uri': '10001*200@<SERVER IP>', 'from_uri': '10000*202@<SERVER IP>', 'callee_ua': 'snom370/7.3.26', 'caller_ua': 'X-Lite release 1103k stamp 53621'}
media-dispatcher[582]: debug: Connection to OpenSIPS lost: Connection was closed cleanly.
 
----------------------------------------------------------------------------------------------
 
# ------------------ module loading ----------------------------------
debug=3         # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=yes # (cmd line: -E)

listen=udp:<Server IP>:5060
alias=<domain>:5060
#set module path
mpath="/usr/local/lib64/opensips/modules/"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "acc.so"
loadmodule "rr.so"
loadmodule "maxfwd.so"
loadmodule "db_mysql.so"
loadmodule "auth.so"
loadmodule "auth_db.so"
#loadmodule "group.so"
loadmodule "uri.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "mi_fifo.so"
loadmodule "mediaproxy.so"
loadmodule "mi_datagram.so"
loadmodule "dialog.so"
loadmodule "signaling.so"
loadmodule "nathelper.so"
# ----------------- setting module-specific parameters ---------------

modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
# ----- usrloc params -----
modparam("usrloc", "db_mode",   1)
modparam("usrloc|auth_db|dialog", "db_url","<db URL>")
# -- mi_fifo params --
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
# -- registrar params
modparam("registrar", "max_contacts", 1)
modparam("registrar|nathelper", "received_avp", "$avp(s:rcv)")
modparam("registrar", "use_path", 1)
modparam("registrar", "path_use_received", 1)
# -- MediaProxy --
modparam("mediaproxy", "mediaproxy_socket", "/var/run/mediaproxy/dispatcher.sock")
modparam("mediaproxy", "mediaproxy_timeout", 500)
modparam("mediaproxy", "signaling_ip_avp", "$avp(s:nat_ip)")
modparam("mediaproxy", "media_relay_avp", "$avp(s:media_relay)")
# -- Dialog --
modparam("dialog", "dlg_flag",4)

# -- Mi_Datagram --
modparam("mi_datagram", "socket_name", "/tmp/opensips.sock")
modparam("mi_datagram", "children_count", 3)
modparam("mi_datagram", "unix_socket_mode", 0600)
modparam("mi_datagram", "socket_timeout", 2000)
# -- acc params --
#modparam("acc", "log_level", 1)
# that is the flag for which we will account -- don't forget to
# set the same one :-)
#modparam("acc", "log_flag", 1 )
# -------------------------  request routing logic -------------------
# main routing logic
route{
 /* ********* ROUTINE CHECKS  ********************************** */
 # filter too old messages
 if (!mf_process_maxfwd_header("10")) {
  log("LOG: Too many hops\n");
  sl_send_reply("483","Too Many Hops");
  exit;
 };
 if (msg:len>=  2048 ) {
  sl_send_reply("513", "Message too big");
  exit;
 };
 if (nat_uac_test("3"))
        {
                # Allow RR-ed requests, as these may indicate that
                # a NAT-enabled proxy takes care of it; unless it is
                # a REGISTER
                # Rewrite contact with source IP of signalling
                if(is_method("REGISTER"))
                {
                 fix_nated_register();
                }
                else
                {
                        fix_nated_contact();
                }
                #fix_nated_register();
                if ( is_method("INVITE") ) 
  {
                         #fix_nated_sdp("1"); # Add direction=active to SDP
                };
                force_rport(); # Add rport parameter to topmost Via
                setbflag(6);    # Mark as NATed
        };
 # MEDIA PROXY
 # If devices behind a NAT engage_media_proxy to handel traffic 
 if (is_method("INVITE"))
        {
  create_dialog();      
   engage_media_proxy();
        }
 /* ********* RR ********************************** */
 /* grant Route routing if route headers present */
 if (loose_route()) 
 { 
  t_relay(); 
  exit; 
 };
 
 /* record-route INVITEs -- all subsequent requests must visit us */
 if (!is_method("REGISTER"))
 {
  record_route();
 };
 if (uri==myself) 
 {
  if (is_method("REGISTER")) 
  {
    ## NEW REGISTRATION
                   if (!www_authorize("", "subscriber"))
                   {
                        www_challenge("", "0");
                    return;
                   };
    save("location");
                         exit;
  };
  if(!lookup("location"))
  {
   exit;
  }
 }
 # forward the request now
 if (!t_relay()) {
  sl_reply_error(); 
  exit; 
 };
} 		 	   		  
_________________________________________________________________
New Windows 7: Find the right PC for you. Learn more.
http://www.microsoft.com/uk/windows/buy/


More information about the Users mailing list