Can someone give some light on this call setup? from console (slin) and sip peer (alaw,slin,g729)?
Why if they have a the same code, ends saying “Could not find preferred codec - Going for the best codec” and “o audio format found to offer. Cancelling call to…”
Thanks!!
Kig
Asked to create a SIP channel with formats: 0x8000 (slin16)
== Using SIP RTP CoS mark 5
== Using SIP VRTP CoS mark 6
Allocating new SIP dialog for 5312212b3c41fa8f3ea0d0440c8ad150@192.168.3.20 - INVITE (With RTP)
Setting NAT on RTP to Off
Found IP address for this socket
Setting SIP_TRANSPORT_UDP with address 192.168.3.20:5060
Could not find preferred codec - Going for the best codec
*** Our native formats are 0x8000 (slin16)
*** Joint capabilities are 0x8000 (slin16)
*** Our capabilities are 0x148 (alaw|slin|g729) Could not find preferred codec - Going for the best codec
*** AST_CODEC_CHOOSE formats are 0x8000 (slin16)
*** Our preferred formats from the incoming channel are 0x8000 (slin16)
This channel will not be able to handle video.
Channel ‘Console/default’ has no RTP, not doing anything
Not copying variable DIALEDTIME.
Not copying variable ANSWEREDTIME.
Not copying variable DIALEDPEERNAME.
Not copying variable DIALEDPEERNUMBER.
Not copying variable DIALSTATUS.
Outgoing Call for …
Updating call counter for outgoing call No audio format found to offer. Cancelling call to…
The first one is because the console is only offering 16kHz, 16 bit audio, and the SIP line is only offering 8kHz 16 bit, as its linear format. slin16 is not the same as slin
1) What has to do slin16 and g722 beacuse it’s conversor goes throught this codec:
module load codec_g722.so
== Parsing ‘/etc/asterisk/codecs.conf’: == Found
– codec_g722: using generic PLC
== Registered translator ‘g722tolin’ from format g722 to slin, cost 1
== Registered translator ‘lintog722’ from format slin to g722, cost 1
plc_samples 160 format f
== Registered translator ‘g722tolin16’ from format g722 to slin16, cost 4001
== Registered translator ‘lin16tog722’ from format slin16 to g722, cost 1
2) Why slin16 (0x8000) doesn’t appear on ‘core show codecs’?
*CLI> core show codecs
Disclaimer: this command is for informational purposes only.
It does not indicate anything about your configuration.
INT BINARY HEX TYPE NAME DESC
For the second part, because the limit on the audio codecs in core show codecs is hard coded. That probably constitutes a severity “tweak” bug, so might be worth reporting.