[OpenSIPS-Users] Mediaproxy-dispatcher issue

Justin Moore jmoore at sagisys.com
Mon Sep 28 23:08:06 CEST 2009


Hello,

I'm trying to get mediaproxy working with opensips. I can start the relay fine but when I start the dispatcher I get:

Sep 28 17:02:49 atlplsi01 media-dispatcher[3248]: Log opened.
Sep 28 17:02:49 atlplsi01 media-dispatcher[3248]: Starting MediaProxy Dispatcher 2.3.6
Sep 28 17:02:50 atlplsi01 /usr/local/sbin/opensips[27912]: ERROR:mediaproxy:mediaproxy_connect: failed to connect to /var/run/mediaproxy/dispatcher.sock: No such file or directory 
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]: Twisted is using selectreactor
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]: fatal error: cannot read the RADIUS configuration file
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]: fatal error: failed to create MediaProxy Dispatcher: len() of unsized object
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]: Traceback (most recent call last):
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]: --- <exception caught here> ---
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]:   File "/usr/bin/media-dispatcher", line 62, in ?
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]:     dispatcher = Dispatcher()
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]:   File "/usr/lib64/python2.4/site-packages/mediaproxy/dispatcher.py", line 522, in __init__
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]:     self.accounting = [__import__("mediaproxy.interfaces.accounting.%s" % mod.lower(), globals(), locals(), [""]).Accounting() for mod in set(Config.accounting)]
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]:   File "/usr/lib64/python2.4/site-packages/mediaproxy/interfaces/accounting/radius.py", line 54, in __init__
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]:     self.radius = RadiusAccounting()
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]:   File "/usr/lib64/python2.4/site-packages/mediaproxy/interfaces/accounting/radius.py", line 90, in __init__
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]:     raddict = pyrad.dictionary.Dictionary(*dicts)
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]:   File "/usr/lib/python2.4/site-packages/pyrad-1.2-py2.4.egg/pyrad/dictionary.py", line 145, in __init__
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]:     
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]:   File "/usr/lib/python2.4/site-packages/pyrad-1.2-py2.4.egg/pyrad/dictionary.py", line 316, in ReadDictionary
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]:     
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]:   File "/usr/lib/python2.4/site-packages/pyrad-1.2-py2.4.egg/pyrad/dictfile.py", line 48, in __init__
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]:     
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]:   File "/usr/lib/python2.4/site-packages/pyrad-1.2-py2.4.egg/pyrad/dictfile.py", line 63, in __ReadNode
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]:     
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]:   File "/usr/lib/python2.4/site-packages/pyrad-1.2-py2.4.egg/pyrad/dictfile.py", line 22, in __init__
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]:     
Sep 28 17:02:50 atlplsi01 media-dispatcher[3248]: exceptions.TypeError: len() of unsized object

Here is the config.ini:

[Relay]
dispatchers = 38.110.28.132
relay_ip = 38.110.28.132
port_range = 50000:60000
log_level = DEBUG
stream_timeout = 90
on_hold_timeout = 7200

[Dispatcher]
socket_path = dispatcher.sock
listen = 0.0.0.0
log_level = DEBUG
accounting = radius
[TLS]
[Database]

[Radius]
config_file = /etc/radiusclient-ng/radiusclient.conf
additional_dictionary = /etc/raddb/dictionary.opensips

[OpenSIPS]
socket_path = '/tmp/opensips.sock'
max_connections = 1000

Here is the file /etc/radiusclient-ng/radiusclient.conf:

auth_order      radius,local
login_tries     4
login_timeout   60
nologin /etc/nologin
issue   /etc/radiusclient-ng/issue
authserver      127.0.0.1
acctserver      127.0.0.1
servers         /etc/radiusclient-ng/servers
dictionary      /etc/radiusclient-ng/dictionary
login_radius    /usr/sbin/login.radius
seqfile         /var/run/radius.seq
mapfile         /etc/radiusclient-ng/port-id-map
default_realm
radius_timeout  10
radius_retries  3
bindaddr *


and here is the file /etc/raddb/dictionary.opensips:

