# Accessing Routing Script Parameters

### How to Access Routing Script Parameters

#### Get

This function is used to get the call parameters. The possible parameters are described in the section "Call parameters"

```
 called_number = caf_call.get :called
```

#### List\_params

This function is used to retrieve the list of supported call parameters. For example to extract all the possible call parameters from the the call object and put it in hash.

```
 caf_call.list_params.each {|param| call[param] = caf_call.get param }
```

#### Accept

This function is used to accept a call. It actually creates one outgoing route that the gateway application will use to bridge the incoming call leg. If more than one outgoing route is "accepted", the gateway will try them one by one in the same order that they were accepted. If an outgoing call leg fails (according to 'route retry' parameters), the next route in line will be used.

This method takes 2 arguments, the call parameters (hash) and the route parameters (hash). Note that calling this method does NOT stop the flow of the script.

Apply route remapping rules

```
 caf_call.accept out_call, route
```

#### Refuse

This function is used to set the reason code for the incoming call leg refusal. However, this function does NOT stop the flow of the script.

```
 caf_call.refuse :reason => :temporary_failure
```

To immediately refuse the incoming call leg and stop processing the script, the script must raise an exception. Exiting the script by raising the exception overwrites any reason cause previously stored using refuse().

```
 raise RoutingException, :no_route
```

The supported refusal cause values for both refuse() and raise() are described in the section "[Reason values](/configuration-details/configuration-by-web-portal-category/routing-scripts/development-guides-and-tutorials.md)".

#### Script parameters protocol mapping

The following call parameters are available in the call object. For example:

```
 called_number = call[:called]
```

For information on how to use and remap call parameters, see [How to use regex in Remapped Called and Calling Number Mask](/configuration-details/configuration-by-web-portal-category/call-routing/how-to-use-regex-in-remapped-called-and-calling-number-mask.md)


---

# 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/accessing-routing-script-parameters.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.
