'Channel' improperly parsed in Events
-
Jay Phillips
- State changed from new to open
-
Jay Phillips
I added some lexer specs to try to reproduce this issue but they pass. For some reason I can't reproduce this. Are you sure this is happening in Adhearsion-land and not CouchDB land? I don't see how the lexer could parse that improperly...
-
jsgoecke
This gist:
Is simply this in events.rb:
So, before it even gets to CouchDB I see it mangled (and in fact when not using CouchDB at all and just showing the event). Just did a git pull on the latest ahn master and still able to produce it:
-
Jay Phillips
For the record, this doesn't seem to be an issue with SIP:
INFO ahn: #<Adhearsion::VoIP::Asterisk::Manager::ManagerInterfaceEvent:0x114278c @headers={"CallerIDNum"=>"jicksta", "Channel"=>"SIP/0.0.0.0-007f4f30", "Uniqueid"=>"asterisk-5881-1230185859.0", "State"=>"Down", "Privilege"=>"call,all", "CallerIDName"=>"Jay Phillips"}, @name="Newchannel">Testing with IAX next...
-
Jay Phillips
It seems IAX is parsed properly when using an IAX softphone. I need to test with an IAX trunk (to get the IAX2/trunk/exten format) still...
#<Adhearsion::VoIP::Asterisk::Manager::ManagerInterfaceEvent:0x1a56ad0 @headers={"AppData: agi"=>"//10.0.1.98", "Channel"=>"IAX2/jay_desktop-9", "Context"=>"adhearsion", "Uniqueid"=>"asterisk-5881-1230186622.1", "Application"=>"AGI", "Privilege"=>"call,all", "Priority"=>"1", "Extension"=>"h"}, @name="Newexten"> #<Adhearsion::VoIP::Asterisk::Manager::ManagerInterfaceEvent:0x1a46cac @headers={"Cause-txt"=>"Unknown", "Cause"=>"0", "Channel"=>"IAX2/jay_desktop-9", "Uniqueid"=>"asterisk-5881-1230186622.1", "Privilege"=>"call,all"}, @name="Hangup"> -
jsgoecke
I was just dialing back to localhost with an IAX2 trunk, did not need a 'real' one for testing.
-
jsgoecke
This error also occurs with the appdata event if it contains an AGI attribute, as follows:
WARN event_logger: ["AppData: agi", "//localhost"]
As you may see, it is not parsing correctly. As it should look like this:
["AppData", "agi://localhost"]
-
jsgoecke
I wrote a method that may fix this by putting the data back together properly:
def fix_event_parsing(header)
first_field = header[0].split(' ') header[0] = first_field[0].gsub!(':','') header[1] = first_field[1] + ":" + header[1] return headerend
-
Jay Phillips
Can't really use Ruby string manipulation to fix this bug. This is a bug in the Ragel lexer generator.
-
jsgoecke
Hello, I have a variable in asterisk that store a url as well as other parameters seperated by coma eg
Set(eventstring=${Number}','${urlstring})
where urlstring=http://xx.xx.xx.xx/eventmanger
but in my ami event in adhearsion it replaces ':' with "=>" ideas why?
INFO ami: #<Adhearsion::VoIP::Asterisk::Manager::ManagerInterfaceEvent: 0xb787b2a4 @name="Newexten", @headers={"AppData: 4504,86,2,2,SIP/ 192.168.x.x-081914c0,http"=>"//192.168.x.x/EventManager", "Channel"=>"SIP/192.168.x.x-081914c0", "Context"=>"cb_emergency_temp", "Uniqueid"=>"1236958200.106", "Application"=>"NoOp", "Privilege"=>"call,all", "Priority"=>"7", "Extension"=>"s"}>
thanks David L
-
Jay Phillips
- Milestone cleared.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
