Skip to content

PJSIP on STM32

Alex Kalmuk edited this page Aug 1, 2019 · 11 revisions

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.

  1. Configure Embox with make confload-platform/pjsip/stm32746g.

  2. Edit configuration file conf/mods.config and type the following:

include platform.pjsip.cmd.simple_pjsua_imported(
    sip_domain="server",
    sip_user="username",
    sip_passwd="password"
)

where server is SIP server address (e.g. sip.linphone.org), username and password are your account on the specified server.

  1. Build Embox with make and load into STM32F7-Discovery. You can see how to load Embox into STM32 board here.

  2. 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:alexk2222@sip.linphone.org: registration success, status=200 (Registration succes
00:00:12.911    pjsua_acc.c  ....Keep-alive timer started for acc 0, destination:91.121.209.194:5060, interval:15s
  1. 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:

     embox>simple_pjsua_imported sip:some_account@sip.linphone.org
    
NOTE: Linphone

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

Troubleshooting

  • 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.
Clone this wiki locally
You can’t perform that action at this time.