-
Notifications
You must be signed in to change notification settings - Fork 258
WebRTC SIP Trace Capture
With The Browser Phone, SIP messages are transported via the Websocket connection. This connection is made with wss://, and is encrypted with TLS, so you cannot view the SIP messages as they pass over the network. This means typical tools like wireshark are not able to help debug any SIP message.
Although you are able to see Asterisk SIP trace with the Asterisk CLI > pjsip set logger on
, this may only be giving you half of the story, or it may be overwhelming with too many messages on a busy server.
When it comes to debugging SIP messages on WebRTC, there is a simple but hidden way to see all the messages passed between the server and the browser in plain text.
To do this, follow these steps, but note the UI may look different between Windows and Mac:
- Right Click on the Phone page, to bring up the context menu, and select Inspect. (There are various other ways of bringing up the Developer Tools, but I find this the fastest). Either way the Developer Tools will open, and by default be in the Elements Tab.
Note: Mine is oriented to the right of the existing page. Yours my be at the bottom.
- Look for the Tab called, Network. You will notice however that when you get to the Network tab, it may be empty. This is because the network capture function only works after the Developer Tools is opened.
- Now that the Developer Tools are open, you can Reload the page. You will now see a bunch of entries appear in the Network list as the resources are loaded from the server. Note: If you close the Developer tools, and open it again, you have to reload the page, it just works that way.
- If you don't filter the results (see [WS] filter near the right), it will show all the results - this is fine too, either way, select the line with the Name as
ws
and the URL aswss://<Your Asterisk Server>
.
- When you select(click) the line, you will see another set of tabs, appear on the right hand side. Click on Messages. These are the SIP messages parsed between the browser and the server, in plain text. The Red arrow pointing up indicates that the messages was sent, while the blue arrow pointing down indicates that the message was received.