RouteGsmPortToSip

From IRON Test Suite
Jump to navigation Jump to search

DESCRIPTION

This command creates or deletes rule for routing incoming call on GSM port defined by port_index on given SIP device. Sip device is defined with parameter sip_device_ip_address which is in format: IPAddress[:listeningPort]. Called number is defined with parameter destination_number (this number will be used in the SIP To header in INVITE message). Last parameter in the command defines if rule will be created ("ADD") or deleted ("REMOVE"). It is optional and its default value is "ADD".
Note: if there is a SIP route defined on particular GSM port, and on the same port command WaitAndAcceptCall is executed, it will have higher priority because it is immediate command with waiting status. When GSM incoming call is received, WaitAndAcceptCall command will be finished, and SIP routing will still be active for subsequent GSM incoming calls.

COMMAND

Command Input arguments Returns
RouteGsmPortToSip PortIndex, SipDeviceAddress, DestinationNumber, Command (ADD/REMOVE) In the case of error, Error Code

OUTPUT

Command status in the following format:
"%s\n", command_status

EXAMPLE

~# RouteGsmPortToSip 4 192.168.196.166 1002
OK

~# RouteGsmPortToSip 4 192.168.196.166:5061 1002 REMOVE
OK

API

MessageCode: GRA_ROUTE_GSM_TO_SIP_REQUEST

MESSAGE BODY
Field Name Length Description
PortIndex 4 GSM Port index (0xFFFFFFFF for any)
SipDeviceAddress 32 IP address [:port] of SIP device
DestinationNumber 16 Destination number (to be used in SIP INVITE message)
AddRoute 4 Operation:
1 - Add
2 - Remove

The format of Message Body can be coded as the following C-language structure:

typedef struct
{
   ULONG    PortIndex;
   UCHAR    SipDeviceAddress[32];
   UCHAR    DestinationNumber[16];
   ULONG    AddRoute;
} GRAM_ROUTE_GSM_TO_SIP_REQUEST;

MessageCode: GRA_ROUTE_GSM_TO_SIP_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_GSM_TO_SIP_CONFIRM;