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:
| Build | Related API function | Feature | ||||
|---|---|---|---|---|---|---|
| sp30 | sp60 | sp64 | esp30 | ecr24 | ||
| Y | Y | Y | Y | Y | sm_record_start() sm_replay_start() | Replay and record at 64 Kb/s A-law and mu-law |
| Y | Y | Y | Y | - | sm_record_start() sm_replay_start() | Replay and record at 48 Kb/s A-law and mu-law |
| Y | Y | Y | Y | - | sm_record_start() sm_replay_start() | Replay and record in OKI format at 32 Kb/s |
| Y | Y | Y | Y | - | sm_record_start() sm_replay_start() | Replay and record in OKI format at 24 Kb/s |
| - | Y | Y | - | - | sm_record_start() sm_replay_start() | Replay and record in IMA format at 32 Kb/s |
| Y | Y | - | Y | - | sm_record_start() sm_replay_start() | Replay and record in ACUBLK format at 16 Kb/s |
| Y | Y | - | 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 |
| Y | Y | Y | Y | Y | sm_record_start() sm_replay_start() | Replay and record in 8-bit linear format at 64 Kb/s |
| Y | Y | Y | Y | Y | sm_record_start() sm_replay_start() | Replay and record in signed 8-bit linear format at 64 Kb/s |
| Y | Y | Y | Y | Y | sm_record_start() sm_replay_start() | Replay and record in 16-bit linear format at 128 Kb/s |
| Y | Y | Y | Y | Y | sm_record_start() sm_replay_start() | Use of AGC and volume control on record and replay |
| Y | Y | Y | Y | Y | 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 |
| Y | Y | Y | Y | Y | sm_play_tone() sm_play_cptone() sm_play_digits() | Synthesis of tones and digits |
| Y | Y | Y | Y | Y | sm_listen_for() | Tone detection |
| Y | Y | Y | Y | - | sm_listen_for() | Grunt detection |
| Y | - | - | - | - | sm_listen_for() | Pulse detection |
| Y | Y | Y | Y | - | sm_conf_prim_start() | Conferencing |
| - | - | - | Y | Y | sm_condition_input() | Echo cancellation |
| - | Y | Y | - | - | 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.
The values which can be used in the caps_mask field when calling sm_channel_alloc() are:
Not all capabilities are permitted for every channel type. The combinations of basic capabilities permitted are:
| kSMChannelType | ||||
|---|---|---|---|---|
| Input | Output | Half Duplex | Full Duplex | |
| kSMChannelCapsWriteDataAbility | Bad | Ok | Ok | Ok |
| kSMChannelCapsReadDataAbility | Ok | Bad | Ok | Ok |
| kSMChannelCapsRecogAbility | Ok | Bad | Ok | Ok |
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:
kSMChannelCapsWriteDataAbility
kSMChannelCapsRecogAbility
kSMChannelCapsWriteDataAbility | kSMChannelCapsRecogAbility
kSMChannelCapsRecogAbility | kSMChannelCapsReadDataAbility
kSMChannelCapsWriteDataAbility | kSMChannelCapsRecogAbility | kSMChannelCapsReadDataAbility
In addition, some extra values can be specified for some builds. These are:
| Build | |||||
|---|---|---|---|---|---|
| Value | sp30 | sp60 | sp64 | esp30 | ecr24 |
| kSMChannelCapsCondRefInput | - | - | - | Y | Y |
| kSMChannelCapsCondStandAlone | - | - | - | Y | Y |
| 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: