Name
Search Search for spare numbers
Description
Search is used to search for available numbers in either the SMS/800 or 800ForAll database. The following are the allowed fields in reqparams:
dn A particular toll-free number to be queried, or a number containing either * or & (i.e., a pattern or wildcard search).
resporg The resporg to be associated with any numbers found in the search.
When a user searches for toll-free numbers at Somos, Somos puts a temporary lock on any numbers found. Since the lock is associated with that resporg, only that resporg may then reserve those numbers. Locks on numbers have a short life span and then time out.
npa The NPA of the toll-free number(s).
nxx The starting NXX of the toll-free number(s).
line The starting line of the toll-free number(s).
npalist A comma-separated list of NPA's: 800, 888, 877, 866, 855, 844 or 833.
numberword The number being searched for. The format is 1-7 characters. Valid characters include:
  • alpha-numeric,
  • * (match any character),
  • & (repeat a digit - e.g. &0&1 finds 7071, 8081)
  • % (a second repeating digit - e.g. &%&% finds 7070, 8080, 1212, 3434)
  • ^ (starts with), and
  • $ (ends with).
trailingdigits The number of trailing digits: 0, 1 or 2.
If trailingdigits is 0, 1 or 2 the search will return results that match up to the trailingdigits value.

If no trailingdigits parameter is specified, the search is first executed with a trailingdigits value of 0. If no results are returned then a second search is executed with a trailingdigits value of 2.

count The count of numbers to be searched.
contiguous Whether or not the reserved numbers must be contiguous; value must be 0 or 1.
numlist If set to 1, number lists will be created containing the numbers found to be available and those that were not. If set to 0 or omitted, no such lists are made.
nlname The name of the number list to be created. This is only used if numlist is set to 1.
showvanity If set to 1, if a vanity name was indicated in the numberword field, then the vanity name as well as the number is returned. The number and vanity name are colon-separated in the response.
The following fields will generate a Search to SMS/800: dn, npa, nxx, line.

The following fields will generate a Search to 800ForAll: npalist, numberword, trailingdigits, showvanity.

MGI Messages
For an SMS/800 query, Search sends a REQ-NSR message with an action code of S. The response message is a RSP-NSR.

The SMS/800 MGI will allow, at most, 10 numbers to be searched in a single REQ-NSR request. If the specified count is greater than ten, 8MS will automatically generate additional REQ-NSR messages.

Example
The following request parameters search for seven spare 877 numbers starting at NXX 555:
npa~877;nxx~555;count~7