baresip / baresip-ios

Baresip for iOS
46 stars 33 forks source link

I have build baresip(1.0.0) with EXTRA_MODULES='g711 audiounit avformat avcapture avcodec avfilter sdl' then added required files to my xcode project but can't succeed to make video calls. Any help ??? #38

Closed PranavSolanki230 closed 3 years ago

PranavSolanki230 commented 3 years ago

And should I need to make any changes in any .c or .h file to make the video call working? (I have never worked in objective C using swift) Any help appreciated

PranavSolanki230 commented 3 years ago

Below is the console output and I think it can't load Video Display Modules. Any suggestions

dl: mod: /usr/local/lib/baresip/modules/sdl.so (dlopen(/usr/local/lib/baresip/modules/sdl.so, 6): image not found) module sdl.so: No such file or directory dl: mod: /usr/local/lib/baresip/modules/opengles.so (dlopen(/usr/local/lib/baresip/modules/opengles.so, 6): image not found) module opengles.so: No such file or directory dl: mod: /usr/local/lib/baresip/modules/x11.so (dlopen(/usr/local/lib/baresip/modules/x11.so, 6): image not found) module x11.so: No such file or directory

PranavSolanki230 commented 3 years ago

I can build baresip 1.0.0 with above EXTRA MODULES, but when I try to register user it shows below errors: dl: mod: /usr/local/lib/baresip/modules/avformat.so (dlopen(/usr/local/lib/baresip/modules/avformat.so, 6): image not found) module avformat.so: No such file or directory vidsrc: avcapture dl: mod: /usr/local/lib/baresip/modules/sdl.so (dlopen(/usr/local/lib/baresip/modules/sdl.so, 6): image not found) And when I look for the above files (avformat.so & sdl.so) I can see those files there. Don't understand what to do next.

PranavSolanki230 commented 3 years ago

This is the console o/p. Don't know where I m going wrong.

path of config file= /var/mobile/Containers/Data/Application/xxxxxxx/Documents config: no sip_cafile defined, tls connections maybe won't work Local network address: IPv4=en0|192.xxx.xx.xxx IPv6=en0|xxxx:4041:xxx:343:xxxx:b531:xxxx:c1eb dl: mod: /usr/local/lib/baresip/modules/stdio.so (dlopen(/usr/local/lib/baresip/modules/stdio.so, 6): image not found) module stdio.so: No such file or directory aucodec: PCMU/8000/1 aucodec: PCMA/8000/1 aufilt: vumeter auplay: audiounit ausrc: audiounit avcodec: h264 encoder not found (libx264) vidcodec: H264 vidcodec: H264 vidcodec: H263 vidcodec: MP4V-ES vidcodec: H265 avcodec: using H.264 decoder 'h264' -- H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 avcodec: using H.265 decoder 'hevc' -- HEVC (High Efficiency Video Coding) avcodec: enable hwaccel using 'videotoolbox' avcodec: decode: using hardware pixel format 'videotoolbox_vld' dl: mod: /usr/local/lib/baresip/modules/avfilter.so (dlopen(/usr/local/lib/baresip/modules/avfilter.so, 6): image not found) module avfilter.so: No such file or directory vidfilt: selfview_window dl: mod: /usr/local/lib/baresip/modules/swscale.so (dlopen(/usr/local/lib/baresip/modules/swscale.so, 6): image not found) module swscale.so: No such file or directory dl: mod: /usr/local/lib/baresip/modules/avformat.so (dlopen(/usr/local/lib/baresip/modules/avformat.so, 6): image not found) module avformat.so: No such file or directory vidsrc: avcapture dl: mod: /usr/local/lib/baresip/modules/sdl.so (dlopen(/usr/local/lib/baresip/modules/sdl.so, 6): image not found) module sdl.so: No such file or directory dl: mod: /usr/local/lib/baresip/modules/opengl.so (dlopen(/usr/local/lib/baresip/modules/opengl.so, 6): image not found) module opengl.so: No such file or directory vidsrc: fakevideo vidisp: fakevideo dl: mod: /usr/local/lib/baresip/modules/sdl.so (dlopen(/usr/local/lib/baresip/modules/sdl.so, 6): image not found) module sdl.so: No such file or directory dl: mod: /usr/local/lib/baresip/modules/avformat.so (dlopen(/usr/local/lib/baresip/modules/avformat.so, 6): image not found) module avformat.so: No such file or directory medianat: stun medianat: turn medianat: ice uuid: fopen() \270\252\370/uuid (No such file or directory) dl: mod: /usr/local/lib/baresip/modules/uuid.so (dlopen(/usr/local/lib/baresip/modules/uuid.so, 6): image not found) module uuid.so: No such file or directory account: creating accounts template \270\252\370/accounts dl: mod: /usr/local/lib/baresip/modules/account.so (dlopen(/usr/local/lib/baresip/modules/account.so, 6): image not found) module account.so: No such file or directory contact: creating contacts template \270\252\370/contacts dl: mod: /usr/local/lib/baresip/modules/contact.so (dlopen(/usr/local/lib/baresip/modules/contact.so, 6): image not found) module contact.so: No such file or directory Populated 2 audio codecs Populated 1 audio filter Populated 5 video codecs Populated 1 video filter 0 ua_event(rawValue: 0) UserAgent UA_EVENT_REGISTERING USER 311@xxxx.xxx.xxxxx.int.xxxx.org REGISTERED!!!!! 2021-03-11 11:15:34.102626+0530 VideoCallBaresip[1276:296825] Can't find keyplane that supports type 4 for keyboard iPhone-PortraitChoco-NumberPad; using 25684_PortraitChoco_iPhone-Simple-Pad_Default 311@xxxx.xxx.xxxxx.int.xxxx.org: (prio 0) {0/UDP/v4} 200 OK () [1 binding] ua_event(rawValue: 1) UserAgent Regisered successfully ua: using best effort AF: af=AF_INET call: connecting to 'sip:312@xxxx.xxx.xxxxx.int.xxxx.org:xxxxx'.. ua_event(rawValue: 24)

