SamW
2004-Jan-09 13:18 UTC
[Asterisk-Users] Why * try to codec translate when it can do without during codec negotiation.
I always like to use * to negotiate a codec which both sip clients support. But * do not try to go in that direction, * try to be in the middle and try to translate(code convert) the rtp stream, which will deteriorate the call quality and it will also cost for license if we are translating using G729 codec. Here is what happens on a test that I performed. I only list the fields that I think are important. sip.conf I have 2 sip clients sip-a and sip-b both cisco ATA-186 with sip-a set to g711 (alaw/ulaw), and sip-b set to g729. If * request with a particular codec then ATA can change to that codec irrespective of the codec that is set as the preference. case 1 ------ [sip-a] allow=g729 disallow=all allow=alaw [sip-b] disallow=all allow=alaw allow=g729 sip-a call sip-b Call get establish with sip-a(alaw) ---> * (codec-translate) --> sip-b(g729) Note : order of preference under a context do not matter. Else case 2 ------ [sip-a] disallow=all allow=g729 [sip-b] disallow=all allow=g729 allow=alaw sip-a(g729) ---> * (codec-passthrough) --> sip-b(g729) Note : Here sip-b-ATA is set to g729 and asterisk thinks that sip-a-ATA cannot handle g711 and hence it request ATA to be g729 codec, and ATA switch to g729 and work as expected. Issue with the asterisk in case 1 above is that it request from ATA 2 choices and sip-a-ATA chooses g711 and asterisk has to start translate the coders, which is cost both quality, cpu resources and money. Is there a solution how to set the coders so that it will avoid transcoding when ever it can ? Is this a bug or is this how asterisk is implemented? But it is essential for users to decide whether we give priority to transcoding ($$ to VoiceAge/Digium) or try to use passthrough when ever possible.
Robert Hajime Lanning
2004-Jan-09 14:20 UTC
[Asterisk-Users] Why * try to codec translate when it can do without during codec negotiation.
<quote who="SamW">> case 1 > ------ > [sip-a] > allow=g729 > disallow=all > allow=alawTry: [sip-a] disallow=all allow=g729 allow=alaw The "disallow=all" clears your previous setting of "allow=g729" -- END OF LINE -MCP
SamW
2004-Jan-09 21:57 UTC
[Asterisk-Users] Why * try to codec translate when it can do without during codec negotiation.
Ooops, It was a type that is how I tried it. But Asterisk do not see to have a way to force codec negotiation if possible. * always want to tran$code. (Which cost $$ and quality) My original config should be corrected to Case 1 ---------- [sip-a] disallow=all allow=g729 allow=alaw SamW At 01:20 PM 1/9/2004 -0800, you wrote:><quote who="SamW"> > > case 1 > > ------ > > [sip-a] > > allow=g729 > > disallow=all > > allow=alaw > >Try: >[sip-a] >disallow=all >allow=g729 >allow=alaw > >The "disallow=all" clears your previous setting of "allow=g729" > >-- >END OF LINE > -MCP >_______________________________________________ >Asterisk-Users mailing list >Asterisk-Users@lists.digium.com >http://lists.digium.com/mailman/listinfo/asterisk-users >To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users