pjsip / pjproject

PJSIP project
http://www.pjsip.org
GNU General Public License v2.0
2.08k stars 788 forks source link

pjsua get_frame fails #2345

Closed ForeverACE closed 4 years ago

ForeverACE commented 4 years ago

I am encountering an error that seems similar to one that has already been resolved (i.e. (https://trac.pjsip.org/repos/ticket/1510). When I try to run pjsua, I get the following error:

*pjsua-armv7l-unknown-linux-gnueabihf: ../src/pjmedia/conference.c:1895: get_frame: Assertion 'frame->size == conf->samples_per_frame conf->bits_per_sample / 8' failed.**

Background

Compile Steps ./configure --disable-video --disable-ffmpeg --disable-v4l2 && make dep && make

Contents of custom.cfg --id=sip:300@10.0.0.150 --registrar=sip:10.0.0.150 --realm=* --username=300 --password=my_secret_password --local-port=5060 --auto-answer=200 --auto-loop --max-calls=1 --capture-dev=14 --playback-dev=14

Command ./pjsua-armv7l-unknown-linux-gnueabihf --config-file=custom.cfg

Output/Console --------Console Output Start-------- 13:55:13.429 os_core_unix.c !pjlib 2.10 for POSIX initialized 13:55:13.432 sip_endpoint.c .Creating endpoint instance... 13:55:13.433 pjlib .select() I/O Queue created (0x4e1310) 13:55:13.433 sip_endpoint.c .Module "mod-msg-print" registered 13:55:13.434 sip_transport. .Transport manager created. 13:55:13.434 pjsua_core.c .PJSUA state changed: NULL --> CREATED 13:55:13.434 sip_endpoint.c .Module "mod-pjsua-log" registered 13:55:13.434 sip_endpoint.c .Module "mod-tsx-layer" registered 13:55:13.434 sip_endpoint.c .Module "mod-stateful-util" registered 13:55:13.434 sip_endpoint.c .Module "mod-ua" registered 13:55:13.435 sip_endpoint.c .Module "mod-100rel" registered 13:55:13.435 sip_endpoint.c .Module "mod-pjsua" registered 13:55:13.435 sip_endpoint.c .Module "mod-invite" registered 13:55:13.642 alsa_dev.c ..ALSA driver found 28 devices 13:55:13.642 alsa_dev.c ..ALSA initialized 13:55:13.643 pjlib ..select() I/O Queue created (0x4ff4d4) 13:55:13.656 sip_endpoint.c .Module "mod-evsub" registered 13:55:13.656 sip_endpoint.c .Module "mod-presence" registered 13:55:13.656 sip_endpoint.c .Module "mod-mwi" registered 13:55:13.656 sip_endpoint.c .Module "mod-refer" registered 13:55:13.656 sip_endpoint.c .Module "mod-pjsua-pres" registered 13:55:13.656 sip_endpoint.c .Module "mod-pjsua-im" registered 13:55:13.656 sip_endpoint.c .Module "mod-pjsua-options" registered 13:55:13.656 pjsua_core.c .1 SIP worker threads created 13:55:13.656 pjsua_core.c .pjsua version 2.10 for Linux-4.19.97/armv7l/glibc-2.28 initialized 13:55:13.656 pjsua_core.c .PJSUA state changed: CREATED --> INIT 13:55:13.656 sip_endpoint.c Module "mod-default-handler" registered 13:55:13.657 pjsua_core.c SIP UDP socket reachable at 10.0.0.1:5060 13:55:13.657 udp0x526420 SIP UDP transport started, published address is 10.0.0.1:5060 13:55:13.657 pjsua_acc.c Adding account: id= 13:55:13.657 pjsua_acc.c .Account added with id 0 13:55:13.657 pjsua_acc.c Modifying account 0 13:55:13.657 pjsua_acc.c Acc 0: setting online status to 1.. 13:55:13.658 tcptp:5060 SIP TCP listener ready for incoming connections at 10.0.0.1:5060 13:55:13.658 pjsua_acc.c Adding account: id=<sip:10.0.0.1:5060;transport=TCP> 13:55:13.658 pjsua_acc.c .Account <sip:10.0.0.1:5060;transport=TCP> added with id 1 13:55:13.658 pjsua_acc.c Modifying account 1 13:55:13.658 pjsua_acc.c Acc 1: setting online status to 1.. 13:55:13.658 pjsua_acc.c Adding account: id=sip:300@10.0.0.150 13:55:13.658 pjsua_acc.c .Account sip:300@10.0.0.150 added with id 2 13:55:13.658 pjsua_acc.c .Acc 2: setting registration.. 13:55:13.658 pjsua_core.c ...TX 521 bytes Request msg REGISTER/cseq=9220 (tdta0x51a22c) to UDP 10.0.0.150:5060: REGISTER sip:10.0.0.150 SIP/2.0 Via: SIP/2.0/UDP 10.0.0.1:5060;rport;branch=z9hG4bKPjYv.B5E3fJAwO.VICld10bujUyC00PSVu Max-Forwards: 70 From: sip:300@10.0.0.150;tag=-zhY7TVSZA4g9y3Ncdz.CErhZEYia53e To: sip:300@10.0.0.150 Call-ID: KNvi6yO3yZKzNBOt0dlswDhoksFv1bLu CSeq: 9220 REGISTER User-Agent: PJSUA v2.10 Linux-4.19.97/armv7l/glibc-2.28 Contact: sip:300@10.0.0.1:5060;ob Expires: 300 Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Content-Length: 0

--end msg-- 13:55:13.658 pjsua_acc.c ..Acc 2: Registration sent 13:55:13.659 pjsua_acc.c Acc 2: setting online status to 1.. 13:55:13.659 pjsua_aud.c Set sound device: capture=14, playback=14 13:55:13.659 pjsua_app.c .Turning sound device 14 14 ON 13:55:13.659 pjsua_aud.c .Opening sound device (speaker + mic) PCM@16000/1/20ms 13:55:13.667 pjsua_core.c .RX 556 bytes Response msg 401/REGISTER/cseq=9220 (rdata0x516a44) from UDP 10.0.0.150:5060: SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 10.0.0.1:5060;branch=z9hG4bKPjYv.B5E3fJAwO.VICld10bujUyC00PSVu;received=10.0.0.1;rport=5060 From: sip:300@10.0.0.150;tag=-zhY7TVSZA4g9y3Ncdz.CErhZEYia53e To: sip:300@10.0.0.150;tag=as6c300689 Call-ID: KNvi6yO3yZKzNBOt0dlswDhoksFv1bLu CSeq: 9220 REGISTER Server: FPBX-12.0.76.3(11.19.0) Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="2807af4c" Content-Length: 0

--end msg-- 13:55:13.672 ec0x5266d8 ..Speex AEC created, clock_rate=16000, channel=1, samples per frame=320, tail length=200 ms, latency=0 ms 13:55:13.672 pjsua_core.c !PJSUA state changed: INIT --> STARTING 13:55:13.673 pjsua_core.c ....TX 677 bytes Request msg REGISTER/cseq=9221 (tdta0x51a22c) to UDP 10.0.0.150:5060: REGISTER sip:10.0.0.150 SIP/2.0 Via: SIP/2.0/UDP 10.0.0.1:5060;rport;branch=z9hG4bKPjV8XUIOge9FUkmb0V0CmupyOXp7pxyb1S Max-Forwards: 70 From: sip:300@10.0.0.150;tag=-zhY7TVSZA4g9y3Ncdz.CErhZEYia53e To: sip:300@10.0.0.150 Call-ID: KNvi6yO3yZKzNBOt0dlswDhoksFv1bLu CSeq: 9221 REGISTER User-Agent: PJSUA v2.10 Linux-4.19.97/armv7l/glibc-2.28 Contact: sip:300@10.0.0.1:5060;ob Expires: 300 Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Authorization: Digest username="300", realm="asterisk", nonce="2807af4c", uri="sip:10.0.0.150", response="6421fdc8f566878acde7edb32c607a90", algorithm=MD5 Content-Length: 0

--end msg-- 13:55:13.673 sip_endpoint.c !.Module "mod-unsolicited-mwi" registered 13:55:13.673 pjsua_core.c .PJSUA state changed: STARTING --> RUNNING 13:55:13.673 main.c Ready: Success

Account list: [ 0] : does not register Online status: Online [ 1] <sip:10.0.0.1:5060;transport=TCP>: does not register Online status: Online pjsua-armv7l-unknown-linux-gnueabihf: ../src/pjmedia/conference.c:1895: get_frame: Assertion `frame->size == conf->samples_per_frame conf->bits_per_sample / 8' failed. [ 2] sip:300@10.0.0.150: 100/In Progress (expires=0) Online status: Online Buddy list: Aborted ---------Console Output End---------

Syirrus commented 4 years ago

I have the exact same issue. Were you able to find a solution or a workaround?

ForeverACE commented 4 years ago

Unfortunately, no. I'm currently using Linphone but I'd rather use PJSIP.

Syirrus commented 4 years ago

Unfortunately, no. I'm currently using Linphone but I'd rather use PJSIP.

I understand and thanks for responding. I was afraid you might say that. I ended up compiling and using baresip. It is lightweight and audio and video work straight from command line without the need for X11. I hope this issue can be fixed for PJSIP, but honestly, I'm quite impressed with baresip for my needs.