call: SIP Progress: 100 Trying (/)

ua_event(rawValue: 25) stream: update 'audio' stream: update 'video' audio: Set audio decoder: PCMU 8000Hz 1ch audiounit: AudioRouteChange - reason 3 audio: player started with sample format S16LE audio: Set audio encoder: PCMU 8000Hz 1ch audiounit: AudioRouteChange - reason 3 audiounit: AudioRouteChange - reason 3 audiounit: record: enable resampler 8000.0 -> 8000 Hz 2021-03-11 11:15:40.735127+0530 VideoCallBaresip[1276:296861] [aid] 166: Caught analyzer graph exception 1718775073 !mrf slice duration must be set before configure. in /BuildRoot/Library/Caches/com.apple.xbs/Sources/AudioDSP/AudioDSP-360/CoreAudioUtility/Source/CADSP/DSPGraph/DSPGraph_Graph.cpp:628 audio: source started with sample format S16LE audio tx pipeline: audiounit ---> vumeter ---> PCMU audio rx pipeline: audiounit <--- vumeter <--- PCMU Call event: call_event(rawValue: 3) Call Established

[0:00:00] audio=0/0 video=0/0 (bit/s) efps=0.0/0.0
2021-03-11 11:15:40.780435+0530 VideoCallBaresip[1276:296965] 61: EXCEPTION (-1): "" 2021-03-11 11:15:40.803470+0530 VideoCallBaresip[1276:296965] 61: EXCEPTION (-1): "" 2021-03-11 11:15:40.826506+0530 VideoCallBaresip[1276:296965] 61: EXCEPTION (-1): ""

