RouteSipToGsmPort
DESCRIPTION
This command creates or deletes rule for routing incoming SIP call from the
specified SIP device on the specified GSM Port. SIP device is identified with
its IP address, port_index parameter defines which GSM port will be used for
outgoing calls. sip_device_ip_address and port_index may have value "ANY" which
means that incoming SIP call will be accepted from ANY SIP device and will be
routed on ANY available GSM port. Last parameter in the command defines if rule
will be created ("ADD") or deleted ("REMOVE"). It is optional and its default
value is "ADD".
GSM robot listens (both UDP and TCP) on default SIP port 5060. Listening port
is configurable from registry (registry key services/gsmrobotd/parameters/sip,
value ListeningPort).
The RTP Flow is also routed both way and G.711 is supported.
The RFC 2833 (DTMF support) is also supported from SIP to GSM only.
COMMAND
Command | Input arguments | Returns |
---|---|---|
RouteSipToGsmPort | SipDeviceAddress, PortIndex, Command (ADD/REMOVE) | In the case of error, Error Code |
OUTPUT
Command status in the following format:
"%s\n", command_status
EXAMPLE
~# RouteSipToGsmPort 192.168.196.166 2
OK
~# RouteSipToGsmPort 192.168.196.166 2 REMOVE
OK
~# RouteSipToGsmPort ANY 4
OK
~# RouteSipToGsmPort 192.168.196.166 ANY
OK
~# RouteSipToGsmPort ANY ANY
OK
~# RouteSipToGsmPort ANY ANY REMOVE
OK
API
MessageCode: GRA_ROUTE_SIP_TO_GSM_REQUEST
MESSAGE BODY | ||
---|---|---|
Field Name | Length | Description |
SipDeviceAddress | 16 | IP address of SIP device (empty for any) |
PortIndex | 4 | GSM Port index (0xFFFFFFFF for any) |
AddRoute | 4 | Operation: 1 - Add 2 - Remove |
The format of Message Body can be coded as the following C-language structure:
typedef struct { UCHAR SipDeviceAddress[16]; ULONG PortIndex; ULONG AddRoute; } GRAM_ROUTE_SIP_TO_GSM_REQUEST;
MessageCode: GRA_ROUTE_SIP_TO_GSM_CONFIRM
MESSAGE BODY | ||
---|---|---|
Field Name | Length | Description |
Status | 4 | Command status (0 if successful, otherwise see list of Error Codes Values) |
The format of Message Body can be coded as the following C-language structure:
typedef struct { ULONG Status; } GRAM_ROUTE_SIP_TO_GSM_CONFIRM;