Thank you for taking a look.
I have compiled kamailio from the master branch and enabled the debug log.
I have re run the test call and after the second call kamailio crashed.
Here is the log output:
```
Jun 30 16:50:21 test-sbc-01 /usr/local/sbin/kamailio[43866]: DEBUG: {1 102
INVITE 78b2d765258428276ea2d6261277debe@192.168.80.6:5060}jansson
[jansson_funcs.c:159]: janssonmod_set(): type is: H<81><EC><D8>
Jun 30 16:50:21 test-sbc-01 /usr/local/sbin/kamailio[43866]: DEBUG: {1 102
INVITE 78b2d765258428276ea2d6261277debe@192.168.80.6:5060}jansson
[jansson_funcs.c:160]: janssonmod_set(): path is: Timestamp
Jun 30 16:50:21 test-sbc-01 /usr/local/sbin/kamailio[43866]: DEBUG: {1 102
INVITE 78b2d765258428276ea2d6261277debe@192.168.80.6:5060}jansson
[jansson_funcs.c:161]: janssonmod_set(): value is: 2023-06-30T16:50:21Z
Jun 30 16:50:21 test-sbc-01 /usr/local/sbin/kamailio[43866]: DEBUG: {1 102
INVITE 78b2d765258428276ea2d6261277debe@192.168.80.6:5060}jansson
[jansson_funcs.c:162]: janssonmod_set(): result is:
{"Version":1,"MessageType":"IncomingCall","Cal
l":{"CallType":"TestCall","DeviceId":"XX-1234","Intercom":{"Id":"1","Name":"XXXX"},"Caller":"sip:47@192.168.80.6","CabinId":"sip:+123456...@sip.twilio.com","Destination":"sip:x...@avaya.example.com;tr
ansport=tcp","ForwardedTo":"sip:x...@avaya.example.com","UCID":"00000421851688136621","AvGlobalSessionId":"f0a662ce-65a0-47b8-b03b-9cc2d920ff58"},"Sender":{"Hostname":"test-sbc-01","Location":"Test"},"Timestamp":"2023-06-30T16:50
:17Z"}
Jun 30 16:50:21 test-sbc-01 /usr/local/sbin/kamailio[43866]: ERROR: {1 102
INVITE 78b2d765258428276ea2d6261277debe@192.168.80.6:5060}jansson
[jansson_funcs.c:233]: janssonmod_set(): unrecognized input type: H<81><EC><D8>
```
The part of the configurationfile looks like this:
```
/* Build the JSON formatted HTTP Requests */
jansson_set("int", "Version", 1, "$var(http_routing_query)");
jansson_set("string", "MessageType", "IncomingCall",
"$var(http_routing_query)");
jansson_set("object", "Call", '{"CallType":"$var(CallType)"}',
"$var(http_routing_query)");
jansson_set("string", "Call.DeviceId", $var(CallDeviceId),
"$var(http_routing_query)");
jansson_set("object", "Call.Intercom", '{"Id":"$var(CallIntercomID)"}',
"$var(http_routing_query)");
jansson_set("string", "Call.Intercom.Name", $var(CallIntercomName),
"$var(http_routing_query)");
jansson_set("string", "Call.Caller", $fu, "$var(http_routing_query)");
jansson_set("string", "Call.CabinId", $var(CallCabinId),
"$var(http_routing_query)");
jansson_set("string", "Call.Destination", $ru,
"$var(http_routing_query)");
/* Format the Forwarded To correctly. */
if($tU=="des") {
if(not_empty("$sel(cfg_get.avaya.number)")) {
$var(To-URI) = "sip:" + $sel(cfg_get.avaya.number) +
"@" + $dd;
jansson_set("string", "Call.ForwardedTo", $var(To-URI),
"$var(http_routing_query)");
}
else {
$var(To-URI) = "sip:" + $tU + "@" + $dd;
jansson_set("string", "Call.ForwardedTo", $var(To-URI),
"$var(http_routing_query)");
}
}
else {
$var(To-URI) = "sip:" + $tU + "@" + $dd;
jansson_set("string", "Call.ForwardedTo", $var(To-URI),
"$var(http_routing_query)");
}
jansson_set("string", "Call.UCID", $var(CallUCID_DEC),
"$var(http_routing_query)");
jansson_set("string", "Call.AvGlobalSessionId",
$var(CallAvGlobalSessionId), "$var(http_routing_query)");
jansson_set("object", "Sender", '{"Hostname": "$HN(n)"}',
"$var(http_routing_query)");
jansson_set("string", "Sender.Location", $var(SenderLocation),
"$var(http_routing_query)");
jansson_set("string", "Timestamp", $(TS{s.ftime,%Y-%m-%dT%H:%M:%SZ}),
"$var(http_routing_query)");
```
I have re run the test **without** the `jansson_set("string", "Timestamp",
$(TS{s.ftime,%Y-%m-%dT%H:%M:%SZ}), "$var(http_routing_query)");` and I get the
following error:
```
Jun 30 17:07:02 test-sbc-01 /usr/local/sbin/kamailio[44047]: DEBUG: {1 102
INVITE 7b8e9f84790e58344a29a5c15ffdf8a2@192.168.80.6:5060}jansson
[jansson_funcs.c:159]: janssonmod_set(): type is: object
Jun 30 17:07:02 test-sbc-01 /usr/local/sbin/kamailio[44047]: DEBUG: {1 102
INVITE 7b8e9f84790e58344a29a5c15ffdf8a2@192.168.80.6:5060}jansson
[jansson_funcs.c:160]: janssonmod_set(): path is: Sender.Location
Jun 30 17:07:02 test-sbc-01 /usr/local/sbin/kamailio[44047]: DEBUG: {1 102
INVITE 7b8e9f84790e58344a29a5c15ffdf8a2@192.168.80.6:5060}jansson
[jansson_funcs.c:161]: janssonmod_set(): value is: Test
Jun 30 17:07:02 test-sbc-01 /usr/local/sbin/kamailio[44047]: DEBUG: {1 102
INVITE 7b8e9f84790e58344a29a5c15ffdf8a2@192.168.80.6:5060}jansson
[jansson_funcs.c:162]: janssonmod_set(): result is:
{"Version":1,"MessageType":"IncomingCall","Cal
l":{"CallType":"TestCall","DeviceId":"DE-140461","Intercom":{"Id":"1","Name":"InCabin"},"Caller":"sip:47@192.168.80.6","CabinId":"sip:+xxxxxxxx...@sip.twilio.com","Destination":"sip:x...@avaya.example.com;tr
ansport=tcp","ForwardedTo":"sip:x...@avaya.example.com","UCID":"00000521301688137622","AvGlobalSessionId":"87dbc8ab-58db-4c67-8013-d0fbc04ed68f"},"Sender":{"Hostname":"test-sbc-01"}}
Jun 30 17:07:02 test-sbc-01 /usr/local/sbin/kamailio[44047]: ERROR: {1 102
INVITE 7b8e9f84790e58344a29a5c15ffdf8a2@192.168.80.6:5060}jansson
[jansson_funcs.c:238]: janssonmod_set(): parsing failed for "Test"
Jun 30 17:07:02 test-sbc-01 /usr/local/sbin/kamailio[44047]: ERROR: {1 102
INVITE 7b8e9f84790e58344a29a5c15ffdf8a2@192.168.80.6:5060}jansson
[jansson_funcs.c:239]: janssonmod_set(): value error at line 1: '[' or '{'
expected near 'Test'
```
I have re run the test call again **without** the following code block:
```
jansson_set("object", "Sender", '{"Hostname": "$HN(n)"}',
"$var(http_routing_query)");
jansson_set("string", "Sender.Location", $var(SenderLocation),
"$var(http_routing_query)");
jansson_set("string", "Timestamp", $(TS{s.ftime,%Y-%m-%dT%H:%M:%SZ}),
"$var(http_routing_query)");
```
Then I get the following error again:
`Jun 30 17:13:36 test-sbc-01 /usr/local/sbin/kamailio[44176]: ERROR: {1 102
INVITE 39b0551926eeedf96213a48140d5a2bc@192.168.80.6:5060}jansson
[jansson_funcs.c:233]: janssonmod_set(): unrecognized input type: H<81><EC><D8>`
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3499#issuecomment-1614805838
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3499/1614805...@github.com>
_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org