Problem voip they can hear me but i can't hear them

Hello

Thank you for assisting us with this problem in order to make our first call successfully
When I call someone, he can hear me, but I can’t hear him, I have checked my equipment
As you see in the image below the server is well configured

my provider use codec g711alaw

You are using an unsupported channel driver, please use chan_pjsip, instead.

You are using an unknown version of Asterisk, please let us know which.

You have provide images of debug information, please provide the actual text files from /var/log/asterisk.

This is typically a NAT problem, for which we need to know your network topology and the channel driver configuration from Asterisk (sip.conf, with your deprecated driver). It is also likely that we will need a protocol trace, if there is no obvious NAT configuration error (sip set debug on, with your driver).

It could also be a firewall problem, for which rtp.conf may also be needed.

Hey bro thanks for the support
this is my sip.conf
[general]
context=internal
;allowguest=no
allowoverlap=no
bindaddr=0.0.0.0
srvlookup=no
disallow=all
;allow=ulaw
;allow=gsm
;allow=g723
;allow=g726
;allow=g711
;allow=speex
allow=alaw
qualify=yes

;alwaysauthreject=yes
canreinvite=no
;nat=yes
session-timers=refuse
localnet=192.168.0.0/255.255.255.0

[trunk]
host=10.10.10.1
bindport=5060
Type=friend
;Disallow=all
;allow=ulaw&g729
dtmfmode=rfc2833
qualify=yes
context=internal
disallow=all
allow=alaw
externip = 10.0.2.15
localnet=192.168.0.0/255.255.255.0
[7001]
type=friend
host=dynamic
secret=7001
context=internal
disallow=all
allow=alaw
externip = 10.0.2.15
localnet=192.168.0.0/255.255.255.0
this is my extensions.conf
[internal]
exten => 39143961,1,Answer(SIP/7001)
exten => 39143961,2,Dial(SIP/7001,60)
exten => 39143961,3,Playback(vm-nobodyavail)
exten => 39143961,4,VoiceMail(7001@main)
exten => 39143961,5,Hangup()

;exten => _X.,1,NoOP()
;same => n,Dial(SIP/trunk-in/${EXTEN},45,tTr)
;same => n,Hangup()

;exten => _+216X.,1,NoOp(Tunisia number is being dialed)
;same =>n,Dial(SIP/${EXTEN}@trunk,45,To)
;same =>n,Hangup()

exten => _X.,1,NoOp(Tunisia number is being dialed)
same => n,Set(CALLERID(num)=39143961)
same => n,Dial(SIP/${EXTEN}@trunk,45,To)
same => n,Hangup
this is my logs i uploadet here bcz its too long on pastebin and im not expert to filter what u need

this is what my provider gave me for configuring showroom of kaala sghyra ( its a place in tunisia)

Please can you assit me with anydesk this forum is last hope sir

Also this is the version
Connected to Asterisk 16.2.1~dfsg-2ubuntu1 currently running on dali-Vostro-3500 (pid = 134180)

this is also my debug when i write sip set debug on i have 404 on nat


i did add nat=no in all but the same

you need to change “externip” to “externaddr”

is your asterisk located on this network or is it behind a router on 192.168.0.0/24
make sure that it uses 1to1 NAT and that you have the RTP ports (rtp.conf) to forward to your asterisk

also are you on a MPLS network or is your provider just strange in giving you a 10.0.X.X network

Hi sir thanks for the support but the same


sip.conf
[general]
context=internal
;allowguest=no
allowoverlap=no
bindaddr=0.0.0.0
srvlookup=no
disallow=all
;allow=ulaw
;allow=gsm
;allow=g723
;allow=g726
;allow=g711
;allow=speex
allow=alaw
qualify=yes

;alwaysauthreject=yes
canreinvite=no
nat=no
session-timers=refuse
localnet=192.168.0.0/255.255.255.0

