Hey all,
I've got two layers of Kamailio proxies running. One set of edge proxies
that are parking outbound connections and doing load balancing to a set of
registrar/proxies. This is working well with one exception:
I can't seem to get t_load_contacts/t_next_contacts working correctly for
handling multiple outbound connections. It *appears* to work (though I
haven't extensively tested) whenever there's more than one registration
binding for an AOR. However, when there's only one, I get:
8(27) DEBUG: tm [t_serial.c:191]: t_load_contacts(): nr_branches is 0
8(27) DEBUG: tm [t_serial.c:194]: t_load_contacts(): nothing to do - only
one contact!
8(27) DEBUG: tm [t_serial.c:455]: t_next_contacts(): no contacts in
contacts_avp - we are done!
8(27) ERROR: <script>: t_next_contacts() failed
I tried omitting the call to t_next_contacts(), thinking it should possibly
only be used in failure_route. But when I do that (while leaving
t_load_contacts), I get:
5(24) ERROR: tm [t_fwd.c:1730]: t_forward_nonack(): ERROR:
t_forward_nonack: no branches for forwarding
5(24) WARNING: <core> [receive.c:258]: receive_msg(): error while trying
script
The relevant part of the config is:
if (!lookup("location")) {
$var(rc) = $rc;
switch ($var(rc)) {
case -1:
xlog("L_INFO", "$ci|log|lookup of contacts for $ru returned no
results\r\n");
send_reply("404", "Not Found");
exit;
case -3:
xlog("L_INFO", "$ci|log|lookup of contacts for $ru failed with code
$var(rc)\r\n");
send_reply("404", "Not Found");
exit;
case -2:
send_reply("405", "Method Not Allowed");
exit;
}
}
if (!t_load_contacts() || !t_next_contacts()) {
xlog("L_ERR", "t_load_contacts() failed\n");
sl_reply_error();
t_release();
exit;
}
Am I missing something else here? Note: it works fine if I remove
t_load_contacts/t_next_contacts, but then I don't get proper handling of
multiple sip.instance bindings/differing q values.
Best,
Colin
I apologize since this is a technical mail list and this question may not
belong here but i need to fill a business requirement and need more
information of big companies using kamailio, i am searching over the
internet but if anyone can provide me with names of real carriers using
kamailio will be very useful.
Thanks again for any help in this case.
Hello,
I have a Kamailio 4.0.4 configured with the cfg file shown in
https://gist.github.com/ticklingcontest/f96aa4d08b08dc4643056d73da24f0a5
The modparam for dispatcher sets the dispatcher file to be in
/var/run/kamailio/dispatcher.list.
However, I recently discovered that
$ kamctl dispatcher show
picks up the information from the kamailio DB instead of the
dispatcher.list. What's going on?
Any insight is appreciated.
Thanks!
Hi,
I am using http_async_client and dispatcher modules of Kamailio.
Here is scenario!
http_async_client makes calls to an API to get groupid upon which
dispatcher sends calls.
I am using SIPp to generate calls with 100 cps. I see some calls being
failed with an error cause, 483 Too Many Hops.
Taking the trace shows Kamailio routing some calls to itself.
I think this is not a configuration issue since all calls are same(follow
same logic) and some calls get failed.
Any pointer is much appreciated.
Best Regards.
Hi
I have a kamailio proxy in front of asterisk ver 13 servers. I'm using path
support to route to the relevant asterisk server depending on the domain in
the sip header. The incoming registers & invites from sip endpoints get
routed to the correct asterisk server , but when asterisk is sending sip
options to the end points my kamailio config is not routing the option on
to the endpoint .
Kamailio debug shows error below
ERROR: <script>: 192.168.200.131 OPTIONS sip:1333@192.168.200.112:5062 --
domain "192.168.200.112" is not found in domain table 192.168.200.131
Am I correct in thinking that this SIP option should be getting routed via
my on-reply route.
the sip option looks like it is failing here at the start of my config
if (src_ip != BACKEND_NET4)
{
xlog("L_NOTICE", "FROM CLIENT IP: $si $rm $ru $td \n");
# SIP request packet client->backend
if( !loose_route() )
{
if (!lookup_domain("$td", "dattr_")) {
xlog("L_NOTOCE" , "Domain lookup, $rm ");
xlog("L_ERR", "$si $rm $ru -- domain \"$td\" is not " +
"found in domain table $si\n");
drop();
}
Sample of SIP option captured on the kamailio server
OPTIONS sip:1333@192.168.200.112:5062 SIP/2.0
Via: SIP/2.0/UDP 192.168.200.131:5060;branch=z9hG4bK4f910445
Max-Forwards: 70
Route: <sip:192.168.200.148;lr;received=sip:87.198.223.83:16070>
From: "Unknown" <sip:Unknown@192.168.200.131>;tag=as54cfb9df
To: <sip:1333@192.168.200.112:5062>
Contact: <sip:Unknown@192.168.200.131:5060>
Call-ID: 257dea110f5255275aa38d9c45e0e235@192.168.200.131:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-2.11.0(13.10.0)
Date: Fri, 22 Jul 2016 15:31:13 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer, path
Content-Length: 0
OPTIONS sip:1333@192.168.200.112:5062 SIP/2.0
Via: SIP/2.0/UDP 192.168.200.131:5060;branch=z9hG4bK20611e3b
Max-Forwards: 70
Route: <sip:192.168.200.148;lr;received=sip:87.198.223.83:16070>
From: "Unknown" <sip:Unknown@192.168.200.131>;tag=as1b6a0faf
To: <sip:1333@192.168.200.112:5062>
Contact: <sip:Unknown@192.168.200.131:5060>
Call-ID: 7f8ed5ea7a147f2b61269df862af7fae@192.168.200.131:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-2.11.0(13.10.0)
Date: Fri, 22 Jul 2016 15:31:27 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE
Supported: replaces, timer, path
Content-Length: 0
Gerry Kernan
Infinity IT | 17 The Mall | Beacon Court | Sandyford |
Dublin D18 E3C8 | Ireland
Tel: +353 - (0)1 - 293 0090 | E-Mail:
<mailto:gerry.kernan@infinityit.ie> gerry.kernan(a)infinityit.ie
Managed IT Services Infinity IT - <http://www.infinityit.ie/>
www.infinityit.ie
IP Telephony Asterisk Consulting -
<http://www.asteriskconsulting.com> www.asteriskconsulting.com
Contact Centre Total Interact -
<http://www.totalinteract.com> www.totalinteract.com
Dear list
I am quite new to Kamailio and i know that probably this thread has been
answered quite few times. But i have few questions
I was able to configure Kamailio + Asterisk MWI with Kamailio handling the
registration of users. The problem is that i am quite sure that is not the
right way.
What i did was just putting "subscribemwi=no" on every user declared on
Asterisk and he will send NOTIFY's when a voicemail has been received for a
particular user to Kamailio and Kamailio will just forward them to the
endpoints (because he knows the location of the users). I know about the
modules presence presence_xml and presence_mwi of Kamailio which will
handle the subscription of users and send NOTIFY's but it is useless since
I am not verifying any NOTIFY that comes from Asterisk, just forwarding.
Now, some others solution are just a bunch of scripts that, for me, it
doesnt make much sense since is the same idea like how i did it just more
hacky and unnecesary, i guess?. This solution can be found here:
http://saevolgo.blogspot.com/2012/07/asterisk-behind-kamailio-voicemail-mwi…
There is another solution that i found in few threads here which i dont
understand really well, is to send PUBLISH messages from Asterisk to
Kamailio so Kamailio sends NOTIFY's with the event and content about the
amount of voice messages in a particular mailbox. Some say that you need to
create the message PUBLISH and send it with sipsak or another solution in
Asterisk.
For what i see in SIP documentation, the last solution seems a bit less of
a hack lets say, more resilient. With all said, i have a few questions
Is it the solution I made really a bad idea?. I havent take a lot of time
understanding SUBSCRIBE/NOTIFY messages, just the basics, i dont know if
there are some security issues i should think about in this particular
flow. Should i check the status of the authorization of the subscription in
Kamailio before forwarding the mesage (if there is a way, how)? or it
really doesnt make sense at all? because after all, my endpoints receives
the NOTIFY and "you have a new voicemail" message appears.
Now, about the last solution, is there any guide of someone that has done
that in a clean way?, may someone guide me how to construct the PUBLISH
message and when should i send it?, should i create a cron or something?,
this PUBLISH message needs to be send for every user?. may someone guide me
(if this is considered a cleaner way of doing it) how to make this? Many of
the answers in other threads about this are not enough to understand the
idea as a whole, at least for me.
Thank you very much in advance
Alejandro
--
-
Saludos a todos
Greeting list.
I am doing the load test of Kamailio with SIPp using most basic
script(kamailio.cfg) with logging level set to minimum to dispatch requests
to SIPp UAS.
This is my dispatcher code snippet.
$avp(quality) = "1";
ds_select_dst("$avp(quality)", "4");
route(RELAY);
At 70 CPS calls work fine. But if I increase CPS to 80, Kamailio stops
accepting calls for few seconds and comes to life after being idle for some
time.
100 CPS for sip proxy is not hot cake.
Also, I see in http://www.kamailio.org/docs/openser-performance-tests/
tests were made with -l27 and -m7000 which looks wronged to me.
./sipp -sf uac_inv.xml
<http://www.kamailio.org/docs/openser-performance-tests/data/uac_inv.xml>
-rsa 192.168.2.102:5060 192.168.2.102:5070 -m 200000 -r 7000 -d 1 -l 27
There must be something wrong in my configuration since this cps is very
low.
kamailio -version
version: kamailio 4.4.1 (x86_64/linux) 90be8b
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
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: 90be8b
SHM_MEMORY=768
PKG_MEMORY=64
Any suggestion is much appreciated.
Best Regards,
Hi community,
I'm using an MGCF that creates From tags like **%%!!MYOFFICE++00!!%%**A0F1F1BA
Now the special characters "%%" are allowed in tags (i.e. "token" according to RFC 3261),
token = 1*(alphanum / "-" / "." / "!" / "%" / "*"
/ "_" / "+" / "`" / "'" / "~" )
but they are NOT allowed in URI parameters according to RFC 3261
uri-parameter = transport-param / user-param / method-param
/ ttl-param / maddr-param / lr-param / other-param
other-param = pname [ "=" pvalue ]
pname = 1*paramchar
pvalue = 1*paramchar
paramchar = param-unreserved / unreserved / escaped
param-unreserved = "[" / "]" / "/" / ":" / "&" / "+" / "$"
unreserved = alphanum / mark
mark = "-" / "_" / "." / "!" / "~" / "*" / "'"
/ "(" / ")"
escaped = "%" HEXDIG HEXDIG
which makes the MGCF ignore the whole RR header and sending subsequent requests directly to the peer SIP UA, instead of sending it to the CSCF.
Hence it's not OK to just copy the From tag into the ftag parameter, imho.
We did a workaround in the MGCF, now sending **~~!!MYOFFICE++00!!~~**A0F1F1BA, but strictly spoken the kamailio S-CSCF is not compliant to RFC 3261.
What's your opinion? Is there an configuration option to make it compliant?
All the best
Christoph
The information contained in this e-mail message is privileged and confidential and is for the exclusive use of the addressee. The person who receives this message and who is not the addressee, one of his employees or an agent entitled to hand it over to the addressee, is informed that he may not use, disclose or reproduce the contents thereof, and is kindly asked to notify the sender and delete the e-mail immediately.
Hello,
I am following the instructions in
http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb
to configure my Kamailio and Asterisk (using PJSIP realtime with MySQL). I
am able to get Kamailio register the clients (tested with Zoiper
softphone), but having trouble getting any further to load balance a couple
of Asterisk servers. Here is a range of issues I have:
(a) The Kamailio server keeps sending UDP SIP messages to the Asterisk
server and it is not clear where to control what protocol to use to send
SIP messages Asterisk server(s).
(b) I followed the instructions for the dispatcher module in the wiki, but
it is not clear why I should use the #!define WITH_ASTERISK directive to
enumerate the bind IPs and ports (how does this reconcile with the list of
Asterisk servers in the dispatcher.list file?):
!ifdef WITH_ASTERISK
asterisk.bindip = "192.168.1.102" desc "Asterisk IP Address"
asterisk.bindport = "5060" desc "Asterisk Port"
kamailio.bindip = "192.168.1.101" desc "Kamailio IP Address"
kamailio.bindport = "5060" desc "Kamailio Port"
Also, where do I specify the protocol to use when sending to the Asterisk
servers? Is it auto detected? If so, why is Kamailio not detecting that the
Asterisk servers are only listening on TCP?
Any help is appreciated. My entire /etc/kamailio/kamailio.cfg file is in
here:
https://gist.github.com/ticklingcontest/c7437dbc2d8e838834ee4d852753f254. I
am using Kamailio 4.0.4 with Asterisk 13.7.2 using TCP for PJSIP.
Thanks!