[Asterisk-Users] Codec Negotiation Does not seem to work as expected ?? Help Please !!
Samath
swc at svtinc.com
Mon Jan 5 09:45:27 MST 2004
Thanks for all who is helping.
I tried, canreinvite=yes on all contexts but that do not seem to work as
well. But the issue is not related to negotiating between end points,
but for me, asterisk do not have a proper configuration scheme which
works, to the requirement of the user. The Code-Negotiation in * for me
is buggy or featureless in Asterisk.
The way to negotiate coders is to give priority to bridge-native without
a coder translation/conversion when ever possible, if we do not hard
tell * to do so. There could be users need to give priority to coder
translation (If you pay royalty fees to g729 may be!!). So my
expectation is we should have a way to tell * what order we like to have
coders negotiated for different contexts (or end points).
I did some more digging into the problem and here is what I see.
I changed the configuration as follows, (added disallow/allow to ATA
context, and I keep canreinvite=no as to show that * misbehaves in codec
negotiation by it self)
[general]
....
disallow=all
allow=g729
allow=ulaw
allow=alaw
register => sip-a at foo.com
register => sip-b at bar.com
[sip-a]
....
canreinvite=no
disallow=all
allow=ulaw
[sip-b]
...
canreinvite=no
disallow=all
allow=g729
[ATA]
.....
canreinvite=yes
disallow=all
allow=g729
When ever I only allow g729 in ATA-context, during a call setup asterisk
send the SIP:Session Progress Message with only g729 listed in SDP
headers. Then I can make calls through to sip-a.
Then if I change [ATA] context to following(change allow=alaw), I can
make calls through sip-b. But not sip-a. [This is expected and is OK]
Here the * only send ulaw in its Session In progress request to ATA. *
do not list g729 in its request to '*'. Then ATA switches to the correct
codec and start sending rtp packets correctly.
[ATA]
.....
canreinvite=no
disallow=all
allow=ulaw
My point now is if * can send only the negotiated codec from sip-a or
sip-b then the ATA will act correctly. But when I configure for both
coders, as below,
[ATA]
.....
canreinvite=no
disallow=all
allow=g729
allow=ulaw
asterisk misbehaves, by sending both ulaw and g729 in the request to the
ATA and '*' gets confused by it self and drop the call. Also I have
noticed that allow order given in the [ATA] context have no effect.
Example, if I change context to have the following order, I expect * to
atleast send the request in the order it is shown in the context. But it
always, send the request to ATA in the order, g729 and then ulaw. I do
not understand where '*' is deciding the order of the coders to send.
Ex.
[ATA]
.....
canreinvite=no
disallow=all
allow=ulaw
allow=g729
I think sip-a, sip-b and ATA is acting correctly, but '*' do not have a
way to configure the codec negotiation (There is but misbehave??). If we
users can agree, on this and if it is a requirement for us, should we be
able to file a bug-report? or send a request to the developers?? Lets
talk? I am willing to participate in any test that needs to be carried
out.
Thanks,
SamW
More information about the asterisk-users
mailing list