[trunk]
host=10.10.10.1
bindport=5060
Type=friend
;Disallow=all
;allow=ulaw&g729
dtmfmode=rfc2833
qualify=yes
context=internal
disallow=all
allow=alaw
externaddr = 10.0.2.15
localnet=192.168.0.0/255.255.255.0
nat=no
strictrtp=yes
[7001]
type=friend
host=dynamic
secret=7001
context=internal
disallow=all
allow=alaw
externaddr = 10.0.2.15
localnet=192.168.0.0/255.255.255.0
nat=no

Rtp.conf

;
; RTP Configuration
;
[general]
;
; RTP start and RTP end configure start and end addresses
;
; Defaults are rtpstart=5000 and rtpend=31000
;
rtpstart=10000
rtpend=50000
;
; Whether to enable or disable UDP checksums on RTP traffic
;
;rtpchecksums=no
;
; The amount of time a DTMF digit with no ‘end’ marker should be
; allowed to continue (in ‘samples’, 1/8000 of a second)
;
;dtmftimeout=3000
; rtcpinterval = 5000 ; Milliseconds between rtcp reports
;(min 500, max 60000, default 5000)
;
; Enable strict RTP protection. This will drop RTP packets that do not come
; from the recoginized source of the RTP stream. Strict RTP qualifies RTP
; packet stream sources before accepting them upon initial connection and
; when the connection is renegotiated (e.g., transfers and direct media).
; Initial connection and renegotiation starts a learning mode to qualify
; stream source addresses. Once Asterisk has recognized a stream it will
; allow other streams to qualify and replace the current stream for 5
; seconds after starting learning mode. Once learning mode completes the
; current stream is locked in and cannot change until the next
; renegotiation.
; Valid options are “no” to disable strictrtp, “yes” to enable strictrtp,
; and “seqno”, which does the same thing as strictrtp=yes, but only checks
; to make sure the sequence number is correct rather than checking the time
; interval as well.
; This option is enabled by default.
; strictrtp=yes
;
; Number of packets containing consecutive sequence values needed
; to change the RTP source socket address. This option only comes
; into play while using strictrtp=yes. Consider changing this value
; if rtp packets are dropped from one or both ends after a call is
; connected. This option is set to 4 by default.
; probation=8
;
; Whether to enable or disable ICE support. This option is enabled by default.
; icesupport=false
;
; Hostname or address for the STUN server used when determining the external
; IP address and port an RTP session can be reached at. The port number is
; optional. If omitted the default value of 3478 will be used. This option is
; disabled by default.
;
; e.g. stundaddr:3478=mystun.server.com
;
; stunaddr=
;
; Some multihomed servers have IP interfaces that cannot reach the STUN
; server specified by stunaddr. Blacklist those interface subnets from
; trying to send a STUN packet to find the external IP address.
; Attempting to send the STUN packet needlessly delays processing incoming
; and outgoing SIP INVITEs because we will wait for a response that can
; never come until we give up on the response.
; * Multiple subnets may be listed.
; * Blacklisting applies to IPv4 only. STUN isn’t needed for IPv6.
; * Blacklisting applies when binding RTP to specific IP addresses and not
; the wildcard 0.0.0.0 address. e.g., A PJSIP endpoint binding RTP to a
; specific address using the bind_rtp_to_media_address and media_address
; options. Or the PJSIP endpoint specifies an explicit transport that binds
; to a specific IP address.
;
; e.g. stun_blacklist = 192.168.1.0/255.255.255.0
; stun_blacklist = 10.32.77.0/255.255.255.0
;
; stun_blacklist =
;
; Hostname or address for the TURN server to be used as a relay. The port
; number is optional. If omitted the default value of 3478 will be used.
; This option is disabled by default.
;
; e.g. turnaddr:34780=myturn.server.com
;
; turnaddr=
;
; Username used to authenticate with TURN relay server.
; turnusername=
;
; Password used to authenticate with TURN relay server.
; turnpassword=
;
; Subnets to exclude from ICE host, srflx and relay discovery. This is useful
; to optimize the ICE process where a system has multiple host address ranges
; and/or physical interfaces and certain of them are not expected to be used
; for RTP. For example, VPNs and local interconnections may not be suitable or
; necessary for ICE. Multiple subnets may be listed. If left unconfigured,
; all discovered host addresses are used.
;
; e.g. ice_blacklist = 192.168.1.0/255.255.255.0
; ice_blacklist = 10.32.77.0/255.255.255.0
;
; ice_blacklist =
;
[ice_host_candidates]
;
; When Asterisk is behind a static one-to-one NAT and ICE is in use, ICE will
; expose the server’s internal IP address as one of the host candidates.
; Although using STUN (see the ‘stunaddr’ configuration option) will provide a
; publicly accessible IP, the internal IP will still be sent to the remote
; peer. To help hide the topology of your internal network, you can override
; the host candidates that Asterisk will send to the remote peer.
;
; IMPORTANT: Only use this functionality when your Asterisk server is behind a
; one-to-one NAT and you know what you’re doing. If you do define anything
; here, you almost certainly will NOT want to specify ‘stunaddr’ or ‘turnaddr’
; above.
;
; The format for these overrides is:
;
; =>
;
; The following will replace 192.168.1.10 with 1.2.3.4 during ICE
; negotiation:
;
;192.168.1.10 => 1.2.3.4
;
; You can define an override for more than 1 interface if you have a multihomed
; server. Any local interface that is not matched will be passed through
; unaltered. Both IPv4 and IPv6 addresses are supported.

