As specified in my reply, you can use the command sip show channels to learn the active channels being used. You will get something like the following format in the screen:
Peer User/ANR Call ID Seq (Tx/Rx) Lag Jitter Format
192.168.0.206 206 79010fe1-5a 00101/61141 00000ms 0000ms ULAW
Yes, codec placement is in order where first available codec comes first.
disallow=all
allow=alaw
allow=ulaw
allow=gsm
allow=g729
In above case, alaw will be chosen first.
However, disallow must be put before allow. Otherwise, you may have problem.
But what I want to know is if I've specified the extensions 101 with codec, a,b,c and d and 102 with the same codec, a,b,c and d under my sip.conf. How could I know 101 is using what codec under cli when it is connected with 102?
Btw, is there any order for those codec?
i.e. if all extensions using:
disallow=all
allow=a
allow=b
allow=c
allow=d
So, the "a" will always be the first codec to use? Thanks.