SR-Navigator Web Panel API

API — is the interaction protocol between your software and the SR Navigator Web Panel.
All requests must be sent to /api/handler.php via POST or GET.
Every request must include a unique key for access to the selected SIM Pool, passed as the pool_key parameter.


Resetting the current Pool state

/api/handler.php?pool_key=$pool_key&action=poolRestart

Important! You must reset the Pool state every time after processing all numbers from the list.

Parameters:
$pool_key — key
$keep * — optional parameter, keeps the selected cards enabled

Response: DONE | Error
example:

DONE


Possible errors:
BAD_KEY — invalid key
BAD_ACTION — invalid action


Requesting the list of aggregators

/api/handler.php?pool_key=$pool_key&operator=$operator&action=getAgregators

Parameters:
$pool_key — key
$operator * — optional parameter, mobile operator name; multiple values allowed, comma-separated

Response: JSON format | Error
example:

[{"id":1,"model":"SR-Nano-500","numbers":22,"channels":1},{"id":2,"model":"SR-Train","numbers":32,"channels":16}]

id — Aggregator ID
model — Aggregator model
numbers — Available number count
channels — Number of parallel streams (modems)

Possible errors:
BAD_KEY — invalid key
BAD_ACTION — invalid action


Requesting the list of mobile operators

/api/handler.php?pool_key=$pool_key&device_id=$device_id&action=getOperators

Parameters:
$pool_key — key
$device_id * — optional parameter, aggregator ID; multiple values allowed, comma-separated

Response: JSON format | Error
example:

[{"name":"BEE","numbers":22},{"name":"MTS","numbers":11}]

name — Operator name in the system
numbers — Available number count

Possible errors:
BAD_KEY — invalid key
BAD_ACTION — invalid action


Requesting status of available/used numbers and channel count

/api/handler.php?pool_key=$poolKey&device_id=$device_id&operator=$operator&action=getPoolStatus

Parameters:
$pool_key — key
$device_id * — optional parameter, aggregator ID; multiple values allowed, comma-separated
$operator * — optional parameter, mobile operator name; multiple values allowed, comma-separated

Response: JSON format | Error
example:

[{"total":236,"used":22,"free":136,"channels":16}]

total — Total numbers in the Pool
used — Count of used numbers
free — Count of available numbers
channels — Maximum possible number of parallel streams (modems)

Possible errors:
BAD_KEY — invalid key
BAD_ACTION — invalid action


Getting the list of numbers

/api/handler.php?pool_key=$pool_key&device_id=$device_id&operator=$operator&position=$position&phone_exception=$phone_exception&action=getNumbers

Parameters:
$pool_key — key
$device_id * — optional parameter, aggregator ID; multiple values allowed, comma-separated
$operator * — optional parameter, mobile operator name; multiple values allowed, comma-separated
$position * — optional parameter, position=ONLINE — return only numbers currently in ONLINE position
$phone_exception * — optional parameter, excluding number prefixes (e.g., 7918,7900111); multiple values allowed, comma-separated

Response: JSON format | Error
example:

{{"number":"9011234567","place":"1-1","device_id":"1","model":"SR-Organizer","operator":"BEE","status":"FREE","position":"HOLD"},{"number":"9021234567","place":"4-3","device_id":"2","model":"SR-Train","operator":"MTS","status":"USED","position":"ONLINE"}}

number — Phone number
place — SIM card slot in the aggregator
device_id — Aggregator ID
model — Aggregator model
operator — Mobile operator
status — Status (free/used)
position — Position (hold/online)

Possible errors:
BAD_KEY — invalid key
BAD_ACTION — invalid action
WRONG_EXCEPTION_PHONE — invalid excluding prefixes
NO_NUMBERS — no numbers


Selecting and connecting a number

/api/handler.php?pool_key=$pool_key&number=$number&device_id=$device_id&operator=$operator&phone_exception=$phone_exception&action=openNumber

Parameters:
$pool_key — key
$number * — optional parameter, phone number
$device_id * — optional parameter, aggregator ID; multiple values allowed, comma-separated
$operator * — optional parameter, mobile operator name; multiple values allowed, comma-separated
$mode * — optional parameter, $mode=repeat — re-access an already processed number (another option is to reset the Pool state)
$phoneException * — optional parameter, excluding number prefixes (e.g., 7918,7900111); multiple values allowed, comma-separated

