<commit_before># Click to Call

## Description

Example component for Adhearsion showing a click to call application. Also shows how to use the RESTful API of Adhearsion.

## Example

Place this in your dialplan.rb of your Adhearsion project:

```ruby
  adhearsion {
    self.call.variables[:destination] = get_variable("destination")
    dial self.call.variables[:destination]
  }
```

## Installation

1. In your components directory of your Adhearsion project:

    `git clone git://github.com/adhearsion/restful_clicktocall.git`

2. Add the example code from above to your `adhearsion-project/dialplan.rb`.

3. Add the restful_rpc component to your Gemfile and `startup.rb` gem component configuration:
    `gem 'ahn-restful-rpc'`

    and

    `config.add_component 'ahn-restful-rpc'`

4. Copy the example component config from [here](https://github.com/adhearsion/ahn-restful-rpc/blob/develop/config/ahn-restful-rpc.yml) to `adhearsion-project/config/components/restful_rpc.yml`

4. From within the directory `adhearsion-project/components/restful_clicktocall/web` run:<commit_msg>Fix installation instructions gem component config file path<commit_after># Click to Call

## Description

Example component for Adhearsion showing a click to call application. Also shows how to use the RESTful API of Adhearsion.

## Example

Place this in your dialplan.rb of your Adhearsion project:

```ruby
  adhearsion {
    self.call.variables[:destination] = get_variable("destination")
    dial self.call.variables[:destination]
  }
```

## Installation

1. In your components directory of your Adhearsion project:

    `git clone git://github.com/adhearsion/restful_clicktocall.git`

2. Add the example code from above to your `adhearsion-project/dialplan.rb`.

3. Add the restful_rpc component to your Gemfile and `startup.rb` gem component configuration:
    `gem 'ahn-restful-rpc'`

    and

    `config.add_component 'ahn-restful-rpc'`

4. Copy the example component config from [here](https://github.com/adhearsion/ahn-restful-rpc/blob/develop/config/ahn-restful-rpc.yml) to `adhearsion-project/config/components/ahn-restful-rpc.yml`

4. From within the directory `adhearsion-project/components/restful_clicktocall/web` run:
{'fraction_non_alphanumeric': 0.09797752808988765, 'fraction_numerical': 0.0044943820224719105, 'mean_word_length': 4.482758620689655, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2291745', 'n_tokens_mistral': 710, 'n_tokens_neox': 685, 'n_words': 204}