Asterisk Audio Problems

asterisk-18.4.0-1.fc36.5.x86_64
That’s Asterisk built on Fedora 36, installed via dnf

Up until about 10 days ago things were going great and “everything” seemed like it was working.

Test 1 - my landline to my flowrouteDID - no audio at all
Test 2 - my T-Mobile calling my flowraouteDID:

  • inbound audio works (I hear audio on my T-Mobile)
  • outbound audio fails - no audio on the far end

For each test I

  1. called my flowroute DID
  2. Listened (to the message or silence)
  3. Pressed an extension, and finally
    since there was no outbound audio
  4. was dc by my PBX because no extension received

I have tried reviewing tcpdump for RTP but I have not found anything (probably because of my lack of knowledge).

Please find:
. my flowroute PJsip config (immediatly below
. full log files for each test
. tcpdump files for each test

I would sincerely appreciate any assistance.

Thank you very much!

[flowroute]
type=registration
transport=transport-udp-nat
outbound_auth=flowroute_auth
server_uri=sip:us-east-va.sip.flowroute.com
client_uri=sip:techprefix@us-east-va.sip.flowroute.com
contact_user=techprefix
retry_interval=60

[flowroute_auth]
type=auth
auth_type=userpass
password=mypassword
username=techprefix
realm=sip.flowroute.com

[flowroute]
type=aor
contact=sip:us-east-va.sip.flowroute.com

[flowroute]
type=endpoint
context=from-trunk
disallow=all
allow=ulaw
outbound_auth=flowroute_auth
aors=flowroute
direct_media=no

[flowroute]
type=identify
endpoint=flowroute
match=34.210.91.112/28
match=34.226.36.32/28

full-landline-to-flowroute.txt (142.5 KB)
full-T-Mobile-line-to-flowroute.txt (152.8 KB)
watch-Landline-to-flowroute-tcpip240321-16-02-29.txt (10.4 KB)
watch-T-Mobile-to-flowroute-tcpip240321-16-44-12.txt (12.2 KB)

You need to configure your rtp.conf file
Ports 10000 - 25000 udp

OK, that’s embarrassing. I’m sorry.
Please find attached:
. my rtp.conf
. updated tcpdumps

rtp.conf.txt (6.4 KB)
watch-landline-to-flowroute-tcpip240321-20-22-09.txt (352.9 KB)
watch-T-Mobile=phone-to-flowroute-tcpip240321-20-23-50.txt|attachment (280.0 KB)

[general]
rtpstart=10000
rtpend=25000
icesupport=true
stunaddr:19302=stun.l.google.com

rtp.conf updated and attached.
I restarted asterisk.
Re-tried tests–same results.
Test 1 - my landline to my flowrouteDID - no audio at all
Test 2 - my T-Mobile calling my flowraouteDID:

Please find attached full logs and tcpdumps.

Thank you very much for your help

full-landline-to-flowroute.txt (157.4 KB)
full-T-Mobile-line-to-flowroute.txt (149.2 KB)
rtp.conf.txt (6.5 KB)
watch-landline-to-flowroute-tcpip240321-23-50-43.txt (267.0 KB)
watch-T-Mobile=phone-to-flowroute-tcpip240321-23-58-14.txt|attachment (314.5 KB)

Hi

Check if g729 codec is installed.

Regards
Johannes

Yes-and:
Just to be thorough:

*CLI> core show codecs
Disclaimer: this command is for informational purposes only.
        It does not indicate anything about your configuration.
      ID TYPE  NAME         FORMAT           DESCRIPTION
------------------------------------------------------------------------------------------------
      31 image png          png              (PNG Image)
       6 audio g726         g726             (G.726 RFC3551)
       4 audio alaw         alaw             (G.711 a-law)
       2 audio g723         g723             (G.723.1)
      20 audio speex        speex            (SpeeX)
      21 audio speex        speex16          (SpeeX 16khz)
      22 audio speex        speex32          (SpeeX 32khz)
      24 audio g722         g722             (G722)
      25 audio siren7       siren7           (ITU G.722.1 (Siren7, licensed from Polycom))
      32 video h261         h261             (H.261 video)
      33 video h263         h263             (H.263 video)
       8 audio adpcm        adpcm            (Dialogic ADPCM)
      36 video h265         h265             (H.265 video)
      44 audio silk         silk8            (SILK Codec (8 KHz))
      45 audio silk         silk12           (SILK Codec (12 KHz))
      46 audio silk         silk16           (SILK Codec (16 KHz))
      47 audio silk         silk24           (SILK Codec (24 KHz))
      28 audio g719         g719             (ITU G.719)
      34 video h263p        h263p            (H.263+ video)
      35 video h264         h264             (H.264 video)
      19 audio g729         g729             (G.729A)
       9 audio slin         slin             (16 bit Signed Linear PCM)
      10 audio slin         slin12           (16 bit Signed Linear PCM (12kHz))
      11 audio slin         slin16           (16 bit Signed Linear PCM (16kHz))
      12 audio slin         slin24           (16 bit Signed Linear PCM (24kHz))
      13 audio slin         slin32           (16 bit Signed Linear PCM (32kHz))
      14 audio slin         slin44           (16 bit Signed Linear PCM (44kHz))
      15 audio slin         slin48           (16 bit Signed Linear PCM (48kHz))
      16 audio slin         slin96           (16 bit Signed Linear PCM (96kHz))
      17 audio slin         slin192          (16 bit Signed Linear PCM (192kHz))
       3 audio ulaw         ulaw             (G.711 u-law)
      18 audio lpc10        lpc10            (LPC10)
      27 audio testlaw      testlaw          (G.711 test-law)
      43 audio none         none             (<Null> codec)
      42 image t38          t38              (T.38 UDPTL Fax)
      39 video vp9          vp9              (VP9 video)
      38 video vp8          vp8              (VP8 video)
       5 audio gsm          gsm              (GSM)
      37 video mpeg4        mpeg4            (MPEG4 video)
      23 audio ilbc         ilbc             (iLBC)
      40 text  red          red              (T.140 Realtime Text with redundancy)
      41 text  t140         t140             (Passthrough T.140 Realtime Text)
      29 audio opus         opus             (Opus Codec)
      30 image jpeg         jpeg             (JPEG image)
       7 audio g726aal2     g726aal2         (G.726 AAL2)
       1 audio codec2       codec2           (Codec 2)
      26 audio siren14      siren14          (ITU G.722.1 Annex C, (Siren14, licensed from Polycom))
*CLI> 

Hi Johannes!

This isn’t impatience–I jusr realized I may not have either understood or correctly answered your question.

Please let me know if you need additional information.

Thank you!

You need to describe your network configuration. Audio problems are often related to NAT problems. STUN and other NAT helpers are usually not necessary once you understand your network and have some control over your router. Also, since you mentioned Fedora, there’s always a good chance that SELinux will break things when it’s active.
I think it makes only sense to look at the Asterisk configuration, if it is explicitly excluded that the root of the problem is outside Asterisk. This usually means a couple of network tests.

Asterisk PBX on 192.168.x.x network
Edge server forwards:
5060udp to PBX
10000-25000 udp to PBX

with regards to NAT, does this cover everything:

[transport-udp-nat]
type=transport
protocol=udp
bind=0.0.0.0
local_net=192.168.1.0/24
external_media_address=mypublicIPaddr
external_signaling_address=mypublicIPaddr

]# getenforce
Permissive

