WebRTC-Server-Setup icon indicating copy to clipboard operation
WebRTC-Server-Setup copied to clipboard

Regarding ICE server URL

Open sabaleroshan opened this issue 7 years ago • 11 comments

Hello,

Thank you for this instruction.

But I m bit confused for below code:

ICE_SERVER_BASE_URL = 'https://alexshopping.top' ICE_SERVER_URL_TEMPLATE = '%s/v1alpha/iceconfig?key=%s' ICE_SERVER_API_KEY = os.environ.get('ICE_SERVER_API_KEY')

Which URL , API key can we used on our own server.

Thank you in advance.

sabaleroshan avatar Jan 25 '19 09:01 sabaleroshan

@sabaleroshan URL need to fill in your own ip, API key don't need to fill.

Axingx avatar Feb 01 '19 10:02 Axingx

@Axingx ohk thanks let me check can i also add IP with port or without port

sabaleroshan avatar Feb 01 '19 10:02 sabaleroshan

@Axingx no, still the same issue can you attached that sample file with necessary changes in both

sabaleroshan avatar Feb 01 '19 10:02 sabaleroshan

`# Turn/Stun server override. This allows AppRTC to connect to turn servers

directly rather than retrieving them from an ICE server provider.

#ICE_SERVER_OVERRIDE = None

Enable by uncomment below and comment out above, then specify turn and stun

ICE_SERVER_OVERRIDE = [ { "urls": [ "turn:172.xx.xxx.186:3478?transport=udp", "turn:172.xx.xxx.186:3478?transport=tcp" ], "username": "hechao", "credential": "0x4a5bb70f7a87322fec2920bd24679891" }, { "urls": [ "stun:172.xx.xxx.186:3479" ] } ]

ICE_SERVER_BASE_URL = 'https://alexshopping.top' ICE_SERVER_URL_TEMPLATE = '%s/v1alpha/iceconfig?key=%s' ICE_SERVER_API_KEY = os.environ.get('ICE_SERVER_API_KEY')

Dictionary keys in the collider instance info constant.

WSS_INSTANCE_HOST_KEY = 'host_port_pair' WSS_INSTANCE_NAME_KEY = 'vm_name' WSS_INSTANCE_ZONE_KEY = 'zone' WSS_INSTANCES = [{ WSS_INSTANCE_HOST_KEY: 'alexshopping.top:443', WSS_INSTANCE_NAME_KEY: 'wsserver-std', WSS_INSTANCE_ZONE_KEY: 'us-central1-a' },{ WSS_INSTANCE_HOST_KEY: 'alexshopping.top:443', WSS_INSTANCE_NAME_KEY: 'wsserver-std-2', WSS_INSTANCE_ZONE_KEY: 'us-central1-f' }]

WSS_HOST_PORT_PAIRS = [ins[WSS_INSTANCE_HOST_KEY] for ins in WSS_INSTANCES]

memcache key for the active collider host.

WSS_HOST_ACTIVE_HOST_KEY = 'wss_host_active_host'`

Axingx avatar Feb 01 '19 10:02 Axingx

@Axingx As per your suggestion I made changes but when I connecting from my application in firefox it shows :

Firefox can’t establish a connection to the server at wss://192...*:8080/ws. and

Message: web socket open error: WEBSOCKET ERROR web socket register error: WEBSOCKET ERROR

sabaleroshan avatar Feb 01 '19 11:02 sabaleroshan

def get_wss_parameters(request): ws_host_port_pair = request.get('wshpp') ws_tls = request.get('wstls')

  if not ws_host_port_pair:
    memcache_client = memcache.Client()
    ws_active_host = memcache_client.get(constants.WSS_HOST_ACTIVE_HOST_KEY)
    if ws_active_host in constants.WSS_HOST_PORT_PAIRS:
      ws_host_port_pair = ws_active_host
    else:
      logging.warning(
          'Invalid or no value returned from memcache, using fallback: '
          + json.dumps(ws_active_host))
      ws_host_port_pair = constants.WSS_HOST_PORT_PAIRS[0]

  if wss_tls and wss_tls == 'false':
    wss_url = 'ws://' + ws_host_port_pair + '/ws'
    wss_post_url = 'http://' + ws_host_port_pair
  else:
    wss_url = 'ws://' + ws_host_port_pair + '/ws'
    wss_post_url = 'http://' + ws_host_port_pair
  return (wss_url, wss_post_url)

Axingx avatar Feb 01 '19 11:02 Axingx

@Axingx Hello,

I m still facing WebSocket error issue.

Can you please provide ur Email so we can communicate over there.

Thank you

sabaleroshan avatar Feb 04 '19 06:02 sabaleroshan

Hello @Axingx

We have go through your article and its fantastic... !!

We have already setup STUN and TURN as well as Signalling server on my server, but we got issues related to the connection.

We require your help to set up my servers for voice and video calling.

Please revert on this if you can help us to create the servers on our demands, and please share the price for set up all the servers

Thanks & Regards, Roshan.

roshansabale avatar Feb 08 '19 12:02 roshansabale

@Axingx As per your suggestion I made changes but when I connecting from my application in firefox it shows :

Firefox can’t establish a connection to the server at wss://192...*:8080/ws. and

Message: web socket open error: WEBSOCKET ERROR web socket register error: WEBSOCKET ERROR

@sabaleroshan did you ever resolve this? Facing the exact same problem. Hoping you can assist.

ubest1 avatar Feb 09 '23 12:02 ubest1

Yeah It resolved and server working fine now! Thanks

roshansabale avatar Feb 09 '23 12:02 roshansabale

Yeah It resolved and server working fine now! Thanks

Nice! can you share what your root cause was and possibly how you resolved the problem @roshansabale ?

ubest1 avatar Feb 11 '23 01:02 ubest1