ATTRIBUTE       Acct-Status-Type                        40      integer
ATTRIBUTE       Acct-Delay-Time                         41      integer
ATTRIBUTE       Acct-Input-Octets                       42      integer
ATTRIBUTE       Acct-Output-Octets                      43      integer
ATTRIBUTE       Acct-Session-Id                         44      string
ATTRIBUTE       Acct-Authentic                          45      integer
ATTRIBUTE       Acct-Session-Time                       46      integer
ATTRIBUTE       Acct-Input-Packets                      47      integer
ATTRIBUTE       Acct-Output-Packets                     48      integer
ATTRIBUTE       Acct-Terminate-Cause                    49      integer
ATTRIBUTE       Acct-Multi-Session-Id                   50      string
ATTRIBUTE       Acct-Link-Count                         51      integer

#       Accounting Status Types

VALUE   Acct-Status-Type                Start                   1
VALUE   Acct-Status-Type                Stop                    2
VALUE   Acct-Status-Type                Alive                   3   # dup
VALUE   Acct-Status-Type                Interim-Update          3
VALUE   Acct-Status-Type                Accounting-On           7
VALUE   Acct-Status-Type                Accounting-Off          8
VALUE   Acct-Status-Type                Failed                  15

#       Authentication Types

VALUE   Acct-Authentic                  RADIUS                  1
VALUE   Acct-Authentic                  Local                   2
VALUE   Acct-Authentic                  Remote                  3
VALUE   Acct-Authentic                  Diameter                4

#       Acct Terminate Causes

VALUE   Acct-Terminate-Cause            User-Request            1
VALUE   Acct-Terminate-Cause            Lost-Carrier            2
VALUE   Acct-Terminate-Cause            Lost-Service            3
VALUE   Acct-Terminate-Cause            Idle-Timeout            4
VALUE   Acct-Terminate-Cause            Session-Timeout         5
VALUE   Acct-Terminate-Cause            Admin-Reset             6
VALUE   Acct-Terminate-Cause            Admin-Reboot            7
VALUE   Acct-Terminate-Cause            Port-Error              8
VALUE   Acct-Terminate-Cause            NAS-Error               9
VALUE   Acct-Terminate-Cause            NAS-Request             10
VALUE   Acct-Terminate-Cause            NAS-Reboot              11
VALUE   Acct-Terminate-Cause            Port-Unneeded           12
VALUE   Acct-Terminate-Cause            Port-Preempted          13
VALUE   Acct-Terminate-Cause            Port-Suspended          14
#VALUE   Acct-Terminate-Cause            Service-Unavailable     15                                                                                            VALUE   Acct-Terminate-Cause            Callback                16
VALUE   Acct-Terminate-Cause            User-Error              17
VALUE   Acct-Terminate-Cause            Host-Request            18
ATTRIBUTE       User-Name                               1       string
ATTRIBUTE       User-Password                           2       string
ATTRIBUTE       CHAP-Password                           3       string
ATTRIBUTE       NAS-IP-Address                          4       ipaddr
ATTRIBUTE       NAS-Port                                5       integer
ATTRIBUTE       Service-Type                            6       integer
ATTRIBUTE       Framed-Protocol                         7       integer
ATTRIBUTE       Framed-IP-Address                       8       ipaddr
ATTRIBUTE       Framed-IP-Netmask                       9       ipaddr
ATTRIBUTE       Framed-Routing                          10      integer
ATTRIBUTE       Filter-Id                               11      string
ATTRIBUTE       Framed-MTU                              12      integer
ATTRIBUTE       Framed-Compression                      13      integer
ATTRIBUTE       Login-IP-Host                           14      ipaddr
ATTRIBUTE       Login-Service                           15      integer
ATTRIBUTE       Login-TCP-Port                          16      integer
# Attribute 17 is undefined
ATTRIBUTE       Reply-Message                           18      string
ATTRIBUTE       Callback-Number                         19      string
ATTRIBUTE       Callback-Id                             20      string
# Attribute 21 is undefined
ATTRIBUTE       Framed-Route                            22      string
ATTRIBUTE       Framed-IPX-Network                      23      string
ATTRIBUTE       State                                   24      string
ATTRIBUTE       Class                                   25      string
ATTRIBUTE       Vendor-Specific                         26      string
ATTRIBUTE       Session-Timeout                         27      integer
ATTRIBUTE       Idle-Timeout                            28      integer
ATTRIBUTE       Termination-Action                      29      integer
ATTRIBUTE       Called-Station-Id                       30      string
ATTRIBUTE       Calling-Station-Id                      31      string
ATTRIBUTE       NAS-Identifier                          32      string
ATTRIBUTE       Proxy-State                             33      string
ATTRIBUTE       Login-LAT-Service                       34      string
ATTRIBUTE       Login-LAT-Node                          35      string
ATTRIBUTE       Login-LAT-Group                         36      string
ATTRIBUTE       Framed-AppleTalk-Link                   37      integer
ATTRIBUTE       Framed-AppleTalk-Network                38      integer
ATTRIBUTE       Framed-AppleTalk-Zone                   39      string