Response: [Number] | Error
example:

79001234567


Possible errors:
BAD_KEY — invalid key
BAD_ACTION — invalid action
WRONG_EXCEPTION_PHONE — invalid excluding prefixes
BUSY — the aggregator is already working with a SIM card in ONLINE mode (you must stop it using closeNumber)
NO_NUMBERS — no numbers


Selecting and connecting multiple numbers

/api/handler.php?pool_key=$pool_key&number=$number&device_id=$device_id&operator=$operator&channels=$channels&phoneException=$phoneException&action=openNumbers

Parameters:
$pool_key — key
$number — phone number; multiple values allowed, comma-separated
$device_id * — optional parameter, aggregator ID; multiple values allowed, comma-separated
$operator * — optional parameter, mobile operator name; multiple values allowed, comma-separated
$mode * — optional parameter, $mode=repeat — re-access an already processed number (another option is to reset the Pool state)
$channels * — optional parameter, minimum number of streams (modems); if max — use the maximum possible number of streams
$phoneException * — optional parameter, excluding number prefixes (e.g., 7918,7900111); multiple values allowed, comma-separated

Response: JSON format | Error
example:

{"total":236,"numbers":"9011234567","9021234567"}


Possible errors:
BAD_KEY — invalid key
BAD_ACTION — invalid action
WRONG_EXCEPTION_PHONE — invalid excluding prefixes
NO_CHANNELS — insufficient number of streams
NO_NUMBERS — no numbers


Finishing work with a number

/api/handler.php?pool_key=$pool_key&number=$number&action=closeNumber

Parameters:
$pool_key — key
$number – phone number; multiple values allowed, comma-separated

Response: DONE | Error
example:

DONE


Possible errors:
BAD_KEY — invalid key
BAD_ACTION — invalid action
EMPTY_NUMBER — no number specified
BAD_NUMBER — invalid number


Getting SIM card status

/api/handler.php?pool_key=$pool_key&number=$number&action=getSimStatus

Parameters:
$pool_key — key
$number – phone number; multiple values allowed, comma-separated

Response: JSON format | Error
example:

{"number":"9011234567","status":"[STATUS]","number":"9021234567","status":"[STATUS]"}


[STATUS]:
INACTIVE — Number not connected
CONNECTING — Connecting
WAIT_SMS — Waiting for SMS
WAIT_SMS_CALL — Waiting for SMS or incoming call (depends on the aggregator model)
RING_[INCOMING_NUMBER] — Incoming call from INCOMING_NUMBER

Possible errors:
BAD_KEY — invalid key
BAD_ACTION — invalid action
EMPTY_NUMBER — no number specified
NOT_FOUND — number not found


Getting the last SMS

/api/handler.php?pool_key=$pool_key&number=$number&sender=$sender&period=$period&code=$code&new=1&action=getLastSms

Parameters:
$pool_key — key
$number — phone number
$sender * — SMS sender (part of the sender’s number or service name)
$period * — time interval (in seconds) within which the SMS of interest may have been received (by default, the most recently received SMS is checked)
$code * — extract a sequence of digits of the specified length from the SMS (e.g., 4); if omitted, the full SMS text is returned
$new * — only unread SMS (new=1) Note: once retrieved, the SMS is considered read

Response: SMS text | Error
example:

[SMS text]


Possible errors:
BAD_KEY — invalid key
BAD_ACTION — invalid action
EMPTY_NUMBER — no number specified
NOT_FOUND — number not found, no SMS


Getting the list of SMS

/api/handler.php?pool_key=$pool_key&number=$number&sender=$sender&period=$period&code=$code&new=1&action=getSms

Parameters:
$pool_key — key
$number — phone number; multiple values allowed, comma-separated
$sender * — SMS sender (part of the sender’s number or service name)
$period * — time interval (in seconds) within which the SMS of interest may have been received (default 60 seconds)
$code * — extract a sequence of digits of the specified length from the SMS (e.g., 4); if omitted, the full SMS text is returned
$new * — only unread SMS (new=1)

Response: JSON format | Error
example:

