Asterisk and router SIP fritzbox, works fine but no sound on outbound calls

I have connected my Asterisk server to my SIP Router (I cannot connect directly to my TELCO, because give errors about authentication) So I did this
I edit sip.conf

register=> asterisk01:password@192.168.0.1

[asterisk01]
username=asterisk01
type=peer
context=uscita
secret=password
host=192.168.0.1
fromdomain=192.168.0.1
fromuser=asterisk01
qualify=yes
directmedia=no
encryption=no

extensions.conf


[uscita]
exten => _X.,1,NoOp()
same => n,Dial(SIP/${EXTEN}@asterisk01,25,tTkK)
same => n,Progress()
same => n,Hangup()

exten = s,1,NoOp()
same => n,Dial(SIP/telefono1&SIP/telefono2&DAHDI/g1,30,tTkK)
same => n,Hangup()

Works at 50%: I can call (works fine), I can receive but no audio! The call is totally mute and I didn’t hear the ringback tone, if I answer no sound on both sides

Why?

The router is FriztBox 7490

Another problem, the call must be closed by the caller (sic!), if the called close, the call remain active.

Please re-implement using chan_pjsip, as chan_sip is going away (no longer in the GIT master branch). Then use the CLI command “pjsip set logger on” to capture the actual protocol exchanges.

I making it now, thanks.
I’m totally newbie about pjsip, and I start with a very simple configuration but fail, the python script converter generate a file that don’t work (sip phone don’t autenticate)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Non mapped elements start
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[general]
bindport = 5060

[telefono1]
defaultuser = telefono1

[telefono2]
defaultuser = telefono2

[asterisk01]
username = asterisk01

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Non mapped elements end
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
--;


[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0:5060

[transport-tls]
type = transport
protocol = tls
bind = 0.0.0.0
cert_file = /etc/ssl/certs/asterisk1.blu.priv.crt
priv_key_file = /etc/ssl/private/asterisk1.blu.priv.key
ca_list_file = /etc/ssl/certs/blu.priv.crt
method = tlsv1_2

[reg_192.168.0.1]
type = registration
retry_interval = 20
max_retries = 10
expiration = 120
transport = transport-udp
outbound_auth = auth_reg_192.168.0.1
client_uri = sip:asterisk01@192.168.0.1
server_uri = sip:192.168.0.1

[auth_reg_192.168.0.1]
type = auth
password = ************
username = asterisk01

[telefono1]
type = aor
max_contacts = 1

[telefono1]
type = auth
username = telefono1
password = **********

[telefono1]
type = endpoint
context = local
allow = !all,alaw,ulaw,g729,g723,ilbc
direct_media = yes
media_encryption = sdes
inband_progress = yes
tone_zone = it
language = it
auth = telefono1
outbound_auth = telefono1
aors = telefono1

[telefono2]
type = aor
max_contacts = 1

[telefono2]
type = auth
username = telefono2
password = *******

[telefono2]
type = endpoint
context = local
allow = !all,alaw,ulaw,g729,g723,ilbc
direct_media = yes
inband_progress = yes
tone_zone = it
language = it
auth = telefono2
outbound_auth = telefono2
aors = telefono2

[asterisk01]
type = aor
contact = sip:asterisk01@192.168.0.1

[asterisk01]
type = identify
endpoint = asterisk01
match = 192.168.0.1

[asterisk01]
type = auth
username = asterisk01
password = *********

[asterisk01]
type = endpoint
context = uscita
allow = !all,alaw,ulaw,g729,g723,ilbc
direct_media = no
inband_progress = yes
from_user = asterisk01
from_domain = 192.168.0.1
tone_zone = it
language = it
auth = asterisk01
outbound_auth = asterisk01
aors = asterisk01

The non-mapped items are there because the script didn’t know how to handle them, so should be deleted. In particular, username and default_user are deprecated and current names for the same thing, and are mostly misused and redundant in chan_sip configurations.

Personally, I don’t think that the script is a good idea, because most sip.conf’s contain large amounts of garbage. It is much better to start from first principles.

This is questionable, as it is very unlikely that the phone will try to authenticate Asterisk.

I’m starting now with pjsip.conf, hope will work.
Thanks

Edit: I have configured pjsip.conf, upgraded asterisk version to latest 18.16.0 (the 16.15.0 give me some problems), upgraded pjsip to 12.1.0 and libsrtp to 2.5.0 on Slackware 15.0

Now seems to works all, if someone need this is the pjsip.conf file

1 Like

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