I'm using Kamailio 3.3 and the USRLOC module to track registrations. I have set "db_mode" to 1 because I want to store all registration info to the database and I want the database to be up to date (in case I need to restart Kamailio).
Unfortunately, this doesn't work as I expect. When I query the database, it has far fewer entries in the "location" table than are registered to Kamailio (which I find with a "kamctl ul show"). Also, when I restart Kamailio, I lose some of the registrations for my phones.
Am I misunderstanding the behaviour for db_mode=1? Isn't it supposed to keep the database up to date?
-H
Hello:
after i starting kamailio for while, the system shows:
3(1466) DEBUG: mi_fifo [mi_parser.c:84]: end of fifo input tree
3(1466) DEBUG: mi_fifo [fifo_fnc.c:507]: done parsing the mi tree
1(1464) DEBUG: usrloc [urecord.c:327]: Binding '102','
sip:102@192.168.1.105:5060' has expired
3(1466) DEBUG: mi_fifo [mi_parser.c:84]: end of fifo input tree
3(1466) DEBUG: mi_fifo [fifo_fnc.c:507]: done parsing the mi tree
3(1466) DEBUG: mi_fifo [mi_parser.c:84]: end of fifo input tree
3(1466) DEBUG: mi_fifo [fifo_fnc.c:507]: done parsing the mi tree
----------------------------------------------------------------------
kamctl online and ul show are empty. how can i adjust the time to resolve
the problem?
thanks!
Pls find attached the patch for version 4.1.3. The three lines of code are equal
for all affected version (incl. 3.2.4, 3.3.5, 4.0.6 and 4.1.3).
regards,
Klaus
> Daniel-Constantin Mierla <miconda(a)gmail.com> hat am 7. Mai 2014 um 15:45
> geschrieben:
>
> Hello,
>
> can you send the patch to be reviewed?
>
> Cheers,
> Daniel
>
> On 07/05/14 13:15, Klaus Feichtinger wrote:
>
> > > Hi Daniel,
> >
> > I think we´ve found the reason, why this problem occurs!
> >
> > The problem is caused in the "agregate_xmls" function in file
> > "notify_body.c" of the "presence_dialoginfo" module:
> >
> > /* loop over all bodies and create the aggregated body */
> > for(i=0; i<j; i++)
> > {
> > /* LM_DBG("[n]=%d, [i]=%d, [j]=%d xml_array[i]=%p\n", n, i, j,
> > xml_array[j] ); */
> > p_root= xmlDocGetRootElement(xml_array[i]);
> > if(p_root ==NULL) {
> > LM_ERR("while geting the xml_tree root element\n");
> > goto error;
> > }
> > if (p_root->children) {
> > for (node = p_root->children; node; node = node->next) {
> > if (node->type == XML_ELEMENT_NODE) {
> > LM_DBG("node type: Element, name: %s\n",
> > node->name);
> > /* we do not copy the node, but unlink it and then
> > add it ot the new node
> > * this destroys the original document but we do
> > not need it anyway.
> > * using "copy" instead of "unlink" would also copy
> > the namespace which
> > * would then be declared redundant (libxml
> > unfortunately can not remove
> > * namespaces)
> > */
> > if (!force_single_dialog || (j==1)) {
> > xmlUnlinkNode(node);
> > if(xmlAddChild(root_node, node)== NULL) {
> > LM_ERR("while adding child\n");
> > goto error;
> > }
> >
> > It seems to be not the best idea to "unlink" the XML node (=
> > "xmlUnlinkNode(node);"), as then no "node->next" is available any more.
> > Therefore, this loop will _always_ stop after one dialog entry and ignore
> > any additional one!
> >
> > But we "solved" the problem in this way that the loop will not directly
> > use "node->next", but a variable, which is set within the loop. It looks
> > like this:
> > xmlNodePtr next_node = NULL;
> > [...]
> > if (p_root->children) {
> > for (node = p_root->children; node; node = next_node) {
> > next_node = node->next;
> > if (node->type == XML_ELEMENT_NODE) {
> > [...]
> >
> > This solution has been tested with 2 and 3 dialog entries in a single
> > PUBLISH request and it is working fine. We should discuss if this is a
> > problem that should be solved generally or if it is a "private" problem in
> > our use case.
> >
> > What do you mean?
> >
> > regards,
> > Klaus
> >
> >
> > >
Hi, I use a configuration of ipkall and iptel.org, Most of the time this
works out as a great incoming solution, however, today, it seems to be
ending the call as i answer, I use only one softpphone at a time, but
have tried it on Zoiper, 3cx, and Phonerlite, It does the same thing,
call it, it rings, answer it and it immediately goes to "Call ended".
I've done powercycle reboots on my HTC EVO 4G LTE, and on my PC it acts
the same on all three. It registers fine on them all, I just cant
determine if it is an IPKall or an Iptel problem..Is anyone else having
an issue?? Are there any suggestions on what further troubleshooting I
could do?? Thanks Michael
Hi All,
Just had a strange occurrence where kamailio has been up and running
fine for several months and just died with a strange error:
root@sip-router3:~# kamailio -V
version: kamailio 4.1.1 (x86_64/linux) ac7d55
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2275]: : <core>
[mem/q_malloc.c:468]: qm_free(): BUG: qm_free: freeing already freed
pointer (0x7faf565586d0), called from <core>: mem/shm_mem.c:
sh_realloc(88), first free <core>: mem/shm_mem.c: sh_realloc(88) -
aborting
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2271]: ALERT:
<core> [main.c:775]: handle_sigs(): child process 2275 exited by a
signal 6
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2271]: ALERT:
<core> [main.c:778]: handle_sigs(): core was not generated
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2271]: INFO:
<core> [main.c:790]: handle_sigs(): INFO: terminating due to SIGCHLD
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2279]: INFO:
<core> [main.c:841]: sig_usr(): INFO: signal 15 received
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2277]: INFO:
<core> [main.c:841]: sig_usr(): INFO: signal 15 received
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2273]: INFO:
<core> [main.c:841]: sig_usr(): INFO: signal 15 received
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2272]: INFO:
<core> [main.c:841]: sig_usr(): INFO: signal 15 received
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2274]: INFO:
<core> [main.c:841]: sig_usr(): INFO: signal 15 received
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2276]: INFO:
<core> [main.c:841]: sig_usr(): INFO: signal 15 received
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2278]: INFO:
<core> [main.c:841]: sig_usr(): INFO: signal 15 received
May 7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2271]: ERROR: ctl
[ctl.c:379]: mod_destroy(): ERROR: ctl: could not delete unix socket
/tmp/kamailio_ctl: Operation not permitted (1)
Not sure what that means, memory leak? I started started it right back
up with no indication of a problem. Running Kamailio for many years,
I have never had an instance of it just shut down before. So I'm
wondering if there are any safe scripts that check the running process
for kamailio and restart if automatically if not running?
I dug around a bit but not seeing any hits for auto start kamailio scripts.
And another question would be if this occurrence of shutting down
should be of concern or not?
Thanks.
JR
--
JR Richardson
Engineering for the Masses
Hi,
during simulating scenarios in relation with the notify problem I have so far, I
became unsure, if Kamilio (in principal) is supporting handling of PUBLISH
requests (event "dialog") that contain _more than_ one (1) dialog entry. I know
that it can generate notify requests with a message body that contains more than
one dialog entry. But that´s not automatically the same as handling publish
requests....
So - is Kamailio able or not? Did anybody ever use it in such a scenario?
regards,
Klaus
Hello everybody,
i'm new to kamalio and i'm trying to install on a centos server hosted on a
open-stack IaaS platform.
I followed the official wiki adding the "advertise statement" and define
WITH_NAT. I added 3 user as test 100 101 102 that i can see typing kamctl db
show subscriber but if i try to register with Bria i get Failed.
Theese are sip packets that i sniffed with tcpdump.
http://pastebin.com/sa74HJqM
can someone help a noob to understad how to debug this kind of problem with
kamalio? i tried googling but i didn't find anything.
Thank you all in advice
Hello,
I'd setup a test environment where Kamailio accepts external invites and
routes them to an internal Asterisk (actually working as an SBC).
My dialplan works fine routing the INVITE to the internal Asterisk, but the
SIP message goes into the defaul sip context (the one configured in sip
general), and not in the context defined for the sip trunk between Kamailio
and Asterisk.
The sip trunk is configured like this:
[kamailio]
disallow=all
host=kamailio
port=5060
insecure=port,invite
type=friend
context=from-sip-external
fromdomain=mydomain
qualify=yes
allow=alaw
allow=g722
So I expect that all the sip invites coming from kamailio should be
executed in from-sip-external context.
But it doesn't work like this since each invite goes in the default context.
The invite that goes to Asterisk is like this
<--- SIP read from kamailio-external:5060 --->
INVITE sip:extension@asterisk:5060;transport=UDP SIP/2.0
Record-Route: <sip:kamailio-external:5060;nat=yes;ftag=905e4921;lr=on>
Via: SIP/2.0/UDP kamailio-external:5060;branch=z9hG4bK277a.aea3ad87.0
Via: SIP/2.0/UDP
caller:28021;rport=28019;received=caller;branch=z9hG4bK-d8754z-d11f1fa1d0fb2ab4-1---d8754z-
Max-Forwards: 69
Contact: <sip:524@caller:28019;transport=UDP>
To: <sip:extension@kamailio-external>
From: <sip:524@caller:28007>;tag=905e4921
Call-ID: YzEzMDM1NDZhZTllMTRiMDJmY2MyZTE0ZWZjMzE5OTc.
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO,
SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
User-Agent: Z 3.2.21357 r21367
Allow-Events: presence, kpml
Content-Type: application/sdp
Content-Length: 260
What I think is that in the sip message there is no information about
kamailio internal ip address but only about kamailio-external address and
then Asterisk put it into the default context.
If this is the reason, should I change the trunk ip address in Asterisk and
should I do some manipulation on the incoming packet on kamailio?
Or maybe I should use kamailio-external as fromdomain in the trunk
configuration?
Thanks.
Hello, I have a set up with Asterisk-Kamailio as explained in
http://kb.asipto.com/asterisk:realtime:kamailio-3.1.x-asterisk-1.6.2-astdb.
This set up has been working well for us for sometime now. We are now
moving Asterisk to a stand alone server ( not installing it on the same
box as asterisk ) but we are running into some issues. I have just made
some changes to the Asterisk bind IP address and port and also set up
Kamalio as a peer on asterisk.
When I make an extension to extension call the calls are failing from the
FROMASTERISK route ( call is getting cancelled ). Can someone let me know
what changes I need to make to correct the issue? Some pointer will help.
Thank you,
Arun