Hello,
I am having trouble getting a large list of dialogs (800+) out of
Kamailio using the dlg.list binrpc command.
I posted a while back that the list of dialog data was coming back
truncated, and was told to increase:
modparam("ctl", "binrpc_max_body_size", ...)
modparam("ctl", "binrpc_struct_max_body_size", ...)
I did that, increasing the buffers to 20 MB. Then, when I ran
sercmd -s unixs:/tmp/kamailio_ctl dlg.list
I got:
ERROR: reply too big
which clearly seemed to be on the client side now.
So, I looked in the sources for sercmd (now sercmd), in
sip-router/utils/sercmd/sercmd.c, and found this:
if ((ret=get_reply(s, reply_buf, MAX_REPLY_SIZE, cookie, &in_pkt,
&msg_body))<0){
switch(ret){
case -1:
goto error_read;
case -2:
goto error_parse;
case -3:
goto error_cookie;
case -4:
goto error_toobig;
So, I adjusted:
#define MAX_REPLY_SIZE
to several megabytes as well, and tried the same with MAX_BODY_SIZE too.
Now, when I run the dlg.list command, it just hangs and never returns
anything. It was stuck there for well over 20 minutes. An 'strace' on
sercmd reveals that it receives what appears to be the full listing, but
keeps wanting to read() more. I don't have the exact output handy at
the moment, but it looked like this:
socket(PF_FILE, SOCK_STREAM, 0) = 3
connect(3, {sa_family=AF_FILE, path="/tmp/kamailio_ctl"}, 110) = 0
writev(3, [{"\241\3\v%s\230\4", 7}, {"\221\tdlg.list\0", 11}], 2) = 18
read(3, "\241\27\16\257%s\230\4\221Hhash:551:9521 state:4 "...,
786432) = 340000
read(3,
[just hangs here]
Now, I would have assumed that perhaps there is more to read and the
output is not returning due to some endless locking of the dialog
profile table, which is constantly changing. However, that cannot be
the case because
kamctl fifo dlg_list
works fine for any amount of dialogs, and always returns all the data
near-instantly!
Any assistance is much appreciated!
-- Alex
[1] I don't have the output handy at the moment, but it was a read() value:
--
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
Hi all!
I make failover scheme with two kamailio+carp. Kamailio use dialogs for
accounting.
Solved tasks:
K. as registrar (mysql DB, shared with asterisk)
auth/accounting via radius
usrloc DB in mysql.
Need to solve: dialogs. Today if K1 server down, K2 take sip requests.
New calls(dialogs) work perfectly, but if dialog created by K1, K2 had
nothing about start and cant complete accounting.
Of cause, on K2 i may load dialogs from DB. I think on timer or on
event from carp. But may be exist better solutions.
--
WBR, Victor
JID: coyote(a)bks.tv
JID: coyote(a)bryansktel.ru
I use FREE operation system: 3.10.4-calculate GNU/Linux
Hello,
there were old and recent discussions about the representation of time
in accounting records. At this moment the acc module stores the unix
timestamp as datetime value.
In some countries is required to store more accuracy, beyond the
seconds. Also, the datetime gives some troubles with converting back to
unix timestamp, specifically with time zones and daylight saving times.
I want to open a discussion that is visible for all users and devs,
being something affecting probably everyone, input from anyone that is
interested being relevant to select the right approach.
Here are some suggestions presented so far.
1) store seconds.miliseconds as double - there is a patch (which
probably needs some tunings itself) on tracker. The precision is shifted
from seconds to milliseconds. Internally computed from microseconds from
timeval structure. The other modules might need updates (iirc dbtext has
only 2 decimals precisions for double, while miliseconds will require at
least three -- could be the case for flatstore or other modules).
Advantage is the computing of duration directly by subtraction of two
values.
2) store seconds and microseconds as two separate values. Should be no
issues with existing modules. Even more accuracy than above, no issues
with other modules, but will require to use two columns (thus four
values to compute the duration)
Any other suggestions?
Personally, at this moment, I will go with 2), but that might not meet
everyone's needs. So a solution can be to make it configurable, as a
bitmask of what time representation to store.
Say, there will be a new parameter timestamp_mode for acc module:
- bit one set - store seconds timestamp as for now (default)
- bit two set - store seconds and microseconds in separate integer columns
- bit three set - store seconds.miliseconds as double value in one column
I could add the parameter and tune acc for bit one and two. For bit
three a deeper review is needed for other modules, probably the
developer that submitted to the tracker can do it.
More suggestions? Pro or cons opinions?
Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, San Francisco, USA - June 24016, 2013
* http://asipto.com/u/katu *
Can anybody suggest me whether kamailio 4.0.3 supports pidf format for
handling presence related stuff instead of XCAP server.If yes what are the
corrosponding changes in the kamaolio cfg file?
If not, then how can I test my kamailio presence with XCAP functionality
with a browser based client like SIPML5.Actually I want the XCAP related
stuff instead of pidf which is currently available in Dubango SIPML5
Hello, with outgoing white list/black list I am able to put a prefix in the user preference table to block certain out going calls. In the same way is it possible to block incoming calls depending on certain prefixes ( like 1-800)?
Regards,
A
Hi All Members,
I am trying to compiling Kamailio 4.0 with websocket support. Please tell
that what modules should I compile during installation. Is there any list
of all available modules. Is it possible to compile kamailio with all
available
modules.
During compilation, I am getting the error "fatal error:
radiusclient-ng.h: No such file or directory".
Thanks,
Vijay TH
Hi All,
Sorry for cross-posting this email to PJLIB, but maybe there are some things related.
Anyhow! I'm having problems on kamailio v4.0.2 under Fedora 18 64bit and TCP client like iPhone using PJSIP as SIP library.
Basically once the iPhone side in close the call (TCP->UDP) I'm getting the error below. Kamailio is running under a VPS
without
NATed network so it uses a real public address. Furthermore, note that tcp_main is answering to a 192.168.2.98 ip address
which is the iPhone client. This looks really strange to me since it should answer directly to the public/port used for
the registration
and not to a such kind of reserved address. The kamilio configuration is basically the default with a very few changes
like NAT, rtpproxy and postgresql backend.
This problems doesn't happen at all when using UDP->UDP calls. But I cannot use it because as you certain know UDP
connection under iPhone will not work when the application run in background mode.
Can someone suggest how to solve this issue or maybe suggest a TCP working solution for iPhone?
Thanks in advance.
Roberto Fichera.
Jul 30 16:21:53 proxy /usr/sbin/kamailio[9502]: ERROR: <core> [tcp_main.c:4432]: tcpconn_main_timeout(): connect
192.168.2.98:5060 failed (timeout)
Jul 30 16:21:55 proxy rtpproxy[2262]: DBUG:get_command: received command "9483_9 D
12d1d19926c4ff742a52f0c855b1bb83@94.94.x.x:5060 as74e0c388 GROahimCK6KTrl5CkYEg7nuoPIIXZ8cj"
Jul 30 16:21:55 proxy rtpproxy[2262]: INFO:handle_delete: forcefully deleting session 1 on ports 15604/17354
Jul 30 16:21:55 proxy rtpproxy[2262]: INFO:remove_session: RTP stats: 354 in from callee, 603 in from caller, 957
relayed, 0 dropped
Jul 30 16:21:55 proxy rtpproxy[2262]: INFO:remove_session: RTCP stats: 5 in from callee, 2 in from caller, 7 relayed, 0
dropped
Jul 30 16:21:55 proxy rtpproxy[2262]: INFO:remove_session: session on ports 15604/17354 is cleaned up
Jul 30 16:21:55 proxy rtpproxy[2262]: DBUG:doreply: sending reply "9483_9 0
Jul 30 16:21:55 proxy rtpproxy[2262]: "
Jul 30 16:22:04 proxy /usr/sbin/kamailio[9502]: ERROR: <core> [tcp_main.c:4432]: tcpconn_main_timeout(): connect
192.168.2.98:5060 failed (timeout)
Jul 30 16:22:14 proxy rtpproxy[2262]: DBUG:get_command: received command "9496_16 D
12d1d19926c4ff742a52f0c855b1bb83@94.94.x.x:5060 GROahimCK6KTrl5CkYEg7nuoPIIXZ8cj as74e0c388"
Jul 30 16:22:14 proxy rtpproxy[2262]: INFO:handle_command: delete request failed: session
12d1d19926c4ff742a52f0c855b1bb83@94.94.x.x:5060, tags GROahimCK6KTrl5CkYEg7nuoPIIXZ8cj/as74e0c388 not found
Jul 30 16:22:14 proxy rtpproxy[2262]: DBUG:doreply: sending reply "9496_16 E8
Jul 30 16:22:14 proxy rtpproxy[2262]: "
Hello, I have a question about the load balancing module of kamailio.
As the site http://kb.asipto.com/ say, Kamailio is as a SIP proxy router to
scale Asterisk.
Can I run a kamailio instance as load balancer, and other several instances
as voice server replace of Asterisk?
If I can do that, could you give me a tutorial? We are using kamailio as
our server. Thank you very much.
Hello,
Thanks in advanced for the help. I am absolutely new with kamailio and still
struggling through silly problems so please forgive me if the solutions is
so obvious.
I have a network like
Devices --à Kamailio --à pstn GW
The PSTN GW is more or less out of my reach for changing the behaivour.
As devices I have xlite, 3cx and an android app
Kamailio is on version 4.0.2
I have problems with the calls to PSTN, When A is the Android app the server
is not able to relay the Bye coming from the pstngw so the android app does
not disconnect the call. This do not happened when A are xlite or 3cx. Bye
is correctly sent to the PSTNGW if it comes from the android app. For calls
inside the kamailio server there is no problem with the devices and all the
byes are sent ok.
When I call from the android app I have to drop some of the parameters on
the Contact header because the pstngw do not like them and drop the call
otherwise (responding with a 500 IRP error) I droped the parameters using:
subst('/^Contact: (.*)>.*$/Contact: \1>/i'); #delete the parameter that
is anoying pstnGW on contact header
I also change request uri deleting the 00, but I do this modification on all
the calls. I have tried without this ruri modification and the resoult is
the same xlite ok android ko so I do not think that is affecting.
subst_uri('/^sip:00(.*)/sip:\1/i'); # delete the 00
Searching on the kamailio log I found that in the android call:
DEBUG:
tm [t_lookup.c:1395]: t_newtran(): DEBUG: t_newtran: msg id=113 , global msg
id=112 , T on entrance=0xffffffffffffffff
DEBUG:
tm [t_lookup.c:534]: t_lookup_request(): t_lookup_request: start searching:
hash=30121, isACK=0
DEBUG:
tm [t_lookup.c:492]: matching_3261(): DEBUG: RFC3261 transaction matching
failed
DEBUG:
tm [t_lookup.c:716]: t_lookup_request(): DEBUG: t_lookup_request: no
transaction found
DEBUG:
tm [t_hooks.c:374]: run_reqin_callbacks_internal(): DBG:
trans=0x7f60cadc8d10, callback type 1, id 0 entered
While on the xlite call I can see
tm [t_lookup.c:1395]: t_newtran(): DEBUG: t_newtran: msg id=116 , global msg
id=115 , T on entrance=(nil)
tm [t_lookup.c:534]: t_lookup_request(): t_lookup_request: start searching:
hash=64449, isACK=0
tm [t_lookup.c:477]: matching_3261(): DEBUG: RFC3261 transaction matched,
tid=1cbf.617b985b6620c855b501dfbfced5f7a4.0
tm [t_lookup.c:733]: t_lookup_request(): DEBUG: t_lookup_request:
transaction found (T=0x7f60cadb2510)
When processing the BYE. So Im thinking that the problem is that Kamailio
do not know where to send it. Im not sure that is the problem.
Ive checked and tags and session information seem ok to me, so I do not
understand what is wrong with the Bye so the server cannot find where it
should be sent to.
I attached a trace with both calls first xlite and then android
This is the Bye on the XLite call
Frame 59: 788 bytes on wire (6304 bits), 788 bytes captured (6304 bits)
Ethernet II, Src: Cisco_67:50:00 (macAdd), Dst: FujitsuT_80:7d:d8 (macAdd)
Internet Protocol Version 4, Src: PSTNGWIP (PSTNGWIP), Dst: ServerIP
(ServerIP)
User Datagram Protocol, Src Port: sip (5060), Dst Port: ServerPort
(ServerPort)
Session Initiation Protocol (BYE)
Request-Line: BYE sip:XliteAnumber@publicXliteIP:55838;transport=tcp
SIP/2.0
Method: BYE
Request-URI: sip:XliteAnumber@publicXliteIP:55838;transport=tcp
[Resent Packet: False]
Message Header
Via: SIP/2.0/UDP
PSTNGWIP;branch=z9hG4bK5d4.f93633a612aca237ad1f5c341c1b2986.0
Via: SIP/2.0/UDP
PSTNGWIP:5061;branch=z9hG4bK-fat3ctwlimdw3lkb;rport=5061
Route: <sip:ServerIP:ServerPort;r2=on;lr=on;nat=yes>
Route: <sip:ServerIP:ServerPort;transport=tcp;r2=on;lr=on;nat=yes>
Max-Forwards: 16
From: 00Bnumber
<sip:00Bnumber@ServerIP:ServerPort>;tag=eihmt4yopie2j4fq.i
To: <sip:XliteAnumber@ServerIP:ServerPort>;tag=2b8f312e
Call-ID: NGZlMDU3OWE2YjM1ZGQ1OTEyM2NiNmI0YjM1MjA0YTg
CSeq: 515 BYE
Sequence Number: 515
Method: BYE
Contact: Anonymous <sip:PSTNGWIP:5061>
User-Agent: Sippy
cisco-GUID: 521708479-278139363-3214082078-3387785402
h323-conf-id: 521708479-278139363-3214082078-3387785402
and that one is the one on the Android one:
Frame 115: 766 bytes on wire (6128 bits), 766 bytes captured (6128 bits)
Ethernet II, Src: Cisco_67:50:00 (macAdd), Dst: FujitsuT_80:7d:d8 (macAdd)
Internet Protocol Version 4, Src: PSTNGWIP (PSTNGWIP), Dst: ServerIP
(ServerIP)
User Datagram Protocol, Src Port: sip (5060), Dst Port: ServerPort
(ServerPort)
Session Initiation Protocol (BYE)
Request-Line: BYE
sip:AndroidAnumber@PrivateAndroidIP:35986;transport=tcp SIP/2.0
Method: BYE
Request-URI: sip:AndroidAnumber@PrivateAndroidIP:35986;transport=tcp
[Resent Packet: False]
Message Header
Via: SIP/2.0/UDP
PSTNGWIP;branch=z9hG4bKf0a2.679a023eeebfc2b9acae8c683386146f.0
Via: SIP/2.0/UDP
PSTNGWIP:5061;branch=z9hG4bK-ge57vxpelnqy57yg;rport=5061
Route: <sip:ServerIP:ServerPort;r2=on;lr=on;nat=yes>
Route: <sip:ServerIP:ServerPort;transport=tcp;r2=on;lr=on;nat=yes>
Max-Forwards: 16
From: <sip:00Bnumber@ServerIP:ServerPort>;tag=2yapycnnrb7yjgwj.i
To: <sip:AndroidAnumber@ServerIP:ServerPort>;tag=652340227
Call-ID: fa8e5892-e88f-fd9b-8f99-0545ac8e9e8e
CSeq: 438 BYE
Sequence Number: 438
Method: BYE
Contact: Anonymous <sip:PSTNGWIP:5061>
User-Agent: Sippy
cisco-GUID: 521708482-278139363-3214082078-3387785402
h323-conf-id: 521708482-278139363-3214082078-3387785402
Both Devices are behind NAT.
I hope I explained my problem correctly but do not hesitate to ask any other
thing.
Thanks in advanced
Helena
Hello, can someone give me some pointers as to how to do a blind transfer / agent transfer using Kamailio. My current set up uses Kamailio to authenticate and register users and Asterisk to do the call handling.
Thank you,
Arun