[AsteriskBrasil] Ativar g729 nas chamadas de saída.

João Marcelo Queiroz jmbq em bol.com.br
Quinta Maio 26 16:18:04 BRT 2011


Tenho um servidor com 30 licenças g729 (HowlerTech) rodando em um tronco SIP (Vono). As chamadas de entrada estão vindo sem problema:

10.XXX.XXX.XXX    XX322XXXXX  42538750f84  00101/00001  0x100 (g729)     No       Rx: ACK

Porém as chamadas saintes estão indo com ulaw, mesmo setando o tronco para g729&ulaw&alaw.
Fiz testes deixando o tronco apenas como allow = g729 e saiu corretamente pelo g729. Entretanto não posso deixar usando apenas o g729 pois alguns poucos ramais (em ATAs) passam e recebem fax.

Tentei setar o SIP_CODEC=g729 no contexto de saída mas mesmo assim não funciona.

Algum luz de como poderia solucionar isso?

Grato,

João Marcelo





Segue configuração do tronco:

[gvt]
disallow=all
allow=g729&ulaw&alaw
type=peer
username=999999999XX
secret=999999999XX
domain=gvt.com.br
fromuser=999999999X
fromdomain=gvt.com.br
host=10.XXX.XXX.XXX
nat=Yes
insecure=port,invite
qualify=yes
port=5060
dtmfmode=rfc2833
context=from-internal
reinvite=no
canreinvite=no

E dos ramais:

[8094]
deny=0.0.0.0/0.0.0.0
disallow=all
type=friend
secret=XXXXXX
qualify=yes
port=5060
pickupgroup=
permit=0.0.0.0/0.0.0.0
nat=yes
mailbox=8094 em device
host=dynamic
dtmfmode=rfc2833
dial=SIP/8094
context=from-internal
canreinvite=no
callgroup=
callerid=device <8094>
allow=g729
allow=ulaw
allow=alaw
accountcode=
call-limit=50

Segue plano de discagem:

exten => 999999999,1,Answer
exten => 999999999,2,Set(SIP_CODEC=g729)
exten => 999999999,3,Dial(SIP/gvt/999999999,,Tt)
exten => 999999999,4,Hangup

Segue log:

[2011-05-26 16:07:24] VERBOSE[23244] logger.c: [2011-05-26 16:07:24]     -- Executing [999999999 em from-internal:1] Answer("SIP/8094-08602318", "") in new stack
[2011-05-26 16:07:24] VERBOSE[23244] logger.c: [2011-05-26 16:07:24]     -- Executing [999999999 em from-internal:2] Set("SIP/8094-08602318", "SIP_CODEC=g729") in new stack
[2011-05-26 16:07:24] VERBOSE[23244] logger.c: [2011-05-26 16:07:24]     -- Executing [999999999 em from-internal:3] Dial("SIP/8094-08602318", "SIP/gvt/999999999||Tt") in new stack
[2011-05-26 16:07:24] VERBOSE[23244] logger.c: [2011-05-26 16:07:24]     -- Called gvt/999999999
[2011-05-26 16:07:25] VERBOSE[23244] logger.c: [2011-05-26 16:07:25]     -- SIP/gvt-085eda40 is making progress passing it to SIP/8094-08602318
[2011-05-26 16:07:26] VERBOSE[23244] logger.c: [2011-05-26 16:07:26]     -- SIP/gvt-085eda40 answered SIP/8094-08602318
[2011-05-26 16:07:35] WARNING[23244] res_musiconhold.c: Music on Hold class 'default' not found
[2011-05-26 16:07:35] WARNING[23244] res_musiconhold.c: Music on Hold class 'default' not found
[2011-05-26 16:07:47] VERBOSE[23244] logger.c: [2011-05-26 16:07:47]   == Spawn extension (from-internal, 999999999, 3) exited non-zero on 'SIP/8094-08602318'
[2011-05-26 16:07:47] VERBOSE[23244] logger.c: [2011-05-26 16:07:47]     -- Executing [h em from-internal:1] Macro("SIP/8094-08602318", "hangupcall") in new stack
[2011-05-26 16:07:47] VERBOSE[23244] logger.c: [2011-05-26 16:07:47]     -- Executing [s em macro-hangupcall:1] GotoIf("SIP/8094-08602318", "1?skiprg") in new stack
[2011-05-26 16:07:47] VERBOSE[23244] logger.c: [2011-05-26 16:07:47]     -- Goto (macro-hangupcall,s,4)
[2011-05-26 16:07:47] DEBUG[23244] app_macro.c: Executed application: GotoIf
[2011-05-26 16:07:47] VERBOSE[23244] logger.c: [2011-05-26 16:07:47]     -- Executing [s em macro-hangupcall:4] GotoIf("SIP/8094-08602318", "1?skipblkvm") in new stack
[2011-05-26 16:07:47] VERBOSE[23244] logger.c: [2011-05-26 16:07:47]     -- Goto (macro-hangupcall,s,7)
[2011-05-26 16:07:47] DEBUG[23244] app_macro.c: Executed application: GotoIf
[2011-05-26 16:07:47] VERBOSE[23244] logger.c: [2011-05-26 16:07:47]     -- Executing [s em macro-hangupcall:7] GotoIf("SIP/8094-08602318", "1?theend") in new stack
[2011-05-26 16:07:47] VERBOSE[23244] logger.c: [2011-05-26 16:07:47]     -- Goto (macro-hangupcall,s,9)
[2011-05-26 16:07:47] DEBUG[23244] app_macro.c: Executed application: GotoIf
[2011-05-26 16:07:47] VERBOSE[23244] logger.c: [2011-05-26 16:07:47]     -- Executing [s em macro-hangupcall:9] Hangup("SIP/8094-08602318", "") in new stack
[2011-05-26 16:07:47] VERBOSE[23244] logger.c: [2011-05-26 16:07:47]   == Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/8094-08602318' in macro 'hangupcall'
[2011-05-26 16:07:47] VERBOSE[23244] logger.c: [2011-05-26 16:07:47]   == Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/8094-08602318'



Mais detalhes sobre a lista de discussão AsteriskBrasil