So SELinux is active, but permissive. I realize it may be a problem and beg any help that can be provided on this issue–I seem to remember it is possible to “set it to off” with a mandatory reboot. Should I try that?

Also,I just turned the local firewall (on the PBX) off and tested to find both tests still failing in the same manner. I have restarted that firewall but can easily take it down, as needed.

What network tests did you have in-mind?

Is there anything else?

And thank you very much!

You should know if the G.729 codec is installed, as, if using the supported one, you will have had to pay for it.

However the command you need is module show, see, for example, Your Asterisk Module Is Loaded, But Is It Running?

You may be right, or not. You need to capture some VoIP traffic on the LAN and the WAN side of your router (or check the the firewall states, in case this is available). I know cases where the service provider reuses the ports from incoming traffic (to their servers) for signalling and then port forwarding is relatively pointless as it is assumed that the existing connection stays open all the time. In cases like that you need to configre something like “outbound NAT rules” (pfSense jargon) or so-called “1-1 NAT”, which is a bit more general.

STUN may help in some scenarios, but I tend to forget which cases can be handled, so I’d rather look at what is actuall going on.

I installed Asterisk using “dnf install asterisk”.

I have only been using the default installation and no purchased modules to the best of my knowledge given I trust the Fedora repo to have a legitimate installation.

