Installing Asterisk 16 on Redhat linux


#1

Hi,

I am trying asterisk for the first time and have installed asterisk 16 version on red hat linux machine.
I have installed using ./configure --with-jansson-bundled --with-pjproject-bundled options and i have configured extensions.conf, http.conf, pjsip.conf as per the asterisk documentation. My intention is to test webrtc so i had configured even those configurations as per documentation in pjsip.conf. When i run asterisk -cvvvvv , i get the following error on the

[Dec 5 18:29:14] WARNING[17786]: loader.c:2234 load_modules: Some non-required modules failed to load.
[Dec 5 18:29:14] ERROR[17786]: loader.c:2249 load_modules: Error loading module ‘res_pjsip_registrar_expire.so’: /usr/lib/asterisk/modules/res_pjsip_registrar_expire.so: cannot open shared object file: No such file or directory
[Dec 5 18:29:14] ERROR[17786]: loader.c:2249 load_modules: Failed to resolve dependencies for res_pjsip_transport_websocket
[Dec 5 18:29:14] ERROR[17786]: loader.c:2249 load_modules: res_pjsip_transport_websocket declined to load.

i searched for res_pjsip_registrar_expire.so but it was not there. Do i get to build any other module which asterisk will not build automatically to get those shared libraries ?

Inspite of these errors i tried making a normal SIP/UDP audio call from softphone. though the call is getting answered i am not able to hear any voice. All the systems are in internal same LAN.

Can someone help getting fix for above errors.
Though these are my initial steps but my target is accomplish Video conferencing using asterisk. Does asterisk support Video conferencing ?

Thanks in advance…


#2

What Asterisk documentation are you using? The res_pjsip_transport_websocket module requires res_http_websocket, if that is not loaded then it would fail to load. The easiest option for this it to just use the sample configuration files and go based on that. If you used the basic PBX, then it is very selective and leaves things out for modules and other things.

As for video conferencing it supports WebRTC SFU[1].

[1] https://wiki.asterisk.org/wiki/display/AST/Installing+and+Configuring+CyberMegaPhone


#3

Thanks jcolp for your quick response and it worked…

Yes you are right res_http_websocket.so load was missing in modules.conf. Now res_pjsip_transport_websocket error is not coming but still have following error…

[Dec 5 19:25:15] ERROR[17786]: loader.c:2249 load_modules: Error loading module ‘res_pjsip_registrar_expire.so’: /usr/lib/asterisk/modules/res_pjsip_registrar_expire.so: cannot open shared object file: No such file or directory

Thanks again in advance…


#4

That module no longer exists so it can not be loaded.


#5

Thanks again :slight_smile:

For my second question on audio one, i am not able to hear audio when i came call using Linphone SIP/UDP as transport.

*CLI> == Setting global variable ‘SIPDOMAIN’ to ‘10.0.10.117’
== Setting global variable ‘SIPDOMAIN’ to ‘10.0.10.117’
– Executing [100@from-internal:1] Answer(“PJSIP/6001-00000000”, “”) in new stack
> 0x7f7adc020d80 – Strict RTP learning after remote address set to: 106.51.120.158:53746
> 0x7f7adc020d80 – Strict RTP qualifying stream type: audio
> 0x7f7adc020d80 – Strict RTP switching source address to 10.0.4.59:53746
– Executing [100@from-internal:2] Wait(“PJSIP/6001-00000000”, “1”) in new stack
– Executing [100@from-internal:3] Playback(“PJSIP/6001-00000000”, “hello-world”) in new stack
– <PJSIP/6001-00000000> Playing ‘hello-world.gsm’ (language ‘en’)
– Executing [100@from-internal:4] Hangup(“PJSIP/6001-00000000”, “”) in new stack
== Spawn extension (from-internal, 100, 4) exited non-zero on ‘PJSIP/6001-00000000’

Thanks in advance…


#6

Asterisk appears to have received audio from your Linphone and is sending media to it. You can confirm this using “rtp set debug on” which will show packets going out. If those are indeed going out, then you’d need to look on the client side.


