Open romkazor opened 5 years ago
I wrote ugly fix, but it works, in event.py after 39 string:
before:
try:
(key, value) = lines[i].split(': ', 1)
if key in Event.parsers:
after:
try:
chanvaris = 'ChanVariable'
if lines[i].find('Channel: ') != -1:
channel = lines[i].split(': ')[1]
if lines[i].find('): ') != -1:
chanvar = lines[i].split('): ')[0].split('(')[1]
if chanvar != channel:
chanvaris = 'DestChanVariable'
if chanvaris != 'DestChanVariable':
(key, value) = re.sub(r'\([^)]*\)\:', ':', lines[i]).split(': ', 1)
else:
(key, value) = re.sub(r'ChanVariable\([^)]*\)\:', 'DestChanVariable:', lines[i]).split(': ', 1)
if key in Event.parsers:
I will think about it and try to do something. Probabily I will delay, I'm busy with the work, but as soon as possible I will work at this. Thanks for the bug report and for the suggestion.
Hello, in some early version of asterisk ChanVariable looks a little differently, and event parser show only last ChanVariable (only CDR(dst)=102). In later version of asterisk event parser show dict of ChanVariable. How can I fix this?
Asterisk 11 (bug)
Asterisk 12+ (ok)