Nothing has been indexed for 1.2.1 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.

Installation

# Add this to your shard.yml
dependencies:
  agent:
    github: voipstack/voipstack_agent
    version: ~> 1.2.1

Then run:

shards install

shard.yml

No shard.yml has been indexed for 1.2.1. You can read it on the repository.

Dependencies

Unknown: the shard.yml for this version has not been read yet.

README

This README is the one indexed from the repository at its latest ref, not from the tag for this version.

VOIPStack Agent

Client for voipstack platform

Installation

Github releases

  1. Go to releases page
  2. Download the latest release for your platform
  3. Extract the downloaded archive
  4. Move the binary to a location in your PATH:
sudo mv voipstack_agent /usr/local/bin/

Usage

Production

For production deployment use systemd service unit. The file should be located at /etc/systemd/system/voipstack_agent.service.

voipstack_agent.service

sudo useradd voipstack_agent
sudo chown -R voipstack_agent:voipstack_agent /etc/voipstack
sudo systemctl enable voipstack_agent
sudo systemctl start voipstack_agent

Media Server

To enable real-time stream support, you must use the voipstack_agent_media application.

  1. Install voipstack_agent
  2. Download voipstack_agent_media
  3. Update the voipstack_agent.service file and set the path to voipstack_agent_media

Development

Step by step to run the agent:

  1. Generate the priv/pub keys in the same project:
./voipstack_agent --generate-private-key voipstack_agent.key
  1. Execute the agent:
VOIPSTACK_AGENT_PRIVATE_KEY_PEM_PATH=voipstack_agent.key ./voipstack_agent -s fs://ClueCon:ClueCon@ip

Asterisk Media Support

For Asterisk media support, you can use a custom YAML configuration file. The agent includes default handlers for Asterisk that can be customized via YAML.

Default Asterisk Handlers

The agent provides built-in handlers for Asterisk:

  1. Hangup Handler - Handles hangup actions
  2. Listen Handler - Handles audio stream start actions (with break: true to stop further processing)

Custom YAML Configuration

Create a custom YAML file (e.g., asterisk.yml) to customize Asterisk handlers:

executor:
  listen:
    type: softswitch-interface
    only_for: "asterisk"
    break: true
    when:
      action: start
      app_id: audio
    command: Originate
    interface:
      Channel: PJSIP/<OUTBOUND ENDPOINT>/sip:voipstack@${VOIPSTACK_GLOBAL_AGENT_MEDIA_SIP_HOST}:${VOIPSTACK_GLOBAL_AGENT_MEDIA_SIP_PORT}
      Application: ChanSpy
      Data: ${VOIPSTACK_ACTION_VENDOR_CHANNEL},q
      Variable: "PJSIP_HEADER(add,X-VOIPSTACK-STREAM-IN-URL)=${VOIPSTACK_ACTION_INPUT_INPUT_STREAM_IN_URL}"
      Async: true

Running with Custom YAML

./voipstack_agent -s asterisk://ClueCon:ClueCon@ip -c /path/to/asterisk.yml

Environment Variables for Asterisk

The following environment variables are available for customization:

  • VOIPSTACK_AGENT_MEDIA_SIP_HOST - Media SIP host (default: 127.0.0.1)
  • VOIPSTACK_AGENT_MEDIA_SIP_PORT - Media SIP port (default: 6070)

Example Asterisk Configuration

See examples/asterisk.yml for a complete example configuration.

Considerations

  • The application stops on presence of any error.

Contributing

  1. Fork it (https://github.com/voipstack/voipstack_agent/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors