Hi,
I am trying to install cgrates , but face this issue with database.
"
ERROR 1067 (42000) at line 7: Invalid default value for 'deleted_at'
"
is encountered in create_cdrs_tables.sql .
Can somebody let me know how to overcome this?
regards
Ganesh Kumar
Hi,
Testing with latest stable 4.4 Kamailio at the moment, and running into
the following issue.
I have a setup that sends a 302 to do a Moved Temporarily to another
extension. To update the Contact header accordingly, I use the
get_redirects function in the failure_route.
get_redirects('*', 'Redirects')
This results in the following packet
U 192.168.10.246:5060 -> 192.168.10.245:5060
SIP/2.0 302 Moved Temporarily.
Via: SIP/2.0/UDP
192.168.10.245:5060;branch=z9hG4bK40b58e09;rport=5060;received=192.168.10.245.
From: "+31........" <sip:+31........@192.168.10.245>;tag=as42745abe.
To:
<sip:+31........@192.168.10.246>;tag=a6a1c5f60faecf035a1ae5b6e96e979a-f67d.
Call-ID: 576349c40a7cb77a06230e181831672d@192.168.10.245:5060.
CSeq: 102 INVITE.
Contact: <sip:06........@sip.example.net>,
<sip:06........@sip.example.net>;q=0.01.
Server: sip.example.net.
Content-Length: 0.
.
This works, but I don't want ACC to account for anything, so I tried:
get_redirects('*')
But this results in the following packet
U 192.168.10.246:5060 -> 192.168.10.245:5060
SIP/2.0 302 Moved Temporarily.
Via: SIP/2.0/UDP
192.168.10.245:5060;branch=z9hG4bK185f4fdd;rport=5060;received=192.168.10.245.
From: "+31........" <sip:+31........@192.168.10.245>;tag=as13f23689.
To:
<sip:+31........@192.168.10.246>;tag=a6a1c5f60faecf035a1ae5b6e96e979a-b5fe.
Call-ID: 336a16912db412d418f7f7495e2574f5@192.168.10.245:5060.
CSeq: 102 INVITE.
Contact: <sip:accountname@sip.example.net>,
<sip:06........@sip.example.net>;q=0.01,
<sip:06........@sip.example.net>;q=0.01.
Server: sip.example.net.
Content-Length: 0.
.
Notice the extra accountname Contact, this results in a forward that
doesn't work for the mediaserver. To me the documentation about the
function states that there should be no difference between using it with
or without accounting as far as SIP messages go.
Is this a bug, or is this by design?
Cheers,
Dirk
Hi,
When using the gzcompress module, is it possible to compress/decompress only one specific header, or will it compress/decompress the whole body?
Thanks,
Joel.
Hi,
I'm using http_query (POST method) to interact with an API.
This API responds with a JSON.
Is there a way to get the full body and after parse that JSON?
Example response:
{
"error": {
"code": 404,
"message": "Destination not Found"
}
}
Currently, I'm only being able to get the first line, in the previous example it would be: "{"
According to the doc, that is the expected behavior:
If HTTP server returns a class 2xx, 3xx or 4xx reply, the first line of the reply's body (if any) is stored in “result” parameter, which must be a writable pseudo variable.
I don't have the ability to get the response in 1 single line like: { "error": { "code": 404, "message": "Destination not Found" } }
How can I get the full body instead of only the first line?
Thanks.
Best regards,
Joel.
Hi,
If you receive an INVITE with 2 diversion headers such as (in this order):
Diversion: <sip:9975@X.X.X.X:5060>;privacy=off;screen=no; reason=user-busy; counter=1
Diversion: <sip:1234567890@Z.Z.Z.Z:5060>;privacy=off;screen=no; reason=unknown; counter=1
How is a nice way of extracting the user part from the URI of the last one? (in this case: 1234567890)
Problems I have found:
$(di{uri.user}) ---> Give mes the user part of the URI of the first header, in this case: 9975
Is there a way to tell $di to get its value from the last header instead of the first one?
This example works:
$(hdr(Diversion)[-1]{param.name,0}{s.strip,1}{s.striptail,1}{uri.user})
But I think it is very hacky...
Any better approach anyone can suggest me?
Thanks in advance.
Best regards,
Joel.
Hey all,
When using Kamailio at the edge - what's the best practice around how to
advertise your Record-Route? I assume it's going to involve the use of a
double-RR with both the public and private IPs. However, I'm running in AWS
where the host doesn't have two interfaces with both a public and private
IP. So, I set the host's public IP as the advertised address while Kamailio
binds to the local IP.
But now how do I get Kamailio to know that it needs to double-RR in this
case?
Thanks,
Colin
Hi,
This is a similar question on a previous thread: "[SR-Users] Compiling kamailio with custom openssl"
Is it possible to specify a different OpenSSL engine for kamailio to use?
For example:
On nginx you have the config param: ssl_engine <engine>
On apache you have the config param: SSLCryptoDevice <engine>
Is there anything similar on Kamailio?
We are using debian 8 with openssl-1.0.1t and these are the available engines:
root@debian:/usr/lib/x86_64-linux-gnu/openssl-1.0.0/engines# ls -l
total 404
-rw-r--r-- 1 root root 19512 Jun 21 11:07 lib4758cca.so
-rw-r--r-- 1 root root 19784 Jun 21 11:07 libaep.so
-rw-r--r-- 1 root root 15576 Jun 21 11:07 libatalla.so
-rw-r--r-- 1 root root 6104 Jun 21 11:07 libcapi.so
-rw-r--r-- 1 root root 24232 Jun 21 11:07 libchil.so
-rw-r--r-- 1 root root 19864 Jun 21 11:07 libcswift.so
-rw-r--r-- 1 root root 6104 Jun 21 11:07 libgmp.so
-rw-r--r-- 1 root root 93304 Jun 21 11:07 libgost.so
-rw-r--r-- 1 root root 15432 Jun 21 11:07 libnuron.so
-rw-r--r-- 1 root root 6104 Jun 21 11:07 libpadlock.so
-rw-r--r-- 1 root root 24096 Jun 21 11:07 libsureware.so
-rw-r--r-- 1 root root 19784 Jun 21 11:07 libubsec.so
root@debian:/usr/lib/x86_64-linux-gnu/openssl-1.0.0/engines#
The reason is we have another server with a Cavium SSL card, which provides a dynamic engine:
-rw-r--r-- 1 root root 127968 Jun 23 15:18 libcavium.so
If it is not possible via config parameter, is there a way to specify the openssl engine to use before compiling?
Thanks in advance.
Best regards,
Joel.
Hi,
It there an easy way to count the number of existing headers of certain type?
For example:
- How many 'via' headers: $hdrcount(Via) ?
- How many 'diversion' headers: $hdrcount(Diversion) ?
The $hdrcount is an example, just wondering if there is an easy way to get the number.
Thanks.
Best regards,
Joel.
Hey all,
I'm using a combination of http_async_client and rtjson to query my API and
retrieve a JSON target route set for an incoming SIP request that Kamailio
will forward to. The HTTP portion of it works great. I'm able to hit my API
and get back a JSON document.
Additionally, the rtjson parsing appears to work, because the request is
hitting my freeswitch instance. However, FS is responding with a 503 (I'm
intentionally doing this for testing), and Kamailio isn't calling my
t_on_failure route. I've pasted the relevant portion of my config below -
would be great if anyone has any insights.
tl;dr: the "REROUTE" route section below isn't being reached even when FS
responds with a 503.
Best,
Colin
route[ROUTING_REPLY] {
if $http_ok && $http_rs == 200 {
xlog("L_INFO", "$ci|log|loaded target route set from document
$http_rb\n");
rtjson_init_routes("$http_rb");
rtjson_push_routes();
xlog("L_INFO", "$ci|log|attempting to relay request towards $du\n");
t_on_failure("REROUTE");
t_set_fr(0, 1000);
t_relay();
} else {
send_reply("480", "Temporarily Unavailable");
}
}
route[REROUTE] {
xlog("L_WARN", "$ci|log|relay to destination $du failed, checking next
route\n");
if (rtjson_next_route()) {
xlog("L_INFO", "$ci|log|additional route found, directing request to
$du\n");
t_on_failure("REROUTE");
t_set_fr(0, 1000);
t_relay();
} else {
xlog("L_WARN", "$ci|log|route list exhausted, failing request\n");
send_reply("480", "Temporarily Unavailable");
exit;
}
}