Code Monkey home page Code Monkey logo

Comments (7)

samuelg avatar samuelg commented on September 26, 2024

Can you share some code to show your setup? How about the version of Asterisk you are using? We could then try to see if it's the client or Asterisk that is causing the issue.

from node-ari-client.

mpbanna avatar mpbanna commented on September 26, 2024

My code is much complex, it is difficult to understand, because many library(created by me) are including.
currently i am using asterisk version 13.13.1, please give me any solution.

from node-ari-client.

mpbanna avatar mpbanna commented on September 26, 2024

Hello, please check my code and give me solution:
//***************************************************************************
'use strict';
var ari = require('ari-client');
var logger = require('mylogger');
var ARI_HOST = '...'; //this is dummy value
var ARI_PORT = ; //this is dummy value
var ARI_USER = '
'; //this is dummy value
var ARI_PASS = ''; //this is dummy value
var appName = '
********'; //this is dummy value

ari.connect('http://' + ARI_HOST + ':' + ARI_PORT, ARI_USER, ARI_PASS, clientLoaded);
var sourceBridgeId = "";
function clientLoaded(err, client) {
logger.log('connected...')
if (err) {
logger.error(err);
process.exit(1);
}
var bridge = client.Bridge();
bridge.create(function (err, bridge) {
if (err) {
logger.error(err);
return;
}
sourceBridgeId = bridge.id;
});

client.on('StasisStart', function (event, channel) {
    logger.log('statsis started !!!!!!!!!!!!!!!!!!!!!');
    if (sourceBridgeId != "") {
        client.bridges.addChannel(
                {bridgeId: sourceBridgeId, channel: channel.id},
        function (err) {
            if (err) {
                logger.error(err);
            }
            logger.log('channelId:', channel.id, ' , added into bridgeId:', sourceBridgeId);
        });
    }
});
client.on('StasisEnd', function (event, channel) {
    logger.info('statsis END  !!!!!!!!!!!!!!!!!!!!!')
});
client.on('ChannelDtmfReceived', function (event, channel) {
    var digitPressed = event.digit;
    logger.log('channelID:', channel.id, ' , channel pressed:', digitPressed)
});
client.start(appName);

}

from node-ari-client.

mpbanna avatar mpbanna commented on September 26, 2024

hello sir, is there any solution ??

from node-ari-client.

samuelg avatar samuelg commented on September 26, 2024

If you look at https://github.com/asterisk/node-ari-client#available-parameters-17 you'll see that you can pass a comma delimited list for the type of bridge to create.

If you want to have DTMF within a bridge for multiple channels you probably want the following when creating the bridge:

bridge.create({type: 'mixing,dtmf_events'}, callback);

from node-ari-client.

mpbanna avatar mpbanna commented on September 26, 2024

Thanks it is working,
can you explain what is meaning of these comma separated value (mixing, holding, dtmf_events, proxy_media).

from node-ari-client.

chadxz avatar chadxz commented on September 26, 2024

from node-ari-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.