[asterisk-users] which codec over iax => pstn

Atis Lezdins atis at iq-labs.net
Wed Feb 20 08:25:39 CST 2008


On 2/20/08, sean darcy <seandarcy2 at gmail.com> wrote:
> Gordon Henderson wrote:
> > On Tue, 19 Feb 2008, sean darcy wrote:
> >
> >> using asterisk(A) over iax to another asterisk server(B) which connects
> >> to pstn over pri.
> >>
> >> Doesn't B have translate to ulaw whatever goes out to the pstn,
> >
> > Depends on the country, but ulaw or alaw...
>
> ulaw
> >
> >> so
> >> therefore shouldn't A choose ulaw as the iax codec to B? That way
> >> there's no loss translating from {gsm, ildc, etc} to ulaw on the B server.
> >
> > It depends on how the call comes into A and how "bothered" A is about
> > doing the transcoding, or letting B do it for them.
> >
> the call comes into A over an analog port on a TDM400P. I assume it's ulaw.
> > If the calls come into A via GSM, then you might as well send them out
> > again in GSM as the call quality won't improve, but if they come into A as
> > G711 (ulaw or ulaw) then keep them as G711 if you don't want to lose
> > quality, else compress them to GSM if you don't have the bandwidth
> > avalable.
> >
> >> My partner thinks I'm nuts, and that gsm is much more "efficient" as the
> >> iax codec.
> >
> > GSM is more compressed than ulaw or alaw, so will use less bandwidth, but
> > in doing so, it will sound worse. (mobile phone quality rather than
> > landline quality)
> >
> >> BTW, we have 512kbs over the iax connection.
> >
> > G711 needs about 80Kb/sec each way to work. (It's 64Kb/sec plus IP
> > overhead). GSM needs about 32Kb/sec (13Kb/sec plus IP overhead).
> >
> So with DSL 512kbs up and 3mbs down, plenty of room for G711.

Take the weakest link - up 512 kbps, that makes 6 simultenous ulaw
calls (not counting other traffic). Of course you could push more
calls, inbound voice would be good (3mbps) but outbound would be
crappy.

> Of course, I could figure out how to configure QOS in iptables for
> asterisk, it'd be a lot better.

If you have fixed bandwidth, it should be fairly simple, there's some
ready scripts for scheduling outbound/inbound traffic on fixed
bandwidth links. This is a very good resource for that -
http://lartc.org/

Also i found this yesterday, could be good for start. It doesn't
assume fixed bandwidth, but just gives priority to VoIP packets.
http://www.howtoforge.com/voip_qos_traffic_shaping_iproute2_asterisk

Regards,
Atis

>
> > IAX is more efficient than SIP in packing multiple calls into the one data
> > stream.
> >
> >> Whom do you support?
> >
> > My customers, and what they ask for...
> >
>
> Great. Thanks for the help.
> > Gordon
> >
> sean


-- 
Atis Lezdins
VoIP Developer,
IQ Labs Inc.
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Work phone: +1 800 7502835



More information about the asterisk-users mailing list