And yes bro im using mpls and ethernet connected to this server which is installed asterisk , my provider all that he provides me is that pic in my second comment

my asterisk server is here now located in this network
inet 192.168.2.49 netmask 255.255.255.0 broadcast 192.168.2.255

Ps : i learned asterisk before 1 week so im a noob but im a good sysadmin so i can understand you

if you can enter anydesk will be paied sir

Note : its a simple latptop installed ubuntu and asterisk i make it as server with mpls and ethernet
for a test for now and we will move to reel server
and its here on this network
this is ifconfig of asterisk laptop
inet 192.168.2.49 netmask 255.255.255.0 broadcast 192.168.2.255

and i teste on zoiper installed in virtuel box in this laptop

if your are just starting out with asterisk I’ll recommend that you change from using chan_sip to chan_pjsip as chan_sip will be EOL in October

also can you post the INVITE you are sending

with MPLS you should not be needing a firewall/nat router, as that is the hole part of what you get an MPLS is for

you need to make sure that the FW on the router handle these correctly

Thanks bro for the answer but as i said im not an expert its not my domain

so bro i have searched but no hope as david said in comment

how to change to chan_pjsip ( i mean the command to do it )

and last line

how to make sure that the FW on the router handle these correctly , i call my provider?

last thing those are my config for now can you check them if i did something wrong still 404 same problem i cant hear who im calling but he can

sip.conf

[general]
context=internal
;allowguest=no
allowoverlap=no
bindaddr=0.0.0.0
srvlookup=no
disallow=all
;allow=ulaw
;allow=gsm
;allow=g723
;allow=g726
;allow=g711
;allow=speex
allow=alaw
qualify=yes

;alwaysauthreject=yes
canreinvite=no
nat=no
session-timers=refuse
localnet=192.168.0.0/255.255.255.0

[trunk]
host=10.10.10.1
bindport=5060
Type=friend
;Disallow=all
;allow=ulaw&g729
dtmfmode=rfc2833
qualify=yes
context=internal
disallow=all
allow=alaw
externaddr = 10.0.2.15
localnet=192.168.0.0/255.255.255.0
nat=no
canreinvite=no
[7001]
type=friend
host=dynamic
secret=7001
context=internal
disallow=all
allow=alaw
externaddr = 10.0.2.15
localnet=192.168.0.0/255.255.255.0
nat=no
canreinvite=no