{"number":"9011234567","status":"[STATUS]","sms_counter":1,"sms":{"id":"1","sender":"MTS","text":"Text","time":"14:20:22 16.03.2021","timestamp":"1615893622","status":"readed"}}


[STATUS]:
INACTIVE — Number not connected
CONNECTING — Connecting
WAIT_SMS — Waiting for SMS (if there are no new SMS)
WAIT_SMS_CALL — Waiting for SMS or incoming call (depends on the aggregator model)
NEW_SMS — There is an unread SMS
RING_[INCOMING_NUMBER] — Incoming call from INCOMING_NUMBER

sms_counter — Number of SMS
sms — SMS array:

id — SMS ID
sender — Sender
text — SMS text (full text or only the digit sequence after applying $code)
time — Time (HH:MM:SS DD.MM.YY)
timestamp — UNIX time
status — READED (SMS is read) / NEW (SMS is NOT read); once this response is returned, the SMS is considered read

Possible errors:
BAD_KEY — invalid key
BAD_ACTION — invalid action
NO_NUMBER — no number specified


Deleting an SMS

/api/handler.php?pool_key=$pool_key&sms_id=$sms_id&action=deleteSms

Parameters:
$pool_key — key
$sms_id — SMS ID

Response: DONE | Error
example:

DONE


Possible errors:
BAD_KEY — invalid key
BAD_ACTION — invalid action
BAD_ID — invalid ID


Clearing SMS storage on active SIM cards

/api/handler.php?pool_key=$pool_key&action=clearSimStorage

Important! The command to clear the memory of all connected SIM cards across all Aggregators in the Pool is sent without checking the connection status.

Parameters:
$pool_key — key

Response: DONE | ERROR
example:

DONE


Sending an SMS

/api/handler.php?pool_key=$pool_key&number=$number&text=$text&action=sendSms

Parameters:
$pool_key — key
$number — phone number from which the SMS will be sent
$recipient — recipient’s phone number
$text — SMS text to send

Response: JSON format | Error
example:

{"number":"9011234567","status":"[STATUS]"}


[STATUS]:
INACTIVE — Number not connected
CONNECTING — Connecting
SENT — SMS sent successfully
ERROR — Error while sending SMS


Possible errors:
BAD_KEY — invalid key
BAD_ACTION — invalid action
NO_NUMBER — no number specified


Getting the list of incoming calls

/api/handler.php?pool_key=$pool_key&number=$number&sender=$sender&period=$period&code=$code&new=1&action=getCall

Parameters:
$pool_key — key
$number — phone number; multiple values allowed, comma-separated
$period * — time interval (in seconds) within which the event of interest may have occurred

Response: JSON format | Error
example:

{"number":"9011234567","status":"[STATUS]","call_counter":1,"call":{"id":"1","incoming_number":"9021234567","time":"14:20:22 16.03.2021","timestamp":"1615893622","status":"readed"}}


[STATUS]:
CONNECTING — Connecting
WAIT_SMS — waiting for SMS (if there are no new SMS)
WAIT_SMS_CALL — Waiting for SMS or incoming call (depends on the aggregator model)
INACTIVE — Number not connected for receiving calls see grabCall

sms_counter — Number of incoming calls
sms — Array:

id — CALL ID
incoming_number — Phone number from which the call was received
time — Time (HH:MM:SS DD.MM.YY)
timestamp — UNIX time

Possible errors:
BAD_KEY — invalid key
BAD_ACTION — invalid action
NO_NUMBER — no number specified


Connecting a number to receive an incoming call SR-Box / SR-Board

/api/handler.php?pool_key=$pool_key&number=$number&action=grabCall

Parameters:
$pool_key — key
$number — phone number; multiple values allowed, comma-separated. Important! The number must be previously connected via openNumbers

Response: DONE | ERROR
example:

DONE


Deleting an incoming call record

om/api/handler.php?pool_key=$pool_key&call_id=$call_id&action=deleteCall

Parameters:
$pool_key — key
$call_id — CALL ID

Response: Done | Error
example:

Done


Possible errors:
BAD_KEY — invalid key
BAD_ACTION — invalid action
BAD_ID — invalid ID

Новости SIM Roulette

Анонсы новых девайсов и софта, информацию об акциях и скидках мы публикуем только в соцсетях: