A J Stiles
2014-Jul-30 09:51 UTC
[asterisk-users] SIP trunk gives fuzzy / distorted audio on mobiles, OK on fixed lines
I'm having a problem with a new SIP trunk. Calls within the UK to fixed lines are fine, but calls to mobiles have noticeably poorer audio quality. I thought it might have been a codec issue; we have used G.726 for internal and external calls (over primary ISDN and GSM). So I tried allowing "alaw", (G.711 A-law) which is the native codec used within the PSTN in this country, but this made no improvement. We had disallow=all allow=g726 in the [general] section of sip.conf. In the section for one of the phones, I added allow=alaw and then inserted Set(SIP_CODEC=alaw) in the relevant part of extensions.conf. For good measure, I also added NoOp(Codec was ${SIP_CODEC}) in the "h" extension. The messages in the Asterisk CLI appeared to show that the audio codec was correctly being set to "alaw", and on hangup I got "Codec was alaw", but there was no improvement to the sound quality. Is there something I am doing wrong, or do I need to get in touch with our SIP trunk provider? -- AJS Note: Originating address only accepts e-mail from list! If replying off- list, change address to asterisk1list at earthshod dot co dot uk .
James Thomas
2014-Jul-31 15:03 UTC
[asterisk-users] SIP trunk gives fuzzy / distorted audio on mobiles, OK on fixed lines
Is the quality the same incoming from mobile as outgoing to mobile? On Wed, Jul 30, 2014 at 4:51 AM, A J Stiles <asterisk_list at earthshod.co.uk> wrote:> I'm having a problem with a new SIP trunk. > > Calls within the UK to fixed lines are fine, but calls to mobiles have > noticeably poorer audio quality. > > I thought it might have been a codec issue; we have used G.726 for internal > and external calls (over primary ISDN and GSM). So I tried allowing > "alaw", > (G.711 A-law) which is the native codec used within the PSTN in this > country, > but this made no improvement. > > We had > disallow=all > allow=g726 > > in the [general] section of sip.conf. In the section for one of the > phones, I > added > allow=alaw > and then inserted > Set(SIP_CODEC=alaw) > in the relevant part of extensions.conf. For good measure, I also added > NoOp(Codec was ${SIP_CODEC}) > in the "h" extension. The messages in the Asterisk CLI appeared to show > that > the audio codec was correctly being set to "alaw", and on hangup I got > "Codec > was alaw", but there was no improvement to the sound quality. > > Is there something I am doing wrong, or do I need to get in touch with our > SIP > trunk provider? > > -- > AJS > > Note: Originating address only accepts e-mail from list! If replying off- > list, change address to asterisk1list at earthshod dot co dot uk . > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140731/518cc0ba/attachment.html>
A J Stiles
2014-Jul-31 15:48 UTC
[asterisk-users] *SOLVED* SIP trunk gives fuzzy / distorted audio on mobiles, OK on fixed lines
I have now fixed this issue, and am posting this for the benefit of anyone else who may be suffering with a similar problem. It was, as I suspected all along, a subtle misconfiguration at this end. The fix was to give the SIP trunk its own configuration stanza in sip.conf as follows; [sip_trunk_outbound] type=peer host=provider.sld.cc disallow=all allow=alaw and replace all instances of Dial(SIP/provider.sld.cc/44${EXTEN:1}) with Dial(SIP/sip_trunk_outbound/44${EXTEN:1}) In the absence of that important little stanza, the [general] settings were applying to the ad-hoc SIP endpoint; meaning that even in spite of explicitly setting the outbound SIP codec, Asterisk was insisting to use G726. No sooner had I worked this out, than the SIP trunk provider e-mailed basically to confirm my thinking. The moral of this story: Never trust a configuration file written by someone else, no matter how close it was to working ;) -- AJS Note: Originating address only accepts e-mail from list! If replying off- list, change address to asterisk1list at earthshod dot co dot uk .