Prosody application note: the version 1 compatibility builds

In Prosody version 1, firmware was packaged into builds. For backward compatibility, version 2 (TiNG) provides a resource manager which can be configured to emulate these builds. Each version 1 compatibility build comes in two variants: A-law and mu-law. The only difference is the type of timeslots they handle: A-law or mu-law respectively. Note that this is not the format of data that you use for replay and record - it is the format used on the network timeslots (i.e. H.100 bus, trunk, etc).

Here is the feature list provided by each build:

BuildRelated API functionFeature
sp30sp60sp64esp30ecr24
YYYYY sm_record_start() sm_replay_start() Replay and record at 64 Kb/s A-law and mu-law
YYYY- sm_record_start() sm_replay_start() Replay and record at 48 Kb/s A-law and mu-law
YYYY- sm_record_start() sm_replay_start() Replay and record in OKI format at 32 Kb/s
YYYY- sm_record_start() sm_replay_start() Replay and record in OKI format at 24 Kb/s
-YY-- sm_record_start() sm_replay_start() Replay and record in IMA format at 32 Kb/s
YY-Y- sm_record_start() sm_replay_start() Replay and record in ACUBLK format at 16 Kb/s
YY-Y- sm_record_start() sm_replay_start() Replay and record in ACUBLK format at 12 Kb/s
----- sm_record_start() sm_replay_start() Replay and record in CELP format at 8 Kb/s
YYYYY sm_record_start() sm_replay_start() Replay and record in 8-bit linear format at 64 Kb/s
YYYYY sm_record_start() sm_replay_start() Replay and record in signed 8-bit linear format at 64 Kb/s
YYYYY sm_record_start() sm_replay_start() Replay and record in 16-bit linear format at 128 Kb/s
YYYYY sm_record_start() sm_replay_start() Use of AGC and volume control on record and replay
YYYYY sm_replay_start() Addition of background channel to replay
Y--Y- sm_replay_start() Changing speed of replay to be up to 200% or down to 50% of original speed
YYYYY sm_play_tone() sm_play_cptone() sm_play_digits() Synthesis of tones and digits
YYYYY sm_listen_for() Tone detection
YYYY- sm_listen_for() Grunt detection
Y---- sm_listen_for() Pulse detection
YYYY- sm_conf_prim_start() Conferencing
---YY sm_condition_input() Echo cancellation
-YY-- sm_catsig_listen_for() Live speaker detection

Note that the pulse detection feature which was present in version 1 has been withdrawn in favour of a superior pulse detection facility which is available as a host-based library.

Caps masks

The values which can be used in the caps_mask field when calling sm_channel_alloc() are:

kSMChannelCapsWriteDataAbility
For a channel which can do replay, play tones, or produce conference output.
kSMChannelCapsReadDataAbility
For a channel which can do recording or conference input.
kSMChannelCapsRecogAbility
For a channel which can perform tone detection or grunt detection.

Not all capabilities are permitted for every channel type. The combinations of basic capabilities permitted are:

kSMChannelType
InputOutputHalf DuplexFull Duplex
kSMChannelCapsWriteDataAbility BadOkOkOk
kSMChannelCapsReadDataAbility OkBadOkOk
kSMChannelCapsRecogAbility OkBadOkOk

If none of these capabilities are present, it is equivalent to specifying all of these capabilities which are valid for the channel type.

If you specify kSMChannelCapsReadDataAbility without kSMChannelCapsRecogAbility then kSMChannelCapsRecogAbility is implictly added. This means that there are effectively only five combinations:

In addition, some extra values can be specified for some builds. These are:

Build
Valuesp30sp60sp64esp30ecr24
kSMChannelCapsCondRefInput ---YY
kSMChannelCapsCondStandAlone ---YY
kSMChannelCapsCondHalfLoad ---Y-
kSMChannelCapsRecAltDataSourceOnly ----Y

Note that if you specify one of these extra capabilities when referring to a build which does not permit that capability, the behaviour is undefined. This applies whether you refer to firmware explicitly (with sm_channel_alloc_placed() or sm_channel_alloc() using a firmware_id) or implicitly (using sm_channel_alloc() with no firmware_id).

The meaning of these capabilities is as follows:

kSMChannelCapsCondRefInput
This channel is used only to specify a reference input for an echo canceller. Consequently it requires no resources other than a timeslot and cannot perform any operations itself.
kSMChannelCapsCondStandAlone
This channel is being allocated on a module which is dedicated to standalone echo cancellers. The application has not allocated and shall not allocate any other kind of channel on this module. If the application allocates any other kind of channel, incorrect operation may occur.
kSMChannelCapsCondHalfLoad
This channel is one of several being allocated on a module of which the application guarantees to use no more than half for echo cancellation. If the application attempts to start more echo cancellers than this, incorrect operation may occur.
kSMChannelCapsRecAltDataSourceOnly
This channel is intended to be used only for recording and such recording will use alt_data_source field to set the source of the recording to another channel. Consequently, this channel does not require an input timeslot.