RouteGsmPortToSip
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.
When GSM incoming call is received, WaitAndAcceptCall command will end, and SIP routing will still be active
COMMAND
Command | Line 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 1 10.2.5.125 8888
OK
~# RouteGsmPortToSip 1 10.2.5.125:5061 8888 REMOVE
OK