ATTRIBUTE       CHAP-Challenge                          60      string
ATTRIBUTE       NAS-Port-Type                           61      integer
ATTRIBUTE       Port-Limit                              62      integer
ATTRIBUTE       Login-LAT-Port                          63      integer
VALUE   Service-Type                    Login-User              1
VALUE   Service-Type                    Framed-User             2
VALUE   Service-Type                    Callback-Login-User     3
VALUE   Service-Type                    Callback-Framed-User    4
VALUE   Service-Type                    Outbound-User           5
VALUE   Service-Type                    Administrative-User     6
VALUE   Service-Type                    NAS-Prompt-User         7
VALUE   Service-Type                    Authenticate-Only       8
VALUE   Service-Type                    Callback-NAS-Prompt     9
VALUE   Service-Type                    Call-Check              10
VALUE   Service-Type                    Callback-Administrative 11

#       Framed Protocols

#VALUE   Framed-Protocol                 PPP                     1                                                                                             VALUE   Framed-Protocol                 SLIP                    2
#VALUE   Framed-Protocol                 ARAP                    3
#VALUE   Framed-Protocol                 Gandalf-SLML            4
#VALUE   Framed-Protocol                 Xylogics-IPX-SLIP       5
#VALUE   Framed-Protocol                 X.75-Synchronous        6

#       Framed Routing Values

VALUE   Framed-Routing                  None                    0
VALUE   Framed-Routing                  Broadcast               1
VALUE   Framed-Routing                  Listen                  2
VALUE   Framed-Routing                  Broadcast-Listen        3

#       Framed Compression Types

VALUE   Framed-Compression              None                    0
VALUE   Framed-Compression              Van-Jacobson-TCP-IP     1
VALUE   Framed-Compression              IPX-Header-Compression  2
VALUE   Framed-Compression              Stac-LZS                3

#       Login Services

VALUE   Login-Service                   Telnet                  0
VALUE   Login-Service                   Rlogin                  1
VALUE   Login-Service                   TCP-Clear               2
VALUE   Login-Service                   PortMaster              3
VALUE   Login-Service                   LAT                     4
VALUE   Login-Service                   X25-PAD                 5
VALUE   Login-Service                   X25-T3POS               6
VALUE   Login-Service                   TCP-Clear-Quiet         8

#       Login-TCP-Port          (see /etc/services for more examples)

VALUE   Login-TCP-Port                  Telnet                  23
VALUE   Login-TCP-Port                  Rlogin                  513
VALUE   Login-TCP-Port                  Rsh                     514
#       Termination Options

VALUE   Termination-Action              Default                 0
VALUE   Termination-Action              RADIUS-Request          1

#       NAS Port Types

VALUE   NAS-Port-Type                   Async                   0
VALUE   NAS-Port-Type                   Sync                    1
VALUE   NAS-Port-Type                   ISDN                    2
VALUE   NAS-Port-Type                   ISDN-V120               3
VALUE   NAS-Port-Type                   ISDN-V110               4
VALUE   NAS-Port-Type                   Virtual                 5
VALUE   NAS-Port-Type                   PIAFS                   6
VALUE   NAS-Port-Type                   HDLC-Clear-Channel      7
VALUE   NAS-Port-Type                   X.25                    8
VALUE   NAS-Port-Type                   X.75                    9
VALUE   NAS-Port-Type                   G.3-Fax                 10
VALUE   NAS-Port-Type                   SDSL                    11
VALUE   NAS-Port-Type                   ADSL-CAP                12
VALUE   NAS-Port-Type                   ADSL-DMT                13
VALUE   NAS-Port-Type                   IDSL                    14
VALUE   NAS-Port-Type                   Ethernet                15
#VALUE   NAS-Port-Type                   xDSL                    16                                                                                            VALUE   NAS-Port-Type                   Cable                   17
VALUE   NAS-Port-Type                   Wireless-Other          18
VALUE   NAS-Port-Type                   Wireless-802.11         19


