PJSIP on STM32
Running PJSIP on STM32F7Discovery
Embox is able to run PJSIP on STM32F7-Discovery board with 340 Kb RAM and 1Mb ROM.
Demo video is here.
Configure Embox with
Edit configuration file
conf/mods.configand type the following:
include platform.pjsip.cmd.simple_pjsua_imported( sip_domain="server", sip_user="username", sip_passwd="password" )
server is SIP server address (e.g.
password are your account on the specified server.
Build Embox with
makeand load into STM32F7-Discovery. You can see how to load Embox into STM32 board here.
In Embox type "simple_pjsua_imported". After command execution, you will see something the following:
00:00:12.870 pjsua_acc.c ....SIP outbound status for acc 0 is not active 00:00:12.884 pjsua_acc.c ....sip:email@example.com: registration success, status=200 (Registration succes 00:00:12.911 pjsua_acc.c ....Keep-alive timer started for acc 0, destination:22.214.171.124:5060, interval:15s
Finally, you can make a call to Embox using a SIP phone (simple_pjsua, pjsua or another, see NOTE: Linphone below if you are using linphone). Insert speakers to CN10 out and speak to the MEMS microphones (Micro Left and Micro Right located beside the display).
For example, to make a call from to some linphone account do:
If you are using linphone, probably you will need some of the following things:
- Set up UDP (SIP)
- If you cannot register on a SIP server due to you are behind NAT, use
Behind NAT/ Firewall (use uPnP), read more here.
- Disable all codecs except PCMU and PCMA
- If a connection to SIP server was not established, please make sure DNS is configured correctly in Embox:
# ping google.com
If ping doesn't work, then check your conf/mods.config and check if
include embox.net.lib.dns_fixed(nameserver="192.168.0.1") has correct nameserver.
- If you connected to SIP server but doesn't hear anything, please make sure Audio can be recorded and played well on your board, the tutorial is here.