Command CONNECT
CONNECT <src_type>:<src_stream>:<src_idx>:[opt] <dst_type>:<dst_stream>:<dst_idx>:[opt]
This command establish a simplex cross-connect between an incoming and outgoing stream. To do a duplex connection, one more connection needs to be done separately.
The fields are:
- src_type, dst_type:
RTP (RTP connection), TDM (TDM cross-connect), TDMOE (Pseudowire cross-connect)
- src_stream, dst_stream:
For RTP: IP-address, for TDM: Span number
- src_idx, dst_idx:
For RTP: Port number (local/remote), for TDM: Timeslot
- opt:
Usually src_codec, dst_codec are voice codec used for the specified stream end, e.g. alaw (or g711a), ulaw (or g711u), g729, g723, g726, etc.
Note: If src_codec and dst_codec parameters are not specified, they take the default value. Currently the default codec is alaw. For the incoming RTP data src_codec can be overridden by the payload type of RTP packet.
The abbreviations are: src is source, dst - destination, li - span, ts – timeslot, codec - codec name, ip – IP-address, r_port – remote port number, l_port – local port number.
For span and timeslot parameters several formats are supported; you can skip li, ts abbreviations and specify only span and timeslot numbers.
Example:
li0:ts5 or 0:5
Below there are several examples of the CONNECT command with some description:
1. TDM -> TDM Mode
connect tdm:<src_li#>:<src_ts#>[:src_codec] tdm: <dst_li#>:<dst_ts#>[:dst_codec]
Example:
connect tdm:li0:ts5:ulaw tdm:li1:ts10:alaw
Note: src_codec and dst_codec will be used as a default TDM codec type specified in the default configuration settings.
2. RTP -> TDM Mode
connect rtp:<src_ip>:<src_remote_port>:<src_local_port>[:src_codec] tdm: <dst_li#>:<dst_ts#>[:dst_codec]
Example:
connect rtp:192.168.102.70:5060:6060:g729 tdm:li0:ts10:alaw
Note: Omitted src_codec will be set according to the incoming RTP payload type automatically. Omitted dst_codec will be substituted by the default RTP stream encoder codec.
3. TDM -> RTP Mode
connect tdm:<src_li#>:<src_ts#>[:src_codec] rtp:<dst_ip>:<dst_remote_port>:<dst_local_port>[:dst_codec]
Example:
connect tdm:li0:ts10:alaw rtp:192.168.102.70:5060:6060:g729
4. RTP -> RTP Mode
connect rtp:<src_ip>:<src_remote_port>:<src_local_port>[:src_codec] rtp:<dst_ip>:<dst_remote_port>:<dst_local_port>[:dst_codec]
Example:
connect rtp:192.168.102.60:5060:6060:g726 rtp:192.168.102.70:5060:6060:g729
5. N64 Streaming
connect tdmli:<src_li#>[:format] tdmop:<dst_ip>:<dst_remote_port>:<dst_local_port> connect tdmop:<src_ip>:<src_remote_port>:<src_local_port> tdmli:<dst_li#>[:format]
The abbreviations are:
- src_li, dst_li: source/destination E1/T1 span
- src_ip, dst_ip: source/destination IP-address
- src_remote_port, dst_remote_port: source/destination
- src_local_port, dst_local_port: source/destination local port number
- format - defines which timeslots to send/receive; can take following values:
- number from 1 to 32 (32 connects 0-31 timeslots, 31 connects 1-31 timeslots, 30 connects 2-31 timeslots, etc)
- string ‘raw’ (connects 0-31 timeslots)
- mask [ts1,ts2,ts3,…] (defines the list of timeslots to connect)
Example:
connect tdmli:0:mask[3,7,11] tdmop:192.168.102.60:5060:6060
Note: If format is not declared, timeslots 1-31 are connected.
Note: With the Alvis-PCIe unit you can use only RTP -> RTP connection mode.
Also you can use the connection command with a conference mode. For more information see Multi-conferences support.
6. TDMoE
connect tdmli:<src_li#> tdmloe:linkid:<src_iface>:<dst_mac>:chunk connect tdmloe:<linkid>:<src_iface>:<dst_mac>:chunk tdmli:<src_li#>
Example:
#For Li0 connect tdmli:0 tdmoe:0:eth0:f4:6d:04:63:b1:82:8 connect tdmoe:0:eth0:f4:6d:04:63:b1:82:8 tdmli:0 #For Li1 connect tdmli:1 tdmoe:1:eth0:f4:6d:04:63:b1:82:8 connect tdmoe:1:eth0:f4:6d:04:63:b1:82:8 tdmli:1