[0:00:00] audio=0/0 video=0/0 (bit/s) efps=0.0/0.0
2021-03-11 11:15:40.849874+0530 VideoCallBaresip[1276:296965] 61: EXCEPTION (-1): "" 2021-03-11 11:15:40.873039+0530 VideoCallBaresip[1276:296965] 61: EXCEPTION (-1): "" 2021-03-11 11:15:40.896236+0530 VideoCallBaresip[1276:296965] 61: EXCEPTION (-1): "" 2021-03-11 11:15:40.919713+0530 VideoCallBaresip[1276:296965] 61: EXCEPTION (-1): "" 2021-03-11 11:15:40.943025+0530 VideoCallBaresip[1276:296965] 61: EXCEPTION (-1): ""

... ... ...

[0:00:08] audio=63573/52906 video=0/0 (bit/s) efps=0.0/0.0
2021-03-11 11:15:48.467739+0530 VideoCallBaresip[1276:296965] 61: EXCEPTION (-1): "" 2021-03-11 11:15:48.491727+0530 VideoCallBaresip[1276:296965] 61: EXCEPTION (-1): "" 2021-03-11 11:15:48.514213+0530 VideoCallBaresip[1276:296965] 61: EXCEPTION (-1): "" sip:312@xxxx.xxx.xxxxx.int.xxxx.org:xxxxx: session closed: Connection reset by peer audiounit: AudioRouteChange - reason 3 Call event: call_event(rawValue: 4)

[0:00:08] audio=63573/52906 video=0/0 (bit/s) efps=0.0/0.0

[0:00:08] audio=63573/52906 video=0/0 (bit/s) efps=0.0/0.0

.... .... ....

[0:00:13] audio=0/0 video=0/0 (bit/s) efps=0.0/0.0

.... ....

[0:00:15] audio=0/0 video=0/0 (bit/s) efps=0.0/0.0

[0:00:15] audio=0/0 video=0/0 (bit/s) efps=0.0/0.0
call: terminate call '07d239d47ad2914e' with sip:312@xxxx.xxx.xxxxx.int.xxxx.org:xxxxx ua_event(rawValue: 13) Call Closed sip:311@xxxx.xxx.xxxxx.int.xxxx.org:xxxxx: Call with sip:312@xxxx.xxx.xxxxx.int.xxxx.org:xxxxx terminated (duration: 15 secs) call duration: 0

PranavSolanki230 commented 3 years ago

Below is the config file

#

baresip configuration

#

------------------------------------------------------------------------------

Core

poll_method kqueue # poll, select, kqueue ..

SIP

sip_listen 0.0.0.0:5060

sip_certificate cert.pem

sip_cafile /etc/ssl/cert.pem

Call

call_local_timeout 120 call_max_calls 4

Audio

audio_path /usr/local/share/baresip audio_player audiounit,default audio_source audiounit,default audio_alert audiounit,default

ausrc_srate 48000

auplay_srate 48000

ausrc_channels 0

auplay_channels 0

audio_txmode poll # poll, thread

audio_level no ausrc_format s16 # s16, float, .. auplay_format s16 # s16, float, .. auenc_format s16 # s16, float, .. audec_format s16 # s16, float, .. audio_buffer 20-160 # ms

Video

video_source avcapture,nil video_display sdl,nil video_size 352x288 video_bitrate 500000 video_fps 25.00 video_fullscreen no videnc_format yuv420p

AVT - Audio/Video Transport

rtp_tos 184

rtp_ports 10000-20000

rtp_bandwidth 512-1024 # [kbit/s]

rtcp_mux no jitter_buffer_type fixed # off, fixed, adaptive jitter_buffer_delay 5-10 # frames

jitter_buffer_wish 6 # frames for start

rtp_stats no

rtp_timeout 60

Network

dns_server 1.1.1.1:53

dns_server 1.0.0.1:53

dns_fallback 8.8.8.8:53

net_interface en1

Play tones

file_ausrc aufile

file_srate 16000

file_channels 1

------------------------------------------------------------------------------

Modules

module_path /usr/local/lib/baresip/modules

UI Modules

module stdio.so

module cons.so

module evdev.so

module httpd.so

Audio codec Modules (in order)

module opus.so

module amr.so

module g7221.so

module g722.so

module g726.so

