Skip to content

TypeError: Cannot set property 'with' of undefined #2

@lstep

Description

@lstep

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions