Menu

Allocate Error Response error-code: 401

Yves
2011-05-08
2012-12-11
  • Yves

    Yves - 2011-05-08

    I am using TurnServer version 0.4
    The SIP client is x-lite 4.0

    Here is the message captured by the wireshark.

    STUN Message: Binding Request
    (the last message repeated many time)

    STUN2 Allocate Error Response error-code: 401 (Unauthorized) Unauthorized realm: demo.com with nonce

    I can make some call through the TURN server even my client is "Unauthorized".
    But tt is difficult to make calls through the TURN server for some time.

    Does anyone can tell what is the problem? Thanks

    turnusers.txt
    demo:testing:demo.com

    DEBUG CAPTURE
    The ip address are replaced with x.x.x.x
    listen_address = {"x.x.x.x"}
    listen_addressv6 = {}
    udp_port = 3478
    tcp_port = 3478
    tls_port = 5349
    tls = false
    dtls = false
    max_port = 45000
    min_port = 35000
    turn_tcp = false
    tcp_buffer_userspace = true
    tcp_buffer_size = 32768
    daemon = true
    unpriv_user = "turnserver"
    max_client = 50
    max_relay_per_username = 5
    allocation_lifetime = 1800
    nonce_key = "hieKedq"
    ca_file = "./ca.crt"
    cert_file = "./server.crt"
    private_key_file = "./server.key"
    realm = "demo.com"
    account_method = "file"
    account_file = "/usr/local/etc/turnserver/turnusers.txt"
    denied_address {
      address = "127.0.0.1"
      mask = 8
      port = 0
    }
    denied_address {
      address = "::1"
      mask = 128
      port = 0
    }
    bandwidth_per_allocation = 150
    account_db_login = "anonymous"
    account_db_password = "anonymous"
    account_db_name = "turnserver"
    account_db_address = "127.0.0.1"
    account_db_port = 3306

     
  • Yves

    Yves - 2011-05-10

    Does any one have some idea about this problem?

    02:18:26.390769      Received UDP on listening address
    02:18:26.390786      No message integrity
    02:18:26.405367      Received UDP on listening address
    02:18:26.405395      OK basic validation are done, process the TURN message
    02:18:26.405405      Process a TURN message
    02:18:26.405415      Allocate request received!
    02:18:26.405472      Account yves, allocations used: 3
    02:18:26.405513      Send a reservation-token attribute
    02:18:26.405531      Allocation successful, send success allocate response
    02:18:26.422144      Received UDP on listening address
    02:18:26.422161      No message integrity
    02:18:26.436974      Received UDP on listening address
    02:18:26.437001      OK basic validation are done, process the TURN message
    02:18:26.437011      Process a TURN message
    02:18:26.437019      Allocate request received!
    02:18:26.437036      Take token reserved address!
    02:18:26.437054      Account yves, allocations used: 4
    02:18:26.437095      Allocation successful, send success allocate response
    02:18:27.234137      Received UDP on listening address
    02:18:27.234157      Bad magic cookie
    02:18:27.234166      Bad STUN/TURN message or permission problem
    02:18:28.834130      Received UDP on listening address
    02:18:28.834148      Bad magic cookie
    02:18:28.834156      Bad STUN/TURN message or permission problem
    02:18:30.453345      Received UDP on listening address
    02:18:30.453363      Bad magic cookie
    02:18:30.453371      Bad STUN/TURN message or permission problem
    02:18:30.550288      Received UDP on listening address
    02:18:30.550304      Bad magic cookie
    02:18:30.550312      Bad STUN/TURN message or permission problem
    02:18:30.752063      Received UDP on listening address
    02:18:30.752079      Bad magic cookie
    02:18:30.752087      Bad STUN/TURN message or permission problem

     

Log in to post a comment.

MongoDB Logo MongoDB