# Telephony Services (CNAM Requests over SS7)

In release 2.10 and the above, telephony services (CNAM Request) can be manage from the routing engine in the following format:

```
 params[:telephony_services].each do |service|  -> Array of telephony services
   service[:name]                               -> Customer telephony service name
   service[:type]                               -> For now only "CNAM Request"
   service[:enabled]                            -> Indicate if the service is enabled (true) or not (false)
                                                   (Only the telephony service define in the profile associated to the NAP is enabled)
                                                   (The others telephony services define in others profiles are disabled)
                                                   (If we are in the case where we return in the routing script with a response, it is important to set :enabled to false in order to avoid repeating the same query)
   serviceParams = service[:params]
   serviceParams[:return_to_script]             -> Indicates to Gateway if we must return to the routing script after receiving the CNAM response
                                                   (It is important to set back to false this field to avoid an infinite loop)
   serviceQuery = service[:query]
   serviceQuery[:phone]                         -> 10 digits of calling number from the incoming call to send to the CNAM server
   serviceQuery[:timeout]                       -> Timeout in millisecond to wait a CNAM response from CNAM server
                                                   (Default value from profile configuration)
   serviceResponse = service[:response]
   serviceResponse[:success]                    -> Indicates if we received a good CNAM response from the CNAM Server (Only present if :return_to_script is set to true)
   serviceResponse[:caller_name]                -> The caller name received in the CNAM response from the CNAM Server (Only present if :return_to_script is set to true)
```

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://prosbcdocs.telcobridges.com/configuration-details/configuration-by-web-portal-category/routing-scripts/development-guides-and-tutorials/telephony-services-cnam-requests-over-ss7.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
