sipster
sipster copied to clipboard
Segmentation fault
Hello,
I succes to run your example with my SIP account.
Now, i would like to call an alarm unit and drive it with DTMF code.
But, when i make a call, the lib stop and display 'Segmentation fault'
Have you some tips to help me ?
Thanks,
Stéphane
TRACE :
12:12:14.249 os_core_unix.c !pjlib 2.2.1 for POSIX initialized 12:12:14.249 sip_endpoint.c .Creating endpoint instance... 12:12:14.249 pjlib .select() I/O Queue created (0x1d52320) 12:12:14.249 sip_endpoint.c .Module "mod-msg-print" registered 12:12:14.249 sip_transport. .Transport manager created. 12:12:14.249 pjsua_core.c .PJSUA state changed: NULL --> CREATED 12:12:14.249 sip_endpoint.c .Module "mod-pjsua-log" registered 12:12:14.249 sip_endpoint.c .Module "mod-tsx-layer" registered 12:12:14.249 sip_endpoint.c .Module "mod-stateful-util" registered 12:12:14.249 sip_endpoint.c .Module "mod-ua" registered 12:12:14.249 sip_endpoint.c .Module "mod-100rel" registered 12:12:14.249 sip_endpoint.c .Module "mod-pjsua" registered 12:12:14.249 sip_endpoint.c .Module "mod-invite" registered 12:12:14.249 pa_dev.c ..PortAudio sound library initialized, status=0 12:12:14.249 pa_dev.c ..PortAudio host api count=1 12:12:14.250 pa_dev.c ..Sound device count=0 12:12:14.250 pjlib ..select() I/O Queue created (0x1d7ebb8) 12:12:14.254 sip_endpoint.c .Module "mod-evsub" registered 12:12:14.254 sip_endpoint.c .Module "mod-presence" registered 12:12:14.254 sip_endpoint.c .Module "mod-mwi" registered 12:12:14.254 sip_endpoint.c .Module "mod-refer" registered 12:12:14.254 sip_endpoint.c .Module "mod-pjsua-pres" registered 12:12:14.254 sip_endpoint.c .Module "mod-pjsua-im" registered 12:12:14.254 sip_endpoint.c .Module "mod-pjsua-options" registered 12:12:14.254 pjsua_core.c .1 SIP worker threads created 12:12:14.254 pjsua_core.c .pjsua version 2.2.1 for Linux-3.13.0.49/x86_64/glibc-2.19 initialized 12:12:14.254 pjsua_core.c .PJSUA state changed: CREATED --> INIT 12:12:14.254 pjsua_aud.c Setting null sound device.. 12:12:14.254 pjsua_aud.c .Opening null sound device.. 12:12:14.254 pjsua_core.c SIP UDP socket reachable at 192.168.0.22:5060 12:12:14.254 udp0x1d93c50 SIP UDP transport started, published address is 192.168.0.22:5060 12:12:14.255 pjsua_acc.c Adding account: id=sip:[email protected] 12:12:14.255 pjsua_acc.c .Account sip:[email protected] added with id 0 12:12:14.255 pjsua_core.c PJSUA state changed: INIT --> STARTING 12:12:14.255 sip_endpoint.c .Module "mod-unsolicited-mwi" registered 12:12:14.255 pjsua_core.c .PJSUA state changed: STARTING --> RUNNING 12:12:15.255 pjsua_aud.c !Closing sound device after idle for 1 second(s) 12:12:15.255 pjsua_aud.c .Closing null sound device.. Make call 12:12:19.258 pjsua_call.c !Making call with acc #30691984 to sip:0298050505 12:12:19.258 pjsua_aud.c .Set sound device: capture=-99, playback=-99 12:12:19.258 pjsua_aud.c ..Setting null sound device.. 12:12:19.258 pjsua_aud.c ...Opening null sound device.. Segmentation fault
This is a bit late, but I honestly have not tested the UAC scenario (making outbound calls) as my primary use case for this was for UAS scenarios (receiving incoming calls as a SIP trunk).
I have also had this. It's possibly related to #22 due to uninitialized vars. I notice there's a large amount of implicit copy c'tors happening in the .cc code, which can explain a lot. eg:
AccountConfig acct_cfg;
if (info.Length() > 0 && info[0]->IsObject()) {
acct_cfg = genConfig(info[0]->ToObject());
...
acct->create(acct_cfg, isDefault);
(But not familiar with gcc environment, so maybe it's ok with the compiler).