ATTRIBUTE Sip-Method                   101  integer    # Schulzrinne, acc
ATTRIBUTE Sip-Response-Code            102  integer    # Schulzrinne, acc
ATTRIBUTE Sip-Cseq                     103  string     # Schulzrinne, acc
ATTRIBUTE Sip-To-Tag                   104  string     # Schulzrinne, acc
ATTRIBUTE Sip-From-Tag                 105  string     # Schulzrinne, acc
ATTRIBUTE Sip-Branch-ID                106  string
ATTRIBUTE Sip-Translated-Request-URI   107  string     # Proprietary, acc
ATTRIBUTE Sip-Uri-User                 208  string     # Proprietary, auth_radius
ATTRIBUTE Sip-Group                    211  string     # Proprietary, group_radius
ATTRIBUTE Sip-Rpid                     213  string     # Proprietary, auth_radius
ATTRIBUTE Billing-Party                218  string
ATTRIBUTE SIP-AVP                      225  string     # Proprietary, avp_radius
VALUE Sip-Method         Undefined      0
VALUE Sip-Method         Invite         1
VALUE Sip-Method         Cancel         2
VALUE Sip-Method         Ack            4
VALUE Sip-Method         Bye            8
VALUE Sip-Method         Info           16
VALUE Sip-Method         Options        32
VALUE Sip-Method         Update         64
VALUE Sip-Method         Register       128
VALUE Sip-Method         Message        256
VALUE Sip-Method         Subscribe      512
VALUE Sip-Method         Notify         1024
VALUE Sip-Method         Prack          2048
VALUE Sip-Method         Refer          4096
VALUE Sip-Method         Publish        8192
VALUE Sip-Method         Other          16384
VALUE Sip-Response-Code  Undefined      0
VALUE Sip-Response-Code  Invite         1
VALUE Sip-Response-Code  Cancel         2
VALUE Sip-Response-Code  Ack            4
VALUE Sip-Response-Code  Bye            8
VALUE Sip-Response-Code  Info           16
VALUE Sip-Response-Code  Options        32
VALUE Sip-Response-Code  Update         64
VALUE Sip-Response-Code  Register       128
VALUE Sip-Response-Code  Message        256
VALUE Sip-Response-Code  Subscribe      512
VALUE Sip-Response-Code  Notify         1024
VALUE Sip-Response-Code  Prack          2048
VALUE Sip-Response-Code  Refer          4096
VALUE Sip-Response-Code  Publish        8192
VALUE Sip-Response-Code  Other          16384
VALUE Acct-Status-Type     Start             1         # RFC2866, acc
VALUE Acct-Status-Type     Stop              2         # RFC2866, acc
VALUE Acct-Status-Type     Failed           15         # RFC2866, acc
VALUE Service-Type         Call-Check       10         # RFC2865, uri_radius
VALUE Service-Type         Group-Check      12         # Proprietary, group_radius
VALUE Service-Type         Sip-Session      15         # Schulzrinne, acc, auth_radius
VALUE Service-Type         SIP-Caller-AVPs  30         # Proprietary, avp_radius
VALUE Service-Type         SIP-Callee-AVPs  31         # Proprietary, avp_radius
ATTRIBUTE       Source-IP              214     string
ATTRIBUTE       Source-Port            215     string
ATTRIBUTE       Canonical-URI          216     string
ATTRIBUTE       Delay-Time             217     string
ATTRIBUTE       Divert-Reason          219     string
ATTRIBUTE       X-RTP-Stat             220     string
ATTRIBUTE       From-Header            221     string
ATTRIBUTE       User-Agent             222     string
ATTRIBUTE       Contact                223     string
ATTRIBUTE       Event                  224     string
ATTRIBUTE       Event-Timestamp       230     string
ATTRIBUTE       SIP-Proxy-IP           231     string
ATTRIBUTE       ENUM-TLD               232     string

Any idea what the issue could be?

Thank for any help you can provide!

Justin



More information about the Users mailing list