#7

HI jcolp,

I have enabled the RTP , following is the result…

Sent RTP packet to 106.51.120.158:55507 (type 00, seq 018525, ts 009280, len 000160)
Got RTP packet from 10.0.4.59:55507 (type 00, seq 000112, ts 1228186762, len 000160)
Sent RTP packet to 106.51.120.158:55507 (type 00, seq 018526, ts 009440, len 000160)
Got RTP packet from 10.0.4.59:55507 (type 00, seq 000113, ts 1228186922, len 000160)
Sent RTP packet to 106.51.120.158:55507 (type 00, seq 018527, ts 009600, len 000160)
Got RTP packet from 10.0.4.59:55507 (type 00, seq 000114, ts 1228187082, len 000160)
Sent RTP packet to 106.51.120.158:55507 (type 00, seq 018528, ts 009760, len 000160)
Got RTP packet from 10.0.4.59:55507 (type 00, seq 000115, ts 1228187242, len 000160)

it is sending to this 106.51.120.158 but my systems are in local LAN only. Is it doing any ICE transactions ?

Thanks…


#8

ICE is not in use. It is entirely possible that Linphone is placing your public IP address into the traffic to Asterisk, and per configuration Asterisk would be sending where it is told. You can either disable Linphone from doing that, or set “rtp_symmetric=yes” on the endpoint which will cause Asterisk to ignore it and send it to the source instead.


#9

Hi jcolp,

My Linphone was sending ICE messages. Now without ICE it is working…

Thanks a lot , you made my day :slight_smile:


#10

Hi jcolp,

Now i am testing with WebRTC client. i am getting the following error…

[Dec 5 20:09:24] NOTICE[18857]: res_pjsip/pjsip_transport_management.c:152 idle_sched_cb: Shutting down transport ‘WSS to 10.0.4.59:54722’ since no request was received in 32 seconds
[Dec 5 20:09:24] ERROR[18866]: res_http_websocket.c:525 ws_safe_read: Error reading from web socket: Success
[Dec 5 20:09:24] ERROR[18866]: iostream.c:538 ast_iostream_close: SSL_shutdown() failed: error:00000005:lib(0):func(0):DH lib, Underlying BIO error: Broken pipe
== WebSocket connection from ‘10.0.4.59:54722’ closed
== WebSocket connection from ‘10.0.4.59:54770’ for protocol ‘sip’ accepted using version ‘13’
– Added contact ‘sip:n71rber6@10.0.4.59:54770;transport=ws’ to AOR ‘webrtc_client’ with expiration of 600 seconds
== Endpoint webrtc_client is now Reachable
== Setting global variable ‘SIPDOMAIN’ to ‘10.0.10.117’
[Dec 5 20:09:45] ERROR[18848]: res_rtp_asterisk.c:1963 ast_rtp_dtls_set_configuration: SRTP support module is not loaded or available. Try loading res_srtp.so.
[Dec 5 20:09:45] ERROR[18848]: res_pjsip_sdp_rtp.c:899 setup_dtls_srtp: Attempted to set an invalid DTLS-SRTP configuration on RTP instance ‘0x7f6d64026a70’

Thanks in advance…


#11

I’d suggest reading the error messages as it states a reason.

As well if you are planning to use WebRTC at all you NEED To have good debugging/investigation/log reading skills, as WebRTC CAN and WILL fail and the people here won’t dig into the level necessary to figure out what is wrong due to the underlying complexity of WebRTC itself.


#12

Hi jcolp,

Thanks for the input. I am not able to find res_srtp.so , do i need to build it separately ?
I can see res_srtp.c file . can i compile that to generate the .so file ?
Please kindly direct me.

thanks in advance…


#13

It’s included with the Asterisk source code. It has a dependency on libsrtp, without that it will not be built. Information about this and the basics are documented in many places, so I won’t be responding further unless it’s a specific niche problem.


#14

Hi jcolp,

Thanks a lot for your support.
Sure will check for the documentation…

thanks.