extensions.conf
[internal]
exten => 39143961,1,Answer(SIP/7001)
exten => 39143961,2,Dial(SIP/7001,60)
exten => 39143961,3,Playback(vm-nobodyavail)
exten => 39143961,4,VoiceMail(7001@main)
exten => 39143961,5,Hangup()

;exten => _X.,1,NoOP()
;same => n,Dial(SIP/trunk-in/${EXTEN},45,tTr)
;same => n,Hangup()

;exten => _+216X.,1,NoOp(Tunisia number is being dialed)
;same =>n,Dial(SIP/${EXTEN}@trunk,45,To)
;same =>n,Hangup()

exten => _X.,1,NoOp(Tunisia number is being dialed)
same => n,Set(CALLERID(num)=39143961)
same => n,Dial(SIP/${EXTEN}@trunk,45,To)
same => n,Hangup

and this is my rtp i modifiy the interval to 50000 by my self may be im wrong

;
; RTP Configuration
;
[general]
;
; RTP start and RTP end configure start and end addresses
;
; Defaults are rtpstart=5000 and rtpend=31000
;
rtpstart=10000
rtpend=50000
;
; Whether to enable or disable UDP checksums on RTP traffic
;
;rtpchecksums=no
;
; The amount of time a DTMF digit with no ‘end’ marker should be
; allowed to continue (in ‘samples’, 1/8000 of a second)
;
;dtmftimeout=3000
; rtcpinterval = 5000 ; Milliseconds between rtcp reports
;(min 500, max 60000, default 5000)
;
; Enable strict RTP protection. This will drop RTP packets that do not come
; from the recoginized source of the RTP stream. Strict RTP qualifies RTP
; packet stream sources before accepting them upon initial connection and
; when the connection is renegotiated (e.g., transfers and direct media).
; Initial connection and renegotiation starts a learning mode to qualify
; stream source addresses. Once Asterisk has recognized a stream it will
; allow other streams to qualify and replace the current stream for 5
; seconds after starting learning mode. Once learning mode completes the
; current stream is locked in and cannot change until the next
; renegotiation.
; Valid options are “no” to disable strictrtp, “yes” to enable strictrtp,
; and “seqno”, which does the same thing as strictrtp=yes, but only checks
; to make sure the sequence number is correct rather than checking the time
; interval as well.
; This option is enabled by default.
; strictrtp=yes
;
; Number of packets containing consecutive sequence values needed
; to change the RTP source socket address. This option only comes
; into play while using strictrtp=yes. Consider changing this value
; if rtp packets are dropped from one or both ends after a call is
; connected. This option is set to 4 by default.
; probation=8
;
; Whether to enable or disable ICE support. This option is enabled by default.
; icesupport=false
;
; Hostname or address for the STUN server used when determining the external
; IP address and port an RTP session can be reached at. The port number is
; optional. If omitted the default value of 3478 will be used. This option is
; disabled by default.
;
; e.g. stundaddr:3478=mystun.server.com
;
; stunaddr=
;
; Some multihomed servers have IP interfaces that cannot reach the STUN
; server specified by stunaddr. Blacklist those interface subnets from
; trying to send a STUN packet to find the external IP address.
; Attempting to send the STUN packet needlessly delays processing incoming
; and outgoing SIP INVITEs because we will wait for a response that can
; never come until we give up on the response.
; * Multiple subnets may be listed.
; * Blacklisting applies to IPv4 only. STUN isn’t needed for IPv6.
; * Blacklisting applies when binding RTP to specific IP addresses and not
; the wildcard 0.0.0.0 address. e.g., A PJSIP endpoint binding RTP to a
; specific address using the bind_rtp_to_media_address and media_address
; options. Or the PJSIP endpoint specifies an explicit transport that binds
; to a specific IP address.
;
; e.g. stun_blacklist = 192.168.1.0/255.255.255.0
; stun_blacklist = 10.32.77.0/255.255.255.0
;
; stun_blacklist =
;
; Hostname or address for the TURN server to be used as a relay. The port
; number is optional. If omitted the default value of 3478 will be used.
; This option is disabled by default.
;
; e.g. turnaddr:34780=myturn.server.com
;
; turnaddr=
;
; Username used to authenticate with TURN relay server.
; turnusername=
;
; Password used to authenticate with TURN relay server.
; turnpassword=
;
; Subnets to exclude from ICE host, srflx and relay discovery. This is useful
; to optimize the ICE process where a system has multiple host address ranges
; and/or physical interfaces and certain of them are not expected to be used
; for RTP. For example, VPNs and local interconnections may not be suitable or
; necessary for ICE. Multiple subnets may be listed. If left unconfigured,
; all discovered host addresses are used.
;
; e.g. ice_blacklist = 192.168.1.0/255.255.255.0
; ice_blacklist = 10.32.77.0/255.255.255.0
;
; ice_blacklist =
;
[ice_host_candidates]
;
; When Asterisk is behind a static one-to-one NAT and ICE is in use, ICE will
; expose the server’s internal IP address as one of the host candidates.
; Although using STUN (see the ‘stunaddr’ configuration option) will provide a
; publicly accessible IP, the internal IP will still be sent to the remote
; peer. To help hide the topology of your internal network, you can override
; the host candidates that Asterisk will send to the remote peer.
;
; IMPORTANT: Only use this functionality when your Asterisk server is behind a
; one-to-one NAT and you know what you’re doing. If you do define anything
; here, you almost certainly will NOT want to specify ‘stunaddr’ or ‘turnaddr’
; above.
;
; The format for these overrides is:
;
; =>
;
; The following will replace 192.168.1.10 with 1.2.3.4 during ICE
; negotiation:
;
;192.168.1.10 => 1.2.3.4
;
; You can define an override for more than 1 interface if you have a multihomed
; server. Any local interface that is not matched will be passed through
; unaltered. Both IPv4 and IPv6 addresses are supported.

