ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    FreePBX / Random loss of audio ...

    IT Discussion
    freepbx
    5
    24
    1.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      BraswellJay
      last edited by BraswellJay

      I'm setting up a FreePBX instance and doing some testing. Right now I have two extensions, one a SIP extension using Zoiper softphone and the other a virtual extension with voicemail enabled, just for something to test with.

      I seem to be able to make a call from the softphone to the virtual extension with no problem in that it seems to connect each time but the audio to hear the voicemail greeting is not received most of the time.

      I've broke out wireshark to see if I could determine anything. One thing I noticed is that when my Zoiper softphone first registers with the server it seems to receive a 401 Unauthorized from the server before successfully registering. Is it normal to receive receive 401 Unauthorized before a successful registration? .248 is the server and .139 is the softphone.

      Source,Destination,Protocol,Length,Info
      192.168.2.139,192.168.2.248,SIP,619,Request: REGISTER sip:192.168.2.248;transport=UDP  (1 binding) | 
      192.168.2.248,192.168.2.139,SIP,604,Status: 401 Unauthorized | 
      192.168.2.139,192.168.2.248,SIP,787,Request: REGISTER sip:192.168.2.248;transport=UDP  (1 binding) | 
      192.168.2.248,192.168.2.139,SIP,683,Request: OPTIONS sip:[email protected]:56778;rinstance=b05461348c8fdb80;transport=UDP | 
      192.168.2.248,192.168.2.139,SIP,661,Status: 200 OK  (1 binding) | 
      192.168.2.139,192.168.2.248,SIP,712,Status: 200 OK | 
      192.168.2.139,192.168.2.248,SIP,784,Request: REGISTER sip:192.168.2.248;transport=UDP  (remove 1 binding) | 
      192.168.2.248,192.168.2.139,SIP,616,Status: 401 Unauthorized | 
      192.168.2.139,192.168.2.248,SIP,784,Request: REGISTER sip:192.168.2.248;transport=UDP  (remove 1 binding) | 
      192.168.2.248,192.168.2.139,SIP,567,Status: 200 OK  (0 bindings) | 
      192.168.2.139,192.168.2.248,SIP,619,Request: REGISTER sip:192.168.2.248;transport=UDP  (1 binding) | 
      192.168.2.248,192.168.2.139,SIP,604,Status: 401 Unauthorized | 
      192.168.2.139,192.168.2.248,SIP,787,Request: REGISTER sip:192.168.2.248;transport=UDP  (1 binding) | 
      192.168.2.248,192.168.2.139,SIP,683,Request: OPTIONS sip:[email protected]:56778;rinstance=3b911898cd7a2274;transport=UDP | 
      192.168.2.248,192.168.2.139,SIP,661,Status: 200 OK  (1 binding) | 
      192.168.2.139,192.168.2.248,SIP,712,Status: 200 OK | 
      192.168.2.139,192.168.2.248,UDP,46,56778  >  5060 Len=4
      

      I notice also that if I capture then the softphone is constantly sending RTP packets to the server but the server is not sending any RTP packets back to the softphone, which I presume is why I'm not hearing the audio of the voicemail greeting from the server.

      1 Reply Last reply Reply Quote 1
      • DustinB3403D
        DustinB3403
        last edited by

        Audio issues tend to be due to codec issues.

        B scottalanmillerS 2 Replies Last reply Reply Quote 0
        • DustinB3403D
          DustinB3403
          last edited by

          What your initial issue sounds like is 1 way audio, so I'd start with checking here.

          1 Reply Last reply Reply Quote 0
          • B
            BraswellJay @DustinB3403
            last edited by

            @DustinB3403 said in FreePBX / Random loss of audio ...:

            Audio issues tend to be due to codec issues.

            Thanks, you were right it was codec issue which I hadn't even considered. I changed zoiper to exclude some of the one's it was saying were available and have had zero issues in about 15 test calls since then.

            1 Reply Last reply Reply Quote 1
            • scottalanmillerS
              scottalanmiller @DustinB3403
              last edited by

              @DustinB3403 said in FreePBX / Random loss of audio ...:

              Audio issues tend to be due to codec issues.

              That's pretty rare. Never seen that happen.

              1 Reply Last reply Reply Quote 0
              • scottalanmillerS
                scottalanmiller
                last edited by

                What's the networking situation? Is this all on one LAN? Are there routers or anything in the midst of the channels?

                1 Reply Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller
                  last edited by

                  Looks like your phones are on a private network separate from the PBX. That's normal, but that's the kind of starting point we need for diagnosis.

                  By far these issues tend to come from router / firewall issues. The most common of those is having SIP-ALG turned on (it's normally on my default.) SIP-ALG more or less seems to exist to create these kinds of headaches (to help vendors sell more services.)

                  If SIP-ALG is disabled, make sure your STUN settings are correct. That's common, too.

                  B 1 Reply Last reply Reply Quote 0
                  • B
                    BraswellJay @scottalanmiller
                    last edited by

                    @scottalanmiller said in FreePBX / Random loss of audio ...:

                    Looks like your phones are on a private network separate from the PBX. That's normal, but that's the kind of starting point we need for diagnosis.

                    By far these issues tend to come from router / firewall issues. The most common of those is having SIP-ALG turned on (it's normally on my default.) SIP-ALG more or less seems to exist to create these kinds of headaches (to help vendors sell more services.)

                    If SIP-ALG is disabled, make sure your STUN settings are correct. That's common, too.

                    It did seem to be the codec, in this particular instance at least. I changed Zoiper to only allow G.711a/u and that seemed to fix the issue. I'm going to do some more testing tomorrow and verify.

                    The PBX and the phones are all on the same network, 192.168.2.0/24

                    They run through an unmanaged netgear switch that sits behind a Cisco ASA 5505. The Zoiper client was running on a laptop connected wirelessly to a Ubiquiti AC Pro which itself feeds into the netgear switch.

                    I didn't think the STUN server would play into this particular call test since it was extension to extension on the same network segment and never had to exit the WAN interface on the router.

                    scottalanmillerS 2 Replies Last reply Reply Quote 0
                    • scottalanmillerS
                      scottalanmiller @BraswellJay
                      last edited by

                      @BraswellJay said in FreePBX / Random loss of audio ...:

                      It did seem to be the codec, in this particular instance at least. I changed Zoiper to only allow G.711a/u and that seemed to fix the issue. I'm going to do some more testing tomorrow and verify.

                      That's a first. What was it set to choose first before? And what is your server set to accept?

                      B 1 Reply Last reply Reply Quote 0
                      • scottalanmillerS
                        scottalanmiller @BraswellJay
                        last edited by

                        @BraswellJay said in FreePBX / Random loss of audio ...:

                        I didn't think the STUN server would play into this particular call test since it was extension to extension on the same network segment and never had to exit the WAN interface on the router.

                        It doesn't. The PBX has a public IP though, that it is advertising in the logs.

                        1 Reply Last reply Reply Quote 0
                        • B
                          BraswellJay @scottalanmiller
                          last edited by

                          @scottalanmiller said in FreePBX / Random loss of audio ...:

                          @BraswellJay said in FreePBX / Random loss of audio ...:

                          It did seem to be the codec, in this particular instance at least. I changed Zoiper to only allow G.711a/u and that seemed to fix the issue. I'm going to do some more testing tomorrow and verify.

                          That's a first. What was it set to choose first before? And what is your server set to accept?

                          It is strange. This image shows my current codecs. The two left columns are from Zoiper and the rightmost from FreePBX. Yesterday when I was having the issue, all of the codecs from Zoiper were in the selected codec list. When I moved all but G.711 a/mu over to the available but not selected then all of my issues cleared up.

                          codecs.JPG

                          How does the SIP negotiation work for selecting codec? Is the client or the server the master when determining which one to use?

                          scottalanmillerS JaredBuschJ 2 Replies Last reply Reply Quote 0
                          • scottalanmillerS
                            scottalanmiller @BraswellJay
                            last edited by

                            @BraswellJay said in FreePBX / Random loss of audio ...:

                            How does the SIP negotiation work for selecting codec? Is the client or the server the master when determining which one to use?

                            That's a setting in your SIP settings on the PBX. It can be either party, depending on configuration.

                            1 Reply Last reply Reply Quote 0
                            • scottalanmillerS
                              scottalanmiller
                              last edited by

                              The codec you probably want on both is Opus. Since you paid for that in your Gold package on Zoiper.

                              B 1 Reply Last reply Reply Quote 0
                              • JaredBuschJ
                                JaredBusch @BraswellJay
                                last edited by

                                @BraswellJay said in FreePBX / Random loss of audio ...:

                                @scottalanmiller said in FreePBX / Random loss of audio ...:

                                @BraswellJay said in FreePBX / Random loss of audio ...:

                                It did seem to be the codec, in this particular instance at least. I changed Zoiper to only allow G.711a/u and that seemed to fix the issue. I'm going to do some more testing tomorrow and verify.

                                That's a first. What was it set to choose first before? And what is your server set to accept?

                                It is strange. This image shows my current codecs. The two left columns are from Zoiper and the rightmost from FreePBX. Yesterday when I was having the issue, all of the codecs from Zoiper were in the selected codec list. When I moved all but G.711 a/mu over to the available but not selected then all of my issues cleared up.

                                codecs.JPG

                                How does the SIP negotiation work for selecting codec? Is the client or the server the master when determining which one to use?

                                The PBX is always the master.

                                I recommend that you never leave a PBX default to all the codecs like that.

                                Reduce it to the fewest possible. Typically only ULAW and OPUS unless you are outside the US. Then ALAW instead of ULAW is common.

                                Adding G722 is required for video or "HD" audio.

                                Also your SIP trunk has CODEC settings. Your provider may only use certain ones.

                                1 Reply Last reply Reply Quote 0
                                • B
                                  BraswellJay @scottalanmiller
                                  last edited by

                                  @scottalanmiller said in FreePBX / Random loss of audio ...:

                                  The codec you probably want on both is Opus. Since you paid for that in your Gold package on Zoiper.

                                  I didn't pay for Zoiper. I downloaded the client from their site and when it starts it offers me to upgrade to Pro or something like that but I just choose the option that says continue with a free account. This is Zoiper5. I did just install it yesterday right before I started testing so perhaps they are letting me use that as a trial but will go away? Not sure, but I haven't paid for it for sure.

                                  JaredBuschJ 1 Reply Last reply Reply Quote 1
                                  • JaredBuschJ
                                    JaredBusch @BraswellJay
                                    last edited by

                                    @BraswellJay said in FreePBX / Random loss of audio ...:

                                    @scottalanmiller said in FreePBX / Random loss of audio ...:

                                    The codec you probably want on both is Opus. Since you paid for that in your Gold package on Zoiper.

                                    I didn't pay for Zoiper. I downloaded the client from their site and when it starts it offers me to upgrade to Pro or something like that but I just choose the option that says continue with a free account. This is Zoiper5. I did just install it yesterday right before I started testing so perhaps they are letting me use that as a trial but will go away? Not sure, but I haven't paid for it for sure.

                                    ZoIPer 5 is not allowed for commercial use.

                                    1 Reply Last reply Reply Quote 0
                                    • black3dynamiteB
                                      black3dynamite
                                      last edited by

                                      When I was trying out FreePBX, I was using linphone and it worked a lot better.
                                      https://www.linphone.org/

                                      B 1 Reply Last reply Reply Quote 0
                                      • B
                                        BraswellJay @black3dynamite
                                        last edited by

                                        @black3dynamite said in FreePBX / Random loss of audio ...:

                                        When I was trying out FreePBX, I was using linphone and it worked a lot better.
                                        https://www.linphone.org/

                                        So I was going to switch to linphone. After installing I had same problem with it that I had yesterday with Zoiper, no audio. Checked codecs and all seems ok so doesn't appear to be the same issue.

                                        Checked a SIP message trace from the Asterisk CLI and noticed the following :

                                        From Linphone message trace, in one of the SIP messages I see:

                                        Peer audio RTP is at port xxx.xxx.xxx.150:7078
                                        

                                        This is the WAN IP (x'd out) of my router.

                                        When I compare that to one I had taken when I was using the Zoiper client (that had no audio issues) I see the corresponding :

                                        Peer audio RTP is at port 192.168.2.57:8000
                                        

                                        This is the LAN IP of the machine the zoiper client was installed on.

                                        I'm thinking that for the linphone client somehow the RTP stream is being sent to the router instead of back to the machine the client is on thus no audio. Is that a correct interpretation of what I'm seeing here?

                                        I don't see anything obvious that's different about the extension setups in FreePBX for each. The setting that I thought might control this on a per extension basis was NAT Mode but that is set to No for both types of clients.

                                        I don't see anything in the Linphone setup that would make me think I can control that from the application. I had thought that if all my extensions resided on the same LAN subnet that I wouldn't need to worry about any of the RTP traffic going to the router like that but perhaps I'm mistaken.


                                        JaredBuschJ 1 Reply Last reply Reply Quote 0
                                        • JaredBuschJ
                                          JaredBusch @BraswellJay
                                          last edited by

                                          @BraswellJay what Did you put in the client for SIP server? The FQDN? What does the FQDN resolve as? The internal IP or your public IP?

                                          B 1 Reply Last reply Reply Quote 0
                                          • B
                                            BraswellJay @JaredBusch
                                            last edited by

                                            @JaredBusch said in FreePBX / Random loss of audio ...:

                                            @BraswellJay what Did you put in the client for SIP server? The FQDN? What does the FQDN resolve as? The internal IP or your public IP?

                                            Did not use the FQDN, just the IP address.

                                            192.168.2.248 is the FreePBX server and 201 is the assigned extension.

                                            linphone00.JPG

                                            JaredBuschJ 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post