marcelog / Nami

Asterisk manager interface (ami) client for nodejs
http://marcelog.github.com/Nami
Apache License 2.0
99 stars 59 forks source link

Wrong handling of VarSet event #22

Open vovochka404 opened 10 years ago

vovochka404 commented 10 years ago
{ lines: 
   [ 'Event: VarSet',
     'Privilege: dialplan,all',
     'Channel: SIP/sip123456-000000be',
     'Variable: MACRO_DEPTH',
     'Value: 1',
     'Uniqueid: 1399421255.190' ],
  EOL: '\r\n',
  variables: { MACRO_DEPTH: undefined },
  event: 'VarSet',
  privilege: 'dialplan,all',
  channel: 'SIP/sip123456-000000be',
  value: '1',
  uniqueid: '1399421255.190' }

Hack in Message.prototype.unmarshall() that supposed to handle variables in event currently breaks resulted event obj for VarSet event.

There is no variable key in obj. There is no values in variables storage.