Ari-client help

i dont know if am doing something wrong to make call to external numbers

const Ari = require('ari-client');

const outboundCalll = async () => {
try {
const url = '';
const username = '*********';
const password = '*********';

    const client = await Ari.connect(url, username, password);
    console.log(`Connected to ${url}`);

    client.on('StasisStart', async (event, channel) => {
        console.log('call answered:', JSON.stringify(event));

        // Ignore other channels entering the application (e.g. snoop channels).
        if (event.args[0] !== 'dialed') return;

        channel.once('ChannelHangupRequest', () => {

        // Your code here

    const endpoint = 'PJSIP/sip:14695549709@provider';
    const app = 'channel-dump';

    client.start(app, async err => {
        if (err) return console.log('application start error:', err);

        console.log('application started!');

        try {
            const outChannel = client.Channel();

            outChannel.on('ChannelDestroyed', (event, channel) => {
                console.log('channel destroyed',;

            await outChannel.originate({
                context: 'default',
                appArgs: 'dialed',

            console.log('channel created:',;
        } catch (error) {
            console.log('error while creating channel:', error);
} catch (err) {


the moment i run it i get
Connected to
application started!
channel created: c99a6e8b-2c1c-4aeb-8615-3f3042121d4a
channel destroyed c99a6e8b-2c1c-4aeb-8615-3f3042121d4a
but don’t receive any call

exten => _X.,1,NoOp(Outgoing call to ${EXTEN})
 same => n,Dial(PJSIP/provider/${EXTEN})
 same => n,Hangup()

This code doesn’t really do anything… I assume you’re trying to originate a call. There is an example in the library for this.

Thank you soooooo much but i want to know where i will the external phone number?

i want to originate call to external phone numbers