Re: [SR-Users] JSON Error

2021-11-25 Thread Ovidiu Sas
ess there was an alternate option. > > -dan > > -- > *From:* sr-users on behalf of > Ovidiu Sas > *Sent:* Wednesday, November 24, 2021 10:51:33 PM > *To:* Kamailio (SER) - Users Mailing List > > *Subject:* Re: [SR-Users] JSON Error > > A

Re: [SR-Users] JSON Error

2021-11-25 Thread Daniel W. Graham
Thats what I was hoping to avoid unless there was an alternate option. -dan From: sr-users on behalf of Ovidiu Sas Sent: Wednesday, November 24, 2021 10:51:33 PM To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] JSON Error Add a log in the

Re: [SR-Users] JSON Error

2021-11-24 Thread Ovidiu Sas
; call to jansson_get is causing the error. > > > > -dan > > > > *From: *sr-users on behalf of Fred > Posner > *Date: *Wednesday, November 24, 2021 at 10:11 PM > *To: *sr-users@lists.kamailio.org > *Subject: *Re: [SR-Users] JSON Error > > Are you ve

Re: [SR-Users] JSON Error

2021-11-24 Thread Daniel W. Graham
@lists.kamailio.org Subject: Re: [SR-Users] JSON Error Are you verifying the document is valid JSON? Fred Posner | palner.com Matrix: @fred:matrix.lod.com o: +1 (212) 937-7844 On 11/24/21 7:47 PM, Daniel W. Graham wrote: > My log is filled with this and have been unsuccessful locating > addi

Re: [SR-Users] JSON Error

2021-11-24 Thread Fred Posner
Are you verifying the document is valid JSON? Fred Posner | palner.com Matrix: @fred:matrix.lod.com o: +1 (212) 937-7844 On 11/24/21 7:47 PM, Daniel W. Graham wrote: > My log is filled with this and have been unsuccessful locating > additional information by increasing debug level. > >   > > An

[SR-Users] JSON Error

2021-11-24 Thread Daniel W. Graham
My log is filled with this and have been unsuccessful locating additional information by increasing debug level. Any thoughts on how to quickly isolate? /usr/local/sbin/kamailio[7678]: ERROR: jansson [jansson_funcs.c:48]: janssonmod_get_helper(): json error at line 1, col 0: '[' or '{' expected

Re: [SR-Users] JSON error - control character 0xd

2019-04-23 Thread Henning Westerholt
Hello, you can create a feature request if you like about this functionality. Cheers, Henning Am 23.04.19 um 01:01 schrieb David Dean: Digging into this a bit deeper, I now understand the exact problem. The issue is the difference in newlines between sdp_get output and the JSON format. sdp_g

Re: [SR-Users] JSON error - control character 0xd

2019-04-22 Thread David Dean
Digging into this a bit deeper, I now understand the exact problem. The issue is the difference in newlines between sdp_get output and the JSON format. sdp_get returns the SDP with unix newline characters i.e. \r\n. However JSON won't accept unix newlines and requires a single line output with

Re: [SR-Users] JSON error - control character 0xd

2019-04-21 Thread Alex Balashov
Your best bet is probably to run this through an embedded Python script or similar which exposes a chr() type function. — Sent from mobile, with due apologies for brevity and errors. > On Apr 21, 2019, at 4:14 PM, David Dean wrote: > > I tried using s.replace to replace the control characters

Re: [SR-Users] JSON error - control character 0xd

2019-04-21 Thread David Dean
I tried using s.replace to replace the control characters, but I don't think it recognises them: $avp(sdp) = $(avp(sdp){s.replace,#015#012,\r\n}); It's the "#015#012" which is coming from sdp_get("$avp(sdp)"); that is the problem. On Sunday, 21 April 2019, 20:40:34 BST, David Dean wrote:

Re: [SR-Users] JSON error - control character 0xd

2019-04-21 Thread David Dean
Agreed. Unfortunately Janus doesn't accept base64 at this time. I'll ask Lorenzo whether he can add base64 support, but in the interim I need to find a way in Kamailio of parsing $avp(sdp) as shell escaped plain text with the control characters replaced. Thanks. On Sunday, 21 April 2019, 19

Re: [SR-Users] JSON error - control character 0xd

2019-04-21 Thread Alex Balashov
A common solution to these problems is to base64-encode SIP data, so as to avoid any part of SIP grammar violating JSON encoding specs or conflicting with a JSON delimiter. However, I'm not sure if whatever Janus is will accept that. On Sun, Apr 21, 2019 at 06:15:22PM +, David Dean wrote: >

[SR-Users] JSON error - control character 0xd

2019-04-21 Thread David Dean
I'm trying to send an SDP from a SIP client to Janus using JSON over HTTP. The problem is that Janus is erroring on the SDP content with the following error: JANUS HTTP: Get SDP for echo plugin: {#012   "janus": "error",#012   "error": {#012      "code": 454,#012      "reason": "JSON error: on l