node-asterisk icon indicating copy to clipboard operation
node-asterisk copied to clipboard

TypeError: Cannot set property 'with' of undefined

Open lstep opened this issue 15 years ago • 3 comments

I can connect successfully on my asterisk with node-asterisk, but when I get the Dial event, the app crashes with the following message (using asterisk 1.6.x) :

    $ node test.js 
    CLIENT: Connected!
     CLIENT: Logged in!

     /opt/node-asterisk/asterisk.js:125
            self.participants[headers.srcuniqueid]['with'] = headers.destuniqueid;
                                                        ^
     TypeError: Cannot set property 'with' of undefined
        at [object Object].OnEvent (/opt/node-asterisk/asterisk.js:125:52)
        at Stream.<anonymous> (/opt/node-asterisk/asterisk.js:98:11)
        at Stream.emit (events:27:15)
        at IOWatcher.callback (net:489:16)
        at node.js:768:9

lstep avatar Oct 14 '10 00:10 lstep

I noticed the same thing last night. I think the updates to node.js has caused this.

ellisgl avatar Dec 05 '10 06:12 ellisgl

er - I just realized that this was tested on 1.4.x. 1.6.x changed stuff in the manager.

ellisgl avatar Dec 05 '10 06:12 ellisgl

I am also facing these problem i don't know how to resolve this problem ? if any event recieve then nodejs server suddenly terminate why ?

Thanks

rahuldabhi avatar May 29 '14 07:05 rahuldabhi