Skip to content
This repository has been archived by the owner on Sep 19, 2019. It is now read-only.

ari_body: why are all double quotes escaped? #34

Open
hekmekk opened this issue Nov 30, 2017 · 1 comment
Open

ari_body: why are all double quotes escaped? #34

hekmekk opened this issue Nov 30, 2017 · 1 comment
Assignees

Comments

@hekmekk
Copy link

hekmekk commented Nov 30, 2017

When comparing events from asterisk and go-ari-proxy, one can see that the proxy formats the asterisk event as a string, which makes deserializing pretty hard:

asterisk event:

{"type":"StasisStart","timestamp":"2017-11-30T14:37:15.796+0100","application":"foo","asterisk_id":"aa:00:00:36:fa:ca","channel":{"id":"1512049035.123","dialplan":{"context":"default","exten":"1000","priority":2},"name":"PJSIP/1001-00000061","connected":{"name":"","number":""},"state":"Ring","creationtime":"2017-11-30T14:37:15.794+0100","caller":{"name":"","number":"1001"},"accountcode":"","language":"en"},"args":[]}

go-ari-proxy:

{"server_id":"good_server","timestamp":"2017-11-30T14:37:15.796635341+01:00","type":"StasisStart","ari_body":"{\"type\":\"StasisStart\",\"timestamp\":\"2017-11-30T14:37:15.796+0100\",\"application\":\"foo\",\"asterisk_id\":\"aa:00:00:36:fa:ca\",\"channel\":{\"id\":\"1512049035.123\",\"dialplan\":{\"context\":\"default\",\"exten\":\"1000\",\"priority\":2},\"name\":\"PJSIP/1001-00000061\",\"connected\":{\"name\":\"\",\"number\":\"\"},\"state\":\"Ring\",\"creationtime\":\"2017-11-30T14:37:15.794+0100\",\"caller\":{\"name\":\"\",\"number\":\"1001\"},\"accountcode\":\"\",\"language\":\"en\"},\"args\":[]}"}

Is there a reason why this is so or is this merely a bug?

@leifmadsen
Copy link
Member

@Marquis42 can you take a look at this and comment / fix?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants