> For the complete documentation index, see [llms.txt](https://tmediadocs.telcobridges.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tmediadocs.telcobridges.com/telecom-references/developer-reference/routing-scripts/telephony-services-cnam-requests-over-ss7.md).

# 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)
```

![BackToMain](https://docs.telcobridges.com/w/images/1/1e/BackToMain.png)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://tmediadocs.telcobridges.com/telecom-references/developer-reference/routing-scripts/telephony-services-cnam-requests-over-ss7.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