Note: im not using a static ip and i did not make any rules in firewall on my laptop like ufw or stuff like that may be those info will help you more sir

hmm you also need to change to use pjsip.conf

https://wiki.asterisk.org/wiki/display/AST/Migrating+from+chan_sip+to+res_pjsip

also when you post you config
please remove all the default comment lines as they are just spam

cat sip.conf | egrep -v "^\s*(;|$)"

sir sorry i didnt know how

i did not find the python script where can anyone asisst me with anydesk im stuck here even my provider does not have a voip expert so i dont have other choice

okey sir im just new thats why

These are only supported in the general section.

Your log is a screenshot, rather than a copy of the actual text, and doesn’t show any calls, so doesn’t show anything media related, and, unsurprisingly, it doesn’t include the"public" address.

The public address isn’t really a public address, although may still have to be treated as one if depending on how well configured the their 10/8 network is. More details on the network topology would be useful. Nowadays they should be using a shared network, rather than a private one, on their side of the router.

10.10.10.0/30 should be included in your local networks, or possibly all of 10/8, although, because of the lack of externip, that isn’t your immediate problem.

There are other elements of bad practice, which are I commonly see in cut and pasted configurations, but I won’t detail, as they are probably not causing you problems.

Please provide the complete SIP exchange for an actual call, as text copied from the full log file (which you may need to enable).

SIP/7001 is not a valid duration. Also answering here can cause the caller to get billed even though they abandon the call before it goes to voicemail, although it may be necessary for mobile phone users, because of the extended timeout.

Try a ‘no’ on this one as a quick test in rtp.conf.
I ran into a similar one-way audio issue awhile back and this was one way to solve it.

hey guys check out my logs here

and after checking logs i have discovered that my ip is not opened on port 5060 from my provider so i asked him to give me the rtp range used by him and to open port 5060 in my internal ip that i set it up as my static ip

so check those logs if you can see something weird so i can tell them by mail if they are missing something or may be something missing in my conf

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