Perhaps you can help me determine if something is wrong with regards to this. Here is what I have:

*CLI> module show like 729
Module                         Description                              Use Count  Status      Support Level
format_g729.so                 Raw G.729 data                           0          Running              core
res_format_attr_g729.so        G.729 Format Attribute Module            1          Running              core

When I place a call to flowroute I see:

*CLI> core show channels verbose
Channel              Context              Extension        Prio State   Application  Data                      CallerID        Duration Accountcode PeerAccount BridgeID            
PJSIP/flowroute-0000 from-trunk           myflowrouteDID        19 Up      Read         digit,custom/no-solicitor +myLandline    00:00:07                                             
1 active channel
1 active call
3 calls processed

*CLI> core show codec 19
         19 G.729A (g729)

Not counting my op (where I totally screwed the tcpdump captures), subsequent tcpdump-captures should contain all inbound and outbound packets from my PBX. Is it possible what you are discussing is in those “watch” files?

Additionally, and I was hoping to avoid discussing this because I want to focus on one issue at a time, I have my PBX connected to another Asterisk PBX as follows:
MyPBX (192.168.1.x) NAT
MySPEdgerouter to Internet
Internet to private router (192.168.10.x)
private router to remotePBX (192.168.10.x) NAT

I am able to call and receive calls over this connection with audio working normally.

That-said, it uses a different codec:

*CLI> core show channels verbose
Channel              Context              Extension        Prio State   Application  Data                      CallerID        Duration Accountcode PeerAccount BridgeID            
PJSIP/6003-00000005  my-phone             2058                1 Up      Dial         PJSIP/xxx(remoteext)@RemotePBX       myCIDdata      00:00:16                         049e372d-4425-4a41-8
PJSIP/RemotePBX-0000 from-trunk                               1 Up      AppDial      (Outgoing Line)           xxxx            00:00:16                         049e372d-4425-4a41-8
2 active channels
1 active call
5 calls processed

*CLI> core show codec 1
          1 Codec 2 (codec2)

Perhaps that means I am having a problem with my g729 codec???

You only have the format modules for G.729, so you can only do pass through for it.

I am not sure what to ask.
I think what you are telling me is that (from my above osts) I am using g729 but don’t have the codec. I also thought my config (from op) showing:

disallow=all
allow=ulaw

means my Asterisk PBX shouldn’t use g729.
But I am getting no-audio because it actually is g729.

I would sincerely appreciate any information to help me figure this out.

My thanks, in-advance!!!

I’m assuming you were asked about G.729 because you were trying to use it. I haven’t looked at all the details.

I thought this indicated the g729 codec in-use:

*CLI> core show channels verbose
Channel              Context              Extension        Prio State   Application  Data                      CallerID        Duration Accountcode PeerAccount BridgeID            
PJSIP/flowroute-0000 from-trunk           17044453955        19 Up      Read         digit,custom/no-solicitor +myLandline    00:00:07                                             
1 active channel
1 active call
3 calls processed

*CLI> core show codec 19
         19 G.729A (g729)

Am I correct that the 19 in the “19 Up” is the codec # so the subsequent command displays codec 19 as g729?

And if I have:

disallow=all
allow=ulaw

Why would my PBX then use g729 rather than the allowed ulaw?

Let me know what information to provide and I will do my best.

I’d really like to get my flowroute connection audio working.

Thanks!!!

No. 19 is the step number in the dialplan and Up means the call has been answered.

Can you offer any suggestions?

I re-read your posts but nothing jumped out at me that I missed (and you requested from me).

Did I miss something?

Thanks!