GithubHelp home page GithubHelp logo

asterisk.io's People

Contributors

zmarius81 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

asterisk.io's Issues

agiHandler.command problem

Hi I am trying to execute the following code which should transfer the call to the target extension.

agiHandler.command('Set Extension 1000', function (code, result, data) {
});

The java equivelant of this code works fine so I'm not sure if I have a syntax error. Here is what I have in the onsole:

Console verbose was 12 and is now 25.
== Using SIP RTP CoS mark 5
-- Executing [1300@default:1] AGI("SIP/2000-0000004b", "agi://10.0.1.106/hello.agi") in new stack
> 0x7f7ad001c280 -- Probation passed - setting RTP source address to 10.0.1.103:4022
-- <SIP/2000-0000004b> Playing 'digits/8.gsm' (language 'en')
> 0x7f7ad001c280 -- Probation passed - setting RTP source address to 10.0.1.103:4022
-- <SIP/2000-0000004b> Playing 'digits/20.gsm' (language 'en')
-- <SIP/2000-0000004b> Playing 'digits/7.gsm' (language 'en')
-- <SIP/2000-0000004b> Playing 'digits/a-m.gsm' (language 'en')
-- <SIP/2000-0000004b>AGI Script agi://10.0.1.106/hello.agi completed, returning 4
== Spawn extension (default, 1000, 1) exited non-zero on 'SIP/2000-0000004b'

Am I just missing something?

How to pass server with an action ?

Hello All,

My astmanproxy server is linked to two asterisk servers.

Now i want to execute an action Queuepause from node js code , I want to execute this action on the secod server linked to astmanproxy server. But how can i pass the ip address of asterisk server through node js code ?

Below is code i am using:

ami.action(
            'QueuePause',
            {
                Interface: 'SIP/301@Kam-SBC',
                Paused: true,
                Queue: '1003_italk-support',
                Reason: 'home'
            },
            function (data) {
                if (data.Response == 'Error') {
                    logger.log('info', 'server.js: Park Error: ' + JSON.stringify(data))

                    return;
                }

                logger.log('info', 'server.js: Park Response: ' + JSON.stringify(data));
            }
        );

E_AMI_SOCKED_CLOSE: Lost connection to server.

I code the asterisk.io to listening events and/or send actions. But always after a time (random time) the node server crash with the follow error. Why? Thanks

This code throw error
ami.on('error', function(err){
throw err;
});

throw err;
^
E_AMI_SOCKED_CLOSE: Lost connection to server.
at Socket. (/home/.../asterisk.io/lib/ami.js:272:30)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at TCP._onclose (net.js:486:12)

Members not showing up with Action:Command, Command: queue show

I am trying to send the info of a queue as a response to a GET request to my server. When the request hits, I issue an action to asterisk using:
ami.action('Command',{ Command: 'queue show' },function(data){ console.log(data); res.write(JSON.stringify(data)); res.end(' \n \n 200 OK'); }).
I get a response from asterisk, with info like number of calls, queue strategy etc, however the Members list is empty. When I do the same command directly in asterisk, the Members list successfully shows all the queue's members.

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.