Codec mismatch, mute call no ring

hi there,

here is the diagram of my system.

sip—>asterisk 1<—iax trunk–>asterisk 2—>sip

here is the codec allow config,

disallow=all
allow=g729
allowg723.1

this entry is @ every user/peer configs, ie…iax.conf,iax_additional.conf, sip.conf, sip_additional.conf

codecpritority=host…included with iax.conf. , in both the asterisk.

extension.conf is like
asterisk 1
exten => _7689X.,1,Dial(iax2/server/{EXTEN:0},60)
exten => _7689X.,2,hangup

asterisk 2
exten => _7689X.,1,Dial(sip/server/{EXTEN:1},60)
exten => _7689X.,2,hangup

problem.

when g729 is allowed 1st place g723 results in mute call no ring no sound, g729 is running smooth.

i get follwoing errors in asterisk 1

[Mar 23 12:39:33] WARNING[3373]: channel.c:4910 ast_write: Codec mismatch on channel SIP/216.24.247.50-0000000b setting write format to g729 from g723 native formats 0x1 (g723)
[Mar 23 12:39:33] WARNING[3373]: channel.c:5104 set_format: Unable to find a codec translation path from 0x1 (g723) to 0x100 (g729)
[Mar 23 12:39:33] WARNING[3373]: chan_sip.c:6455 sip_write: Asked to transmit frame type g729, while native formats is 0x1 (g723) read/write = 0x1 (g723)/0x1 (g723)

errors in asterisk 2

[Mar 23 12:51:44] WARNING[2626]: channel.c:5104 set_format: Unable to find a codec translation path from 0x1 (g723) to 0x100 (g729)
[Mar 23 12:51:44] NOTICE[2815]: channel.c:4149 __ast_read: Dropping incompatible voice frame on IAX2/bos_SERVER-1547 of format g723 since our native format has changed to 0x100 (g729)

now if i give g723 the 1st place in allow …its vice-versa…

can any one please help on this issue…i getting nuts with this looop…

regards

sajib

The RTP source chooses the incoming codec. If you allow two codecs, it could choose either of them (or even switch mid-call). If the outgoing leg can limit the codecs to a different one, you must ensure that you have the codecs and licenses installed to allow it convert between the caller’s choice of codec and the one that the callee allows.

thank you for you reply.

who is the rtp source? sip user that sends the call through?

how do i let it allow 723 to be 723 and 729 to be 729.

i m using asterisk mainly to compress rtp header and this save b/w.

The RTP source, in this context, is the device that did the A/D conversion or the most recent transcoding.

SDP tells the upstream side which codecs can be used, but any of those codecs can then be chosen.

I think there is a channel variable you can set to constrain the choice of codec, but that needs to be set before you invoke the Dial application, so you will need to look up the codec for the outgoing side before you have actually interacted with the callee.

As best as I can remember, Asterisk only propagates codec constrainsts forwards.

can u please tell me where to put this varaiable to constrain codec choice? in the extensions.conf i guess?

if it so where to put this variable? below i m giving the extension is use in asterisk 1 server.

extensions.conf

[general]
static = yes
writeprotect = no
autofallthrough = yes
clearglobalvars = no
[global]

[from-sip]

exten => _3768801X.,1,Dial(IAX2/server/${EXTEN:0},60)
exten => _3768801X.,2,hangup

exten => _8768801X.,1,Dial(IAX2/server/${EXTEN:0},60)
exten => _8768801X.,2,hangup

and here is the extensions.conf of asterisk 2

extensions.conf

[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
[globals]

[from-sip]

exten => _3768801X.,1,Dial(SIP/192.168.12.3/${EXTEN:2},60)
exten => _376801X.,2,hangup

exten => _876801X.,1,Dial(SIP/192.168.12.4/${EXTEN:2},60)
exten => _876801X.,1,hangup

I have never used the feature. You will have to search the forum, where I know that it has been described, or work from first principles.

Any mechanism that can set a variable can be used, although it should be fairly obvious that only one place has enough information to do better than the use of allow, and doesn’t involve AMI.

didnt get you…i m very new in this connection…
sorry if my nievity is irritating you. :smile: