fonoster / routr

⚡ The future of programmable SIP servers.

Home Page:https://routr.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

registration with websockets does not work

dolwol opened this issue · comments

hi
i use an websocket javascript client. and it looks like routr does not answer the registration request.

i can see the request in den browers dev tools:
REGISTER sip:192.168.2.200 SIP/2.0
Via: SIP/2.0/WSS 2qigegunhi5b.invalid;branch=z9hG4bK4567235
Max-Forwards: 69
To: sip:1002@192.168.2.200
From: sip:1002@192.168.2.200;tag=l3areu9duc
Call-ID: t29ma3ru82ag48s6gg0946
CSeq: 1 REGISTER
Contact: sip:1p8n0lr4@2qigegunhi5b.invalid;transport=ws;+sip.ice;reg-id=1;+sip.instance="urn:uuid:0a828c3b-a148-4db0-935f-257603c5980f";expires=600
Expires: 600
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY
Supported: path,gruu,outbound
User-Agent: JsSIP 3.9.0
Content-Length: 0

but i do not see an answer in the dev tools
in the routr logs i see:

DEBUG] core.processor.RequestProcessor.process [route type UNKNOWN]

[DEBUG] core.processor.RequestProcessor.process [entity info null]

[DEBUG] core.processor.RequestProcessor.process [running handler for method REGISTER]

[DEBUG] List of gateways in quarantine: []

[DEBUG] core.processor.RegistryHandler.doProcess [via addr {"host":"172.17.0.3","port":8089}]

if i list the registed agents with rctl lcoate, i do not see the particual client.

Registrations with udp/tcp do work.

thanks for your help.

@dolwol

Few questions:

  • Does Routr's initial output show WSS as a transport? Are you using port 5063?
  • What happens if you use WS instead of WSS?
  • Can you try using SIP.js instead (or wPhone)
  • If you use wireshark or sngrep, what do you see? (For this you should use WS and no WSS)

Let me know.

thanks for your answer.

  • in the logs i see: [INFO ] Listening on 172.17.0.3:8089 [wss]
  • With WS do not get a connection. i think mi sip javascript does not support ws, see: https://tech7fox.github.io/sip-hass-docs/docs/card/introduction
  • i tried with wPhone. that worked.
  • since it looks like the sip client dos not work with ws i think that dos not make sense.

i think is related to the other javascript sip client. do you have any idea why it does not work?

I know of people using JsSIP with Routr, but I personally never have.

Can you show the initial output in Routr? Does it show WS as a transport?

is this the inital output?

2022-05-10T18:29:41.384259799Z [INFO ] Starting Routr

2022-05-10T18:29:41.388998207Z [INFO ] ExternAddr is 192.168.2.200

2022-05-10T18:29:41.394761572Z [INFO ] Localnets is 172.17.0.3/31

2022-05-10T18:29:41.514875611Z log4j:WARN No appenders could be found for logger (routr).

2022-05-10T18:29:41.515097265Z log4j:WARN Please initialize the log4j system properly.

2022-05-10T18:29:41.515287168Z log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

2022-05-10T18:29:41.969080664Z [INFO ] Listening on 172.17.0.3:5060 [tcp]

2022-05-10T18:29:41.987473227Z [INFO ] Listening on 172.17.0.3:5060 [udp]

2022-05-10T18:29:42.003233806Z [INFO ] Listening on 172.17.0.3:8089 [wss]

2022-05-10T18:29:43.699078141Z [DEBUG] Starting Restful service server

2022-05-10T18:29:44.512202386Z [DEBUG] location.RouteLoader.loadStaticRoutes [loading static routes]

2022-05-10T18:29:45.778689382Z [INFO ] Restful service server listening on port 4567

2022-05-10T18:29:45.857507664Z [DEBUG] Restful service server configuration: Config(

2022-05-10T18:29:45.857698380Z apiPath = /api/v1beta1

2022-05-10T18:29:45.857764894Z bindAddr = 0.0.0.0

2022-05-10T18:29:45.857842545Z port = 4567

2022-05-10T18:29:45.857896646Z unsecured = false

2022-05-10T18:29:45.857956747Z keyStorePassword = *****

2022-05-10T18:29:45.858012398Z keyStore = etc/certs/api-cert.jks

2022-05-10T18:29:45.858072899Z trustStore = etc/certs/api-cert.jks

2022-05-10T18:29:45.858235115Z trustStorePassword = *****

2022-05-10T18:29:45.858294491Z maxThreads = 200

2022-05-10T18:29:45.858350829Z minThreads = 8

2022-05-10T18:29:45.858407093Z timeoutMillis = 5000

2022-05-10T18:29:45.858462806Z )

2022-05-10T18:29:47.040754712Z [DEBUG] Starting gRPC service, listening on 50099

2022-05-10T18:29:50.346587836Z [DEBUG] core.processor.RequestProcessor.process [route type UNKNOWN]

2022-05-10T18:29:50.348846001Z [DEBUG] core.processor.RequestProcessor.process [entity info null]

2022-05-10T18:29:50.414363286Z [DEBUG] core.processor.RequestProcessor.process [running handler for method REGISTER]

2022-05-10T18:29:50.429896786Z [DEBUG] List of gateways in quarantine: []

2022-05-10T18:29:50.478943504Z [DEBUG] core.processor.RegistryHandler.doProcess [via addr {"host":"172.17.0.3","port":8089}]

2022-05-10T18:29:50.577115879Z [DEBUG] core.processor.RequestProcessor.process [route type UNKNOWN]

2022-05-10T18:29:50.578386727Z [DEBUG] core.processor.RequestProcessor.process [entity info null]

2022-05-10T18:29:50.589877180Z [DEBUG] core.processor.RequestProcessor.process [running handler for method REGISTER]

2022-05-10T18:29:50.596574749Z [DEBUG] List of gateways in quarantine: []

2022-05-10T18:29:50.599188820Z [DEBUG] core.processor.RegistryHandler.doProcess [via addr {"host":"172.17.0.3","port":8089}]

2022-05-10T18:29:50.616938059Z [DEBUG] core.processor.RequestProcessor.process [route type UNKNOWN]

2022-05-10T18:29:50.617848038Z [DEBUG] core.processor.RequestProcessor.process [entity info null]

2022-05-10T18:29:50.637855442Z [DEBUG] core.processor.RequestProcessor.process [running handler for method REGISTER]

2022-05-10T18:29:50.642401635Z [DEBUG] List of gateways in quarantine: []

i do not have ws configured. do i need to set a port vor ws that wss works?

I recommend enabling ws it for troubleshooting purposes. If it works with ws then you might have an issue with your tls certificates.

Which is my next question. When running JsSIP, are you also using https?

okay, thank you. since it works with wPhone, i wil get in touch with the provider of the javascript that does not work. i cannot configure that javascritp to use ws.

@dolwol sounds good. But feel free to re-open the issue if needed.