Contact

Blogs

Take a look at the things that interest us.

Asterisk 18 realtime outbound registration

okuda Okuda 3 years

In this blog post, we are going to show you what default settings we use for our outbound registrations in our real-time Asterisk database.

Requirements

  • Asterisk 18
  • ODBC connection
  • Setup for Asterisk realtime (sorcery, extconf, pjsip config files)

To setup an outbound registration for your Asterisk you need to add rows into five tables for each outbound number.

  • ps_registrations
  • ps_endpoints
  • ps_auth
  • ps_aors
  • ps_endpoint_id_ips

The main parameters that we will be using is:

  • Number — The phone number
  • Password — The password
  • Host — The host name
  • Hostip — The host ip for registrations

Let's get started with the tables.

ps_registrations

$data = [
    'id' => '<number>',
    'client_uri' => 'sip:<number>@<host>',
    'contact_user' => '<number>',
    'outbound_auth' => '<number>',
    'retry_interval' => '60',
    'server_uri' => 'sip:<host>',
    'transport' => 'transport-udp',
    'endpoint' => 'outbound',
];

ps_endpoints

$data = [
    'id' => '<number>',
    'transport' => 'transport-udp',
    'aors' => '<number>',
    'auth' => '<number>',
    'context' => 'outbound',
    'disallow' => 'all',
    'allow' => '!all,g722,ulaw',
    'outbound_auth' => '<number>',
];

ps_auth

$data = [
    'id' => '<number>',
    'password' => '<password>',
    'username' => '<number>',
];

ps_aors

$data = [
    'id' => '<number>',
    'contact' => 'sip:<number>@<host>',
];

ps_endpoint_id_ips

$data = [
    'id' => '<number>',
    'endpoint' => '<number>',
    'match' => '<hostip>',
];

After adding the rows into your Mysql database the registration status can be validated with the following command in your Asterisk CLI:

pjsip show registrations
Asterisk 18 realtime outbound registration 2021-08-24 08:17:58

There are no comments.

4839

Have questions about our services?

Contact our Sales team to get answers.

Contact Us
gomibako@aska-ltd.jp