ASterisk agi get variable Node js

Hi, I hope someone can help me, I’m working with an asterisk on a project, I use AGI to work with node js. Through one of its functions, I managed to send a variable from extencions.conf to my script in nodejs if there are no messages I printed a 0 and if there is a message my print a 1 up there, I get a 1, but I do not know how to get the variable information information sent. Thank you.


exten => 4000,1,Answer()
exten => 4000,n,Wait(0.5)
exten => 4000,n,Set(ident=300) 
exten => 4000,n,AGI(agi://localhost:4000,"${ident}")
exten => 4000,n,Wait(0.5)

node js estiy usando DING-DONG ide deberia ser el valor pero me imprime 1

var AGIServer = require('ding-dong');
var request = require('request');
var numero=0;
    io = require(""),
    ioClient = io.connect("");

var app={
} ;     
var fs = require('fs');
var handler = function (context) {
        .then(function (v) {
            return f

        .then(function (varx) {
            console.log("this is the variable"+ide)
            return context.getData('codigonum',15000,9);

I would like to help but for me these seems to be more a node.js programming issue than Asterisk related