module g711.so

module gsm.so

module l16.so

module mpa.so

module codec2.so

module ilbc.so

module isac.so

Audio filter Modules (in encoding order)

module vumeter.so

module sndfile.so

module speex_pp.so

module plc.so

module webrtc_aec.so

Audio driver Modules

module coreaudio.so

module audiounit.so

module jack.so

module portaudio.so

module aubridge.so

module aufile.so

module ausine.so

Video codec Modules (in order)

module avcodec.so

module vp8.so

module vp9.so

Video filter Modules (in encoding order)

module avfilter.so module selfview.so

module snapshot.so

module swscale.so

module vidinfo.so

Video source modules

module avformat.so module avcapture.so

module x11grab.so

module cairo.so

module vidbridge.so

Video display modules

module x11.so

module sdl.so module opengl.so

module videotoolbox.so

module fakevideo.so

Video output drivers

module sdl.so

Audio/Video source modules

module avformat.so

module rst.so

module gst.so

module gst_video.so

Compatibility modules

module ebuacip.so

Media NAT modules

module stun.so module turn.so module ice.so

module natpmp.so

module pcp.so

Media encryption modules

module srtp.so

module dtls_srtp.so

module zrtp.so

------------------------------------------------------------------------------

Temporary Modules (loaded then unloaded)

module_tmp uuid.so module_tmp account.so

------------------------------------------------------------------------------

Application Modules

module_app auloop.so

module_app b2bua.so

module_app contact.so module_app debug_cmd.so

module_app echo.so

module_app gtk.so

module_app menu.so

module_app mwi.so

module_app presence.so

module_app syslog.so

module_app mqtt.so

module_app ctrl_tcp.so

module_app vidloop.so

module_app httpreq.so

------------------------------------------------------------------------------

Module parameters

UI Modules parameters

cons_listen 0.0.0.0:5555 # cons

http_listen 0.0.0.0:8000 # httpd - server

ctrl_tcp_listen 0.0.0.0:4444 # ctrl_tcp

evdev_device /dev/input/event0

Opus codec parameters

opus_bitrate 28000 # 6000-510000

opus_stereo yes

opus_sprop_stereo yes

opus_cbr no

opus_inbandfec no

opus_dtx no

opus_mirror no

opus_complexity 10

opus_application audio # {voip,audio}

opus_samplerate 48000

opus_packet_loss 10 # 0-100 percent

Opus Multistream codec parameters

opus_ms_channels 2 #total channels (2 or 4)

opus_ms_streams 2 #number of streams

opus_ms_c_streams 2 #number of coupled streams

vumeter_stderr yes

jack_connect_ports yes

Selfview

video_selfview window # {window,pip} selfview_size 64x64

ZRTP

zrtp_hash no # Disable SDP zrtp-hash (not recommended)

Menu

menu_bell yes

redial_attempts 0 # Num or

redial_delay 5 # Delay in seconds

ringback_disabled no

statmode_default off

menu_clean_number no

ring_aufile ring.wav

callwaiting_aufile callwaiting.wav

ringback_aufile ringback.wav

notfound_aufile notfound.wav

busy_aufile busy.wav

error_aufile error.wav

avcodec

avcodec_h264enc libx264 avcodec_h264dec h264 avcodec_h265enc libx265 avcodec_h265dec hevc avcodec_hwaccel videotoolbox

mqtt

mqtt_broker_host 127.0.0.1

mqtt_broker_port 1883

mqtt_broker_cafile /path/to/broker-ca.crt

mqtt_broker_clientid baresip01

mqtt_broker_user user

mqtt_broker_password pass

mqtt_basetopic baresip/01

sndfile

snd_path /tmp

EBU ACIP

ebuacip_jb_type fixed # auto,fixed

HTTP request module

httpreq_ca trusted1.pem

httpreq_ca trusted2.pem

httpreq_dns 1.1.1.1

httpreq_dns 8.8.8.8

httpreq_hostname myserver

httpreq_cert cert.pem

httpreq_key key.pem