Asterisk WebRTC & PJSIP
Contents
References
Read these ressources:
- https://wiki.asterisk.org/wiki/display/AST/Configuring+Asterisk+for+WebRTC+Clients
- https://wiki.asterisk.org/wiki/display/AST/WebRTC+tutorial+using+SIPML5
- https://wiki.voip.ms/article/Asterisk_PJSIP
- https://wiki.asterisk.org/wiki/display/AST/PJSIP+Configuration+Sections+and+Relationships
my notes, in the following sections, are only to document some bits that were not obvious at first.
PJSIP Wizard
The PJSIP Configuration Wizard avoids having to write those really redundant PJSIP sections.
PJSIP commands
Display SIP registrations (ex: connected to voip.ms accounts):
|
|
Display SIP devices locally connected:
|
|
Opus codec installation
- Install the opus codec for webrtc (
apt-get install asterisk-opus
)
Fixed: “Unable to find a codec translation path: (opus) -> (ulaw)”.
asterisk http.conf
|
|
I used nginx to handle https, because … habits and felt simpler (my asterisk VM didn’t have certbot/dehydrated).
asterisk pjsip.conf
I got rid of the old “sip” module, but that’s not required, both can run.
|
|
todo: document trunk configurations.
extensions.conf
To switch from SIP to PJSIP, I had to change my dialplan so that it used, for example:
|
|
sipML5 installation
- https://www.doubango.org/sipml5/
git clone https://github.com/DoubangoTelecom/sipml5
- remove google-analytics from index.html and call.html
Add to a nginx vhost with https:
|
|
based on: https://gist.github.com/steve-ng/ed6de1fa702ef70bd6ce
When using sipml5:
- Dial Name: John Doe
- Private Identity:
testrtc
- Public Identity:
sip:testrtc@mydomain.org
- Password:
fixme
- Realm:
mydomain.org
(because I have set one in pjsip.conf) - Expert mode:
- Disable video: ✔
- WebSocket Server URL:
wss://myvoip.myserver.org:443/ws
- Disable 3GPP Early IMS: ✔
- Disable debug messages: ✔
- Cache the media stream: ✔
Author Mathieu Lu
LastMod 2020-05-17