TypeError: Cannot set property 'with' of undefined
lstep opened this issue · comments
Luc Stepniewski commented
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
Ellis commented
I noticed the same thing last night. I think the updates to node.js has caused this.
Ellis commented
er - I just realized that this was tested on 1.4.x. 1.6.x changed stuff in the manager.
Rahul Dabhi commented
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