Hi Guys,
I am looking to send calls to a default route should we have issues when connecting to our API which provides routing instructions.
On scenario is handling an invalid JSON response , which would result in a parse error.
Is it possible to capture when there is a failed to parse error when dealing with JSON responses to an http query in kamailio?
In particular when using the jansson_get_field, I am looking to default to a route should their be a parse error, so I am forcing an erro, I get this in the logs, but can I grab to act on it?
Nov 17 14:37:25 ip-172-31-34-165 /usr/local/kamailio-4.4/sbin/kamailio[9735]: ERROR: jansson [jansson_funcs.c:59]: janssonmod_get(): failed to parse: 200 OK
Nov 17 14:37:25 ip-172-31-34-165 /usr/local/kamailio-4.4/sbin/kamailio[9735]: ERROR: jansson [jansson_funcs.c:61]: janssonmod_get(): json error at line 1: '[' or '{' expected near '200'
Nov 17 14:37:25 ip-172-31-34-165 /usr/local/kamailio-4.4/sbin/kamailio[9735]: ERROR: jansson [jansson_funcs.c:59]: janssonmod_get(): failed to parse: 200 OK
Nov 17 14:37:25 ip-172-31-34-165 /usr/local/kamailio-4.4/sbin/kamailio[9735]: ERROR: jansson [jansson_funcs.c:61]: janssonmod_get(): json error at line 1: '[' or '{' expected near '200'
On receipt of this I would then like to hit a default route.
Many thanks
Jon
Hi All,
I'd like to ask the guru's out there their opinion on how to solve the
nat problem for presence subscriptions.
We have an issue with subscriptions that get timed out and the notify
clears the subscription out of the active_watchers table due to the
notify timing out, I think this is expected and the right way to do it.
However, how do others out there ensure that their subscription nat
states are kept alive? For registrations we have nathelper, but, what is
the sanest way of doing the same for subscriptions?
I was originally thinking of sending notifications through our
registrar/lookup server, but, I'm not sure if that is the correct way
to do it.
Any thoughts, tips, tricks would be much appreciated.
Cheers
Hello,
I am new to Kamailio and to the Kamailio Mailing list and hope I am using it appropriately.
I am using Kamailio version 5.0.3 (x86_64/linux), and it is installed and working on a Centos 7 Sever. I use Kamailio as a SIP Proxy Server for Asterisk and things seem to work fine, however, I do have an issue and a question for which I am trying to understand and am hoping someone can help me with.
For the sake of the argument, my server name is myServer, and it's IP Address is 172.1.1.13; Asterisk is on a different server.
Issue: Every 10 seconds I get an Error message in the Kamailio log which says =>
Nov 13 18:10:55 myServer /usr/local/sbin/kamailio[29188]: ERROR: <core> [core/tcp_main.c:2660]: tcpconn_1st_send(): connect 172.1.1.13:59794 failed (RST) Connection refused.
I do not know what triggers this error, and as mentioned, things do seem to work; I can make calls and use sip tools which pass requests through the Kamailio to Asterisk. Does anyone know what could be causing this Error? I do not understand what is trying to connect to what at such a high port.
Question: The way I understand it, rtpproxy is needed to pass video/audio through Kamailio to Asterisk. However, even without rtpproxy running, I get video through to Asterisk and the video plays with no issues on a sip device (e.g. MicroSIP). I am confused what I need rtpproxy for.
Note: Even with no rtpproxy, I get the same error mentioned above in the Issue section.
Thank you,
Hello List,
i use kamailio-5.0.4 and i experiment with the drouting module with
mysql-db.
I try to route with "alphanumeric" stuff - like 'tetris' in
sip://tetris@mytest.example
https://www.kamailio.org/docs/db-tables/kamailio-db-devel.html#idp31352844
The DB-Field is an 64 string like route-id. In dr_rules.route-id i can use
"named-routes"
if i leave the prefix empty or i fill in only numbers.
With strings i got this error:
ERROR: drouting [dr_load.c:555]: dr_load_routing_info(): failed to add rule
id 4 -> skipping
SQL Result for rule-id 4:
# dr_rules
# ruleid, groupid, prefix, timerec, priority, routeid, gwlist, description
'4', '9000', 'tetris', '', '0', 'tetris', '4', 'testroute'
Is drouting only for "number-routing"?
--
Kind Regards
*Karsten Horsmann*
Hello List,
i use kamailio-5.0.4 and i am now at the point that one kamailio is not
enough :).
So i decide to set another kamailio internal as sip-router based on
drouting.
My config is straight forward the example config with additional drouting
stuff.
Whats the best practice to route based on $rd with kamailio?
I dont want to end with an bunch of if then else. Should be come from
database.
Pseudo Code:
if ($rd == old.sbc.domain) {
route[oldstuff];
}
else {
route[newstuff];
}
Is there an module that i can use?
--
Kind Regards
*Karsten Horsmann*
Greetings,
Is there a way to use the NATHELPER functions with a variable insted of a
string with the value ?
For example, I can do "fix_nated_sdp("11");" but Kamailio throws an error
if i use
"fix_nated_sdp("$(var(nat_fix)");" or any other variations.
How should i proceed to be able to do this ?
Thanks
Hello guys,
I have the following senario:
ua1 calls ua2. when the INVITE reaches the kamailio, before foward to ua2, kamailio has to do a http request using “http_async_query”. However, the http request can take a really long time. I want the kamailio start playing music when the http request is sent and stop the music when the http response is received.
My config file is like this:
request_route {
...
t_newtran();
http_async_query("url here", "HTTP_REPLY");
}
route[HTTP_REPLY] {
...
# forward the invite to ua2
}
how do i complete the config?
Thanks
hello,
After activated redis backend for topos module, I have some error logs.
Can you help me to understand these logs?
# kamailio -V
version: kamailio 5.1.0-rc0 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE,
USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC,
TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT,
USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST,
HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled on 14:18:08 Nov 14 2017 with gcc 4.9.2
Nov 14 15:15:51 sd-110402 /usr/local/sbin/kamailio[4805]: INFO: topos_redis
[topos_redis_storage.c:163]: tps_redis_insert_dialog(): no uuid for this
message
Nov 14 15:15:51 sd-110402 /usr/local/sbin/kamailio[4805]: ERROR: topos
[tps_storage.c:394]: tps_storage_record(): failed to store
Nov 14 15:15:51 sd-110402 /usr/local/sbin/kamailio[4807]: INFO: topos_redis
[topos_redis_storage.c:163]: tps_redis_insert_dialog(): no uuid for this
message
Nov 14 15:15:51 sd-110402 /usr/local/sbin/kamailio[4807]: ERROR: topos
[tps_storage.c:394]: tps_storage_record(): failed to store
Nov 14 15:15:51 sd-110402 /usr/local/sbin/kamailio[4808]: INFO: topos_redis
[topos_redis_storage.c:163]: tps_redis_insert_dialog(): no uuid for this
message
Nov 14 15:15:51 sd-110402 /usr/local/sbin/kamailio[4808]: ERROR: topos
[tps_storage.c:394]: tps_storage_record(): failed to store
Nov 14 15:15:51 sd-110402 /usr/local/sbin/kamailio[4808]: INFO: topos_redis
[topos_redis_storage.c:163]: tps_redis_insert_dialog(): no uuid for this
message
Nov 14 15:15:51 sd-110402 /usr/local/sbin/kamailio[4808]: ERROR: topos
[tps_storage.c:394]: tps_storage_record(): failed to store
Nov 14 15:15:52 sd-110402 /usr/local/sbin/kamailio[4805]: INFO: topos_redis
[topos_redis_storage.c:163]: tps_redis_insert_dialog(): no uuid for this
message
Nov 14 15:15:52 sd-110402 /usr/local/sbin/kamailio[4805]: ERROR: topos
[tps_storage.c:394]: tps_storage_record(): failed to store
Nov 14 15:15:52 sd-110402 /usr/local/sbin/kamailio[4806]: INFO: topos_redis
[topos_redis_storage.c:163]: tps_redis_insert_dialog(): no uuid for this
message
Nov 14 15:15:52 sd-110402 /usr/local/sbin/kamailio[4806]: ERROR: topos
[tps_storage.c:394]: tps_storage_record(): failed to store
Nov 14 15:15:52 sd-110402 /usr/local/sbin/kamailio[4807]: INFO: topos_redis
[topos_redis_storage.c:163]: tps_redis_insert_dialog(): no uuid for this
message
Nov 14 15:15:52 sd-110402 /usr/local/sbin/kamailio[4807]: ERROR: topos
[tps_storage.c:394]: tps_storage_record(): failed to store
Nov 14 15:15:52 sd-110402 /usr/local/sbin/kamailio[4807]: INFO: topos_redis
[topos_redis_storage.c:163]: tps_redis_insert_dialog(): no uuid for this
message
Nov 14 15:15:52 sd-110402 /usr/local/sbin/kamailio[4807]: ERROR: topos
[tps_storage.c:394]: tps_storage_record(): failed to store
Nov 14 15:15:53 sd-110402 /usr/local/sbin/kamailio[4806]: INFO: topos_redis
[topos_redis_storage.c:163]: tps_redis_insert_dialog(): no uuid for this
message
Nov 14 15:15:53 sd-110402 /usr/local/sbin/kamailio[4806]: ERROR: topos
[tps_storage.c:394]: tps_storage_record(): failed to store
Nov 14 15:15:53 sd-110402 /usr/local/sbin/kamailio[4808]: INFO: topos_redis
[topos_redis_storage.c:163]: tps_redis_insert_dialog(): no uuid for this
message
Nov 14 15:15:53 sd-110402 /usr/local/sbin/kamailio[4808]: ERROR: topos
[tps_storage.c:394]: tps_storage_record(): failed to store
Abdoul OSSENI