Asterisk Issue in Ubuntu server

Hello communitty,

I have installed asterisk 13.28.1 in a Ubuntu Server 18.04.3 (Virtual Machine)

I have also installed 2 softphones (zoiper3), one in my physical windows machine, and the other on the VW.

The Windows machine and the VM are connected to the same network.

When i make the call between the two, I dont have audio.

But when i unplug the WAN wire from the router, in order not to get the external ip, then audio comes back.

I have disabled firewall both on Windows and VM .

Could you please help me ??

Thanks in advance.

Here is a link with the images of the conf. files. : https://imgur.com/a/W921xzj

Hello community again,

I’ve solved the issues with the audio.

But i have to turn off the firewall from the VM.

Can someone help me with that ?

Thanks in advance.

If you are using pjsip nat parameters is invalid. Use this parameters.

rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes

And should not turn off firewall. Only must give access rtp ports.
By default, SIP uses the UDP port 5060, to open the port run:

sudo ufw allow 5060/udp

If you enabled the Real Time Protocol (RTP) then you also need to open the following port range:

sudo ufw allow 10000:20000/udp

Feel free to adjust the firewall according to your need.

You seem to have a confused mixture of chan_sip and chan _pjsip configurations, although your outgoing calls are all chan_sip.

nat= is overused.

If possible, please provide configurations in the posting itself, as text. Failing that, as external plain text files.

Hello david,

Thank you for your response.

Here are my configurations :

extensions.conf file :

[from-internal]

exten=>6001,1,Dial(SIP/George,20)
exten=>6001,n,VoiceMail(6001@vm-demo,u)
exten=>6002,1,Dial(SIP/Renia,20)
exten=>6002,n,VoiceMail(6002@vm-demo,u)
exten=>6500,1,Answer(500)
exten=>6500,n,VoiceMailMain(@vm-demo)

pjsip.conf file :

[transport-udp-nat]
type=transport
protocol=udp
bind=0.0.0.0
localnet=192.168.0.0/24
localnet=127.0.0.1/32
external_media_address=x.x.x.x
external_signaling_address=x.x.x.x
qualify=yes
externip=x.x.x.x
nat=force_rport,comedia

endpoint_internal
type=endpoint
context=from-internal
disallow=all
allow=ulaw

auth_userpass
type=auth
auth_type=userpass

aor_dynamic
type=aor
max_contacts=1

George
type=endpoint
context=from-internal
disallow=all
allow=ulaw
transport=transport-udp-nat
direct_media=no
auth=George
aors=George
George
password=1234
username=George
George

Renia
type=endpoint
context=from-internal
disallow=all
allow=ulaw
transport=transport-udp-nat
direct_media=no
auth=Renia
aors=Renia
Renia
password=1234
username=Renia
Renia

sip.conf file :

[general]
transport=udp
nat=force_rport,comedia
directmedia=no
disallow=all
allow=ulaw
;nat=force_rport,media
externip=x.x.x.x
localnet=192.168.0.0/255.255.255.0

friends_internal
type=friend
context=from-internal
host=dynamic
disallow=all
allow=ulaw
externip=x.x.x.x

George
secret=1234

Renia
secret=1234

You have both chan_sip and chan_pjsip trying to bind to port 5060. That isn’t going to work.

You have a least one parameter that is only defined for chan_sip (nat=) in your pjsip configuration. I think others may be the same.

So what do i have to change to be correct ?

your exensions.conf use chan_sip module like "Dial(SIP/…) "
but your pjsip.conf use chan_pjsip module

if i were you, edit extensions.conf ( “SIP” > “PJSIP”) and disable chan_sip module(use only chan_pjsip)

You also need to convert what is currently in sip.conf to the equivalent for pjsip.conf.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.