Hi all,
I have been using more and more avps for per-call queries populated by
custom mysql queries. I would like to know how the connections of mysql
queries are being closed.
I tried to locate a command to do such, but unable to locate. Do they close
on their own, after a certain timeout period? I am running kamailio 1.5.5,
notls.
The proxies are getting busier and I want to keep all the resources in check
...
Thanks,
-graham
Is there a way to get asterisk to publish RTP stats in the bye message?
I would like to parse theses to DB and get stats from them.
If so, how?
Thanks
Np
I have libpcap, it's in /usr/lib64 but it's libpcap0.9.8
>:/usr/local/src/captagent # find / |grep libpcap
/usr/share/doc/packages/libpcap-devel
/usr/share/doc/packages/libpcap-devel/pcap.xml
/usr/share/doc/packages/libpcap-devel/pcap.html
/usr/share/doc/packages/libpcap-devel/pcap.txt
/usr/share/doc/packages/libpcap0
/usr/share/doc/packages/libpcap0/LICENSE
/usr/share/doc/packages/libpcap0/TODO
/usr/share/doc/packages/libpcap0/CREDITS
/usr/share/doc/packages/libpcap0/README.linux
/usr/share/doc/packages/libpcap0/README
/usr/share/doc/packages/libpcap0/CHANGES
/usr/lib64/libpcap.a
/usr/lib64/libpcap.so.0.9.8
/usr/lib64/libpcap.so
/usr/lib64/libpcap.so.0
On Fri, Feb 17, 2012 at 10:38 AM, Max Mühlbronner <mm(a)42com.com> wrote:
> This is a multi-part message in MIME format.
> --------------070003040807050803020008
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: 8bit
>
> Hi,
>
> you are missing libpcap0.8 which is a dependency for the captagent.
>
>
> BR
>
> Max M.
>
> Am 17.02.2012 16:31, schrieb Nelson Pereira:
> > ok, tried to do the make install, getting the bellow:
> > aurast:/usr/local/src/captagent # /usr/local/bin/captagent
> > /usr/local/bin/captagent: error while loading shared libraries:
> > libpcap.so.0.8: cannot open shared object file: No such file or directory
> >
> > Do i need to compile this?
> >
> > Also just tried running the captagent:
> > aurast:/usr/local/src/captagent # ./captagent
> > ./captagent: error while loading shared libraries: libpcap.so.0.8:
> > cannot open shared object file: No such file or directory
> >
> > What am I doing wrong?
> >
> > This is a SUSE SLES11 64bit server running asterisk 1.8.6
> >
> > Thanks
> >
> >
> >
> > On Fri, Feb 17, 2012 at 10:24 AM, Nelson Pereira <kitkat0981(a)gmail.com
> > <mailto:kitkat0981@gmail.com>> wrote:
> >
> > from the atttached kamailio.cfg file, what should be changed to
> > get captagent receiver working in kamailio instead of port mirroring?
> >
> > Thanks
> >
> >
> > On Fri, Feb 17, 2012 at 7:29 AM, Alexandr Dubovikov
> > <voip(a)start4.info <mailto:voip@start4.info>> wrote:
> >
> >
> > The link has been not changed, you know it already:
> >
> > http://code.google.com/p/homer/wiki/HOWTO
> >
> > Homer Capture Agent (for all other unsupported system)
> >
> > if your SIP system (PBX, proxy) doesn't have a built-in
> > capture agent with HEP or IPIP encapsulation support, you can
> > use Homer Capture Agent (captagent). This is an external
> > application (daemon) that collect SIP messages thru PCAPlib
> > and send them to your capture server. The captagent support
> > IPv4 and IPv6.
> >
> > preventing your next question: the captagent your can find in
> > the git.
> >
> > http://code.google.com/p/homer/source/browse/
> >
> >
> > Wbr,
> > Alexandr
> >
> >
> >
> > 17.02.2012 13:15, Nelson Pereira wrote:
> >> Can captagent be installed on a asterisk server? If so, is
> >> there a howto?
> >>
> >> Sent from my iPhone4 on IOS4
> >>
> >> On Feb 17, 2012, at 7:07 AM, Alexandr Dubovikov
> >> <voip(a)start4.info <mailto:voip@start4.info>> wrote:
> >>
> >>> Hi,
> >>>
> >>> start two captagents instance, each on own interface and
> >>> duplicate all traffic to your kamailio node. (HEP protocol)
> >>>
> >>> Wbr,
> >>> Alexandr
> >>>
> >>> 16.02.2012 17:51, Nelson Pereira wrote:
> >>>> I would like to know if someone can show me an example of
> >>>> there setup configuration in kamailio.cfg for capturing
> >>>> packets comming in from a mirror port.
> >>>> The reason I ask is that if I do a TCPDUMP on the server, I
> >>>> see all traffic to and from different sources on my Voice
> >>>> network.
> >>>>
> >>>> But when I use Homer SIPCAPTURE which uses Kamailio in the
> >>>> background, I only see traffic sent FROM my PBX but not
> >>>> seing the traffic comming back to it.
> >>>>
> >>>> I mean I only see one side of the call, yet TCPDUMP
> >>>> confirmed I see everything....
> >>>>
> >>>> What am I missing ?
> >>>>
> >>>> Thanks
> >>>>
> >>>> NP
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
> mailing list
> >>>> sr-users(a)lists.sip-router.org <mailto:
> sr-users(a)lists.sip-router.org>
> >>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> >>>
> >>> _______________________________________________
> >>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
> >>> mailing list
> >>> sr-users(a)lists.sip-router.org
> >>> <mailto:sr-users@lists.sip-router.org>
> >>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> >>
> >>
> >> _______________________________________________
> >> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
> mailing list
> >> sr-users(a)lists.sip-router.org <mailto:
> sr-users(a)lists.sip-router.org>
> >> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> >
> >
> > _______________________________________________
> > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
> > mailing list
> > sr-users(a)lists.sip-router.org
> > <mailto:sr-users@lists.sip-router.org>
> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> >
> >
> >
> >
> >
> > _______________________________________________
> > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> > sr-users(a)lists.sip-router.org
> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> 42com Telecommunication GmbH
> Straße der Pariser Kommune 12-16 / D-10243 Berlin
>
> E-mail: mm(a)42com.com
> Homepage: www.42com.com
>
> Firmenangaben/Company information:
>
> Handelsregister/Commercial register: Amtsgericht Berlin HRB 99071 B
> Umsatzsteuer-ID/VAT-ID: DE223812306, Geschäftsführer/CEO: Thomas Reinig,
> Alexander Reinig
>
>
> Diese E-Mail enthält Informationen von 42com Telecommunication GmbH. Diese
> sind möglicherweise vertraulich und ausschließlich für den Adressaten
> bestimmt. Sollten Sie diese elektronische Nachricht irrtümlicherweise
> erhalten haben, so informieren Sie uns bitte unverzüglich telefonisch oder
> per E-Mail.
>
> This message is intended only for the use of the individual or entity to
> which it is addressed. If you have received this message in error, please
> delete the message and notify us immediately.
>
>
> --------------070003040807050803020008
> Content-Type: text/html; charset=ISO-8859-1
> Content-Transfer-Encoding: 7bit
>
> <html>
> <head>
> <meta content="text/html; charset=ISO-8859-1"
> http-equiv="Content-Type">
> </head>
> <body bgcolor="#FFFFFF" text="#000000">
> Hi,<br>
> <br>
> you are missing libpcap0.8 which is a dependency for the captagent.<br>
> <br>
> <br>
> BR<br>
> <br>
> Max M.<br>
> <br>
> Am 17.02.2012 16:31, schrieb Nelson Pereira:
> <blockquote
> cite="
> mid:CAC6cfSgZgOJQ0-X5ANsHEQnmt+AvV96404dU_nr53dTNdbcUoA@mail.gmail.com"
> type="cite">ok, tried to do the make install, getting the bellow:
> <div>
> <div>aurast:/usr/local/src/captagent #
> /usr/local/bin/captagent</div>
> <div>/usr/local/bin/captagent: error while loading shared
> libraries: libpcap.so.0.8: cannot open shared object file: No
> such file or directory</div>
> <div><br>
> </div>
> <div>Do i need to compile this?</div>
> <div><br>
> </div>
> <div>Also just tried running the captagent:</div>
> <div>
> <div>aurast:/usr/local/src/captagent # ./captagent</div>
> <div>./captagent: error while loading shared libraries:
> libpcap.so.0.8: cannot open shared object file: No such file
> or directory</div>
> <div><br>
> </div>
> </div>
> <div>What am I doing wrong?</div>
> <div><br>
> </div>
> <div>This is a SUSE SLES11 64bit server running asterisk 1.8.6</div>
> <div><br>
> </div>
> <div>Thanks</div>
> <div><br>
> </div>
> <div><br>
> </div>
> <br>
> <div class="gmail_quote">
> On Fri, Feb 17, 2012 at 10:24 AM, Nelson Pereira <span
> dir="ltr"><<a moz-do-not-send="true"
> href="mailto:kitkat0981@gmail.com">kitkat0981(a)gmail.com
> </a>></span>
> wrote:<br>
> <blockquote class="gmail_quote" style="margin:0 0 0
> .8ex;border-left:1px #ccc solid;padding-left:1ex">
> from the atttached kamailio.cfg file, what should be changed
> to get captagent receiver working in kamailio instead of
> port mirroring?
> <div><br>
> </div>
> <div>Thanks</div>
> <div class="HOEnZb">
> <div class="h5">
> <div><br>
> <br>
> <div class="gmail_quote">
> On Fri, Feb 17, 2012 at 7:29 AM, Alexandr Dubovikov
> <span dir="ltr"><<a moz-do-not-send="true"
> href="mailto:voip@start4.info" target="_blank">
> voip(a)start4.info</a>></span>
> wrote:<br>
> <blockquote class="gmail_quote" style="margin:0 0 0
> .8ex;border-left:1px #ccc solid;padding-left:1ex">
> <div bgcolor="#FFFFFF" text="#000000"> <br>
> The link has been not changed, you know it
> already:<br>
> <br>
> <a moz-do-not-send="true"
> href="http://code.google.com/p/homer/wiki/HOWTO"
> target="_blank">
> http://code.google.com/p/homer/wiki/HOWTO</a><br>
> <br>
> Homer Capture Agent (for all other unsupported
> system)<br>
> <br>
> if your SIP system (PBX, proxy) doesn't have a
> built-in capture agent with HEP or IPIP
> encapsulation support, you can use Homer Capture
> Agent (captagent). This is an external
> application (daemon) that collect SIP messages
> thru PCAPlib and send them to your capture
> server. The captagent support IPv4 and IPv6.<br>
> <br>
> preventing your next question: the captagent
> your can find in the git.<br>
> <br>
> <a moz-do-not-send="true"
> href="
> http://code.google.com/p/homer/source/browse/"
> target="_blank">
> http://code.google.com/p/homer/source/browse/</a><br>
> <br>
> <br>
> Wbr,<br>
> Alexandr
> <div>
> <div><br>
> <br>
> <br>
> 17.02.2012 13:15, Nelson Pereira wrote:
> <blockquote type="cite">
> <div>Can captagent be installed on a
> asterisk server? If so, is there a
> howto?<br>
> <br>
> Sent from my iPhone4 on IOS4</div>
> <div><br>
> On Feb 17, 2012, at 7:07 AM, Alexandr
> Dubovikov <<a moz-do-not-send="true"
> href="mailto:voip@start4.info"
> target="_blank">voip(a)start4.info</a>>
>
> wrote:<br>
> <br>
> </div>
> <blockquote type="cite">
> <div> Hi,<br>
> <br>
> start two captagents instance, each on
> own interface and duplicate all
> traffic to your kamailio node. (HEP
> protocol)<br>
> <br>
> Wbr,<br>
> Alexandr<br>
> <br>
> 16.02.2012 17:51, Nelson Pereira
> wrote:
> <blockquote type="cite">I would like
> to know if someone can show me an
> example of there setup configuration
> in kamailio.cfg for capturing
> packets comming in from a mirror
> port.
> <div>The reason I ask is that if I
> do a TCPDUMP on the server, I see
> all traffic to and from different
> sources on my Voice network.</div>
> <div><br>
> </div>
> <div>But when I use Homer SIPCAPTURE
> which uses Kamailio in the
> background, I only see traffic
> sent FROM my PBX but not seing the
> traffic comming back to
> it. </div>
> <div><br>
> </div>
> <div>I mean I only see one side of
> the call, yet TCPDUMP confirmed I
> see everything....</div>
> <div><br>
> </div>
> <div>What am I missing ?</div>
> <div><br>
> </div>
> <div>Thanks</div>
> <div><br>
> </div>
> <div>NP</div>
> <br>
> <fieldset></fieldset>
> <br>
>
> <pre>_______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> <a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org"
> target="_blank">sr-users(a)lists.sip-router.org</a>
> <a moz-do-not-send="true" href="
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
> target="_blank">
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
> </pre>
> </blockquote>
> <br>
> </div>
> </blockquote>
> <blockquote type="cite">
>
> <div><span>_______________________________________________</span><br>
> <span>SIP Express Router (SER) and
> Kamailio (OpenSER) - sr-users
> mailing list</span><br>
> <span><a moz-do-not-send="true"
> href="mailto:
> sr-users(a)lists.sip-router.org"
> target="_blank">
> sr-users(a)lists.sip-router.org</a></span><br>
> <span><a moz-do-not-send="true"
> href="
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
> target="_blank">
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> </a></span><br>
> </div>
> </blockquote>
> <br>
> <fieldset></fieldset>
> <br>
>
> <pre>_______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> <a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org"
> target="_blank">sr-users(a)lists.sip-router.org</a>
> <a moz-do-not-send="true" href="
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
> target="_blank">
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
> </pre>
> </blockquote>
> <br>
> </div>
> </div>
> </div>
> <br>
> _______________________________________________<br>
> SIP Express Router (SER) and Kamailio (OpenSER) -
> sr-users mailing list<br>
> <a moz-do-not-send="true"
> href="mailto:sr-users@lists.sip-router.org"
> target="_blank">sr-users(a)lists.sip-router.org
> </a><br>
> <a moz-do-not-send="true"
> href="
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
> target="_blank">
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
> <br>
> </blockquote>
> </div>
> <br>
> </div>
> </div>
> </div>
> </blockquote>
> </div>
> <br>
> </div>
> <br>
> <fieldset class="mimeAttachmentHeader"></fieldset>
> <br>
> <pre wrap="">_______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> <a class="moz-txt-link-abbreviated" href="mailto:
> sr-users(a)lists.sip-router.org">sr-users(a)lists.sip-router.org</a>
> <a class="moz-txt-link-freetext" href="
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
> </pre>
> </blockquote>
> <br>
> <br>
> <pre class="moz-signature" cols="72">--
> 42com Telecommunication GmbH
> Straße der Pariser Kommune 12-16 / D-10243 Berlin
>
> E-mail: <a class="moz-txt-link-abbreviated" href="mailto:mm@42com.com">
> mm(a)42com.com</a>
> Homepage: <a class="moz-txt-link-abbreviated" href="http://www.42com.com">
> www.42com.com</a>
>
> Firmenangaben/Company information:
>
> Handelsregister/Commercial register: Amtsgericht Berlin HRB 99071 B
> Umsatzsteuer-ID/VAT-ID: DE223812306, Geschäftsführer/CEO: Thomas
> Reinig, Alexander Reinig
>
>
> Diese E-Mail enthält Informationen von 42com Telecommunication GmbH.
> Diese sind möglicherweise vertraulich und ausschließlich
> für den Adressaten bestimmt. Sollten Sie diese elektronische Nachricht
> irrtümlicherweise erhalten haben, so informieren Sie uns bitte
> unverzüglich telefonisch oder per E-Mail.
>
> This message is intended only for the use of the individual or entity to
> which it is addressed. If you have received this message in error, please
> delete the message and notify us immediately.</pre>
> </body>
> </html>
>
> --------------070003040807050803020008--
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users(a)lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
I would like to know if someone can show me an example of there setup
configuration in kamailio.cfg for capturing packets comming in from a
mirror port.
The reason I ask is that if I do a TCPDUMP on the server, I see all traffic
to and from different sources on my Voice network.
But when I use Homer SIPCAPTURE which uses Kamailio in the background, I
only see traffic sent FROM my PBX but not seing the traffic comming back to
it.
I mean I only see one side of the call, yet TCPDUMP confirmed I see
everything....
What am I missing ?
Thanks
NP
Hello Uri
I had similar needs and I found the ndb_redis module more suited for that
type of task. Instead of a tree you have a hash like this: tname tprefix
tvalue. If you do a hget nts $avp(DID) and you get a not null value you
have found your exact match. It works very well for me and the time it
takes for that "query" is barely noticeable. Of course redis does not
address items like persistence, etc the same way a rdbms does.
Hope it helps.
Regards
Javi
On Thu, Feb 16, 2012 at 12:00 PM, <sr-users-request(a)lists.sip-router.org>wrote:
> Send sr-users mailing list submissions to
> sr-users(a)lists.sip-router.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> or, via email, send a message with subject or body 'help' to
> sr-users-request(a)lists.sip-router.org
>
> You can reach the person managing the list at
> sr-users-owner(a)lists.sip-router.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of sr-users digest..."
>
>
> Today's Topics:
>
> 1. how to match exact string value in mtree (Uri Shacked)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 16 Feb 2012 12:54:50 +0200
> From: Uri Shacked <ushacked(a)gmail.com>
> Subject: [SR-Users] how to match exact string value in mtree
> To: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -
> Users Mailing List" <sr-users(a)lists.sip-router.org>
> Message-ID:
> <CAMMbDhTFNXAE-K88=AeMjO7AnA_QJV3Ajj3AH-AxemXN3ze6HQ(a)mail.gmail.com
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> I am using Mtree to match prefix numbers, some of them starts with 0 or
> characters like D for example.
> so, the mtree param is like this:
>
> modparam("mtree", "db_url", CFGDB)
> modparam("mtree", "mtree", "name=nts;dbtable=service_numbers_view;type=0;")
> modpmodparam("mtree", "char_list", "0123456789*+#YMDabcdefgh")
> modparam("mtree", "pv_value", "$avp(mtval)")
> modparam("mtree", "pv_values", "$avp(mtvals)")
>
> The thing is, that i tried all:
>
> if(!mt_match("nts", "$avp(DID)","1"))
> if(!mt_match("nts", "$avp(DID)","2"))
> if(!mt_match("nts", "$avp(DID)","0"))
>
> and lets say i have the both prefix in the nts mtree:
> 09555
> 09555333
>
> And the prefix i search for is $avp(DID)=09555444
>
> I allwasy get the 09555 because it is the longest match.
> I need exact match.....
>
> how do i do that?
>
Hi all
I have started making some tests with the ndb_redis module. So far we have
not stressed the module (no more than 5 HGET commands/second at maximum).
It works well, but with at some point it starts failing. The failures are
easily found because the logs always show this:
INFO: <core> [main.c:811]: INFO: signal 13 received
After that the redis value is always null. If I restart kamailio it starts
working again.
I've run kamailio with debug=4 but I haven't seen more useful information.
On the redis side, I could find nothing in the logs either, the number of
clientes connected is alway much less than the configured maximum, Any idea?
On the other hand, if I restart redis we need to restart kamailio to
restore the connections. Is the reconnection to redis on the roadmap?
Thanks in advance
Regards
Javi
Hi,
Kamailio is exiting with a segmentation fault when trying to do a save("location"). Here is some information I gathered.
Feb 16 15:30:19 ubuntu /usr/local/sbin/kamailio[25721]: DEBUG: <core> [parser/msg_parser.c:103]: found end of header
Feb 16 15:30:19 ubuntu /usr/local/sbin/kamailio[25721]: ERROR: <core> [db.c:435]: invalid parameter value
Feb 16 15:30:19 ubuntu /usr/local/sbin/kamailio[25721]: ERROR: usrloc [udomain.c:564]: failed to use table location
Feb 16 15:30:19 ubuntu kernel: [171540.056663] kamailio[25721]: segfault at 89 ip 00007fa1f9a41452 sp 00007fff971a3af0 error 4 in usrloc.so[7fa1f9a37000+1f000]
Feb 16 15:30:19 ubuntu /usr/local/sbin/kamailio[25708]: ALERT: <core> [main.c:751]: child process 25720 exited by a signal 11
Feb 16 15:30:19 ubuntu /usr/local/sbin/kamailio[25708]: ALERT: <core> [main.c:754]: core was generated
Feb 16 15:30:19 ubuntu /usr/local/sbin/kamailio[25708]: INFO: <core> [main.c:766]: INFO: terminating due to SIGCHLD
Core was generated by `kamailio -w /home/core'.
Program terminated with signal 11, Segmentation fault.
#0 db_insert_ucontact (_c=0x7f5f8f737eb0) at ucontact.c:474
474 vals[11].val.str_val = _c->sock->sock_str;
(gdb) bt
#0 db_insert_ucontact (_c=0x7f5f8f737eb0) at ucontact.c:474
#1 0x00007f5f916d9649 in insert_ucontact (_r=<optimized out>, _contact=<optimized out>, _ci=<optimized out>, _c=0x7fff52bbeb88) at urecord.c:473
#2 0x00007f5f914b785f in insert_contacts (_m=0x7f5f93d7f458, _d=0x7f5f8f72f680, _a=0x7fff52bbec00) at save.c:428
#3 0x00007f5f914b8d10 in add_contacts (_mode=1, _a=0x7fff52bbec00, _d=0x7f5f8f72f680, _m=0x7f5f93d7f458) at save.c:737
#4 save (_m=0x7f5f93d7f458, _d=0x7f5f8f72f680, _cflags=4) at save.c:790
#5 0x000000000041ba87 in do_action (h=0x7fff52bbf5d0, a=0x7f5f93d7f238, msg=0x7f5f93d7f458) at action.c:1128
#6 0x000000000041abe2 in run_actions (h=0x7fff52bbf5d0, a=0x7f5f93d7f238, msg=0x7f5f93d7f458) at action.c:1610
#7 0x000000000041c05b in do_action (h=0x7fff52bbf5d0, a=0x7f5f93d7fe08, msg=0x7f5f93d7f458) at action.c:1107
#8 0x000000000041abe2 in run_actions (h=0x7fff52bbf5d0, a=0x7f5f93d7fe08, msg=0x7f5f93d7f458) at action.c:1610
#9 0x0000000000422fa2 in run_top_route (a=0x7f5f93d7fe08, msg=0x7f5f93d7f458, c=<optimized out>) at action.c:1683
#10 0x00000000004b061e in receive_msg (buf=<optimized out>, len=<optimized out>, rcv_info=<optimized out>) at receive.c:207
#11 0x00007f5f91b038b0 in raw_capture_rcv_loop (rsock=5, port1=5060, port2=8933, ipip=0) at sipcapture.c:1518
#12 0x00007f5f91b03e1f in init_rawsock_children () at sipcapture.c:572
#13 0x00007f5f91b04033 in child_init (rank=<optimized out>) at sipcapture.c:542
#14 0x0000000000507a0f in init_mod_child (m=0x7f5f93d7b2b0, rank=0) at sr_module.c:886
#15 0x0000000000507974 in init_mod_child (m=0x7f5f93d7b668, rank=0) at sr_module.c:883
#16 0x0000000000507974 in init_mod_child (m=0x7f5f93d7c178, rank=0) at sr_module.c:883
#17 0x0000000000507974 in init_mod_child (m=0x7f5f93d7c4b0, rank=0) at sr_module.c:883
#18 0x0000000000476149 in main_loop () at main.c:1661
#19 0x000000000041a940 in main (argc=<optimized out>, argv=0x7fff52bbfd68) at main.c:2475
Any idea why this is happening? Is there something in the REGISTER message that is causing this?
Thanks,
Simpson
Hello,
On 2/17/12 1:04 PM, Javier Gallart wrote:
> Hi Daniel,
>
> no, in order to find the best match we do a manual trick using
> the s.prefixes transformation (I think you suggested that).
could be, at least is the way I do prefix matching with mysql. Postgres,
on the other hand, afaik, has an index plugin to match the longest
prefix, might not be in default distro, but can be found on the net for
sure.
> We start with the full $rU and stop when we find a non-null value.
> This kamailio is serving many thousands of calls per hour, and the
> response time is pretty much the same as when we used the mtree
> module. For us , using redis has the advantage of being able to load
> the tree data faster than when we used postgres without the need to
> perform a mtree reload.
Loading huge amount of records from mysql takes time indeed.
Maybe prefix matching will be added in redis in the future, or scripted
server side in lua, as I understood it has such feature. Another option
would be to add a custom command in kamailio like redis_cmd_pmatch() to
do internally these prefix-based commands until a match, could simplify
the config if it becomes something very popular.
Also, I forgot about the other solution in kamailio - pdb module written
by 1&1 for number portability:
* http://kamailio.org/docs/modules/stable/modules/pdb.html
Just mentioning it here for let it be known, if redis is working fine
for you, makes no sense to look for other solutions.
Cheers,
Daniel
>
> Regards
>
> Javi
>
>
> On Fri, Feb 17, 2012 at 10:25 AM, Daniel-Constantin Mierla
> <miconda(a)gmail.com <mailto:miconda@gmail.com>> wrote:
>
> Hello Javier,
>
> one question about redis, can it do longest prefix matching or all
> prefixes match?
>
> Cheers,
> Daniel
>
>
> On 2/16/12 2:51 PM, Javier Gallart wrote:
>> Hello Uri
>>
>> I had similar needs and I found the ndb_redis module more suited
>> for that type of task. Instead of a tree you have a hash like
>> this: tname tprefix tvalue. If you do a hget nts $avp(DID) and
>> you get a not null value you have found your exact match. It
>> works very well for me and the time it takes for that "query" is
>> barely noticeable. Of course redis does not address items like
>> persistence, etc the same way a rdbms does.
>> Hope it helps.
>>
>> Regards
>>
>> Javi
>>
>> On Thu, Feb 16, 2012 at 12:00 PM,
>> <sr-users-request(a)lists.sip-router.org
>> <mailto:sr-users-request@lists.sip-router.org>> wrote:
>>
>> Send sr-users mailing list submissions to
>> sr-users(a)lists.sip-router.org
>> <mailto:sr-users@lists.sip-router.org>
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>> or, via email, send a message with subject or body 'help' to
>> sr-users-request(a)lists.sip-router.org
>> <mailto:sr-users-request@lists.sip-router.org>
>>
>> You can reach the person managing the list at
>> sr-users-owner(a)lists.sip-router.org
>> <mailto:sr-users-owner@lists.sip-router.org>
>>
>> When replying, please edit your Subject line so it is more
>> specific
>> than "Re: Contents of sr-users digest..."
>>
>>
>> Today's Topics:
>>
>> 1. how to match exact string value in mtree (Uri Shacked)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Thu, 16 Feb 2012 12:54:50 +0200
>> From: Uri Shacked <ushacked(a)gmail.com
>> <mailto:ushacked@gmail.com>>
>> Subject: [SR-Users] how to match exact string value in mtree
>> To: "SIP Router - Kamailio (OpenSER) and SIP Express Router
>> (SER) -
>> Users Mailing List" <sr-users(a)lists.sip-router.org
>> <mailto:sr-users@lists.sip-router.org>>
>> Message-ID:
>> <CAMMbDhTFNXAE-K88=AeMjO7AnA_QJV3Ajj3AH-AxemXN3ze6HQ(a)mail.gmail.com
>> <mailto:AeMjO7AnA_QJV3Ajj3AH-AxemXN3ze6HQ@mail.gmail.com>>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> Hi,
>>
>> I am using Mtree to match prefix numbers, some of them starts
>> with 0 or
>> characters like D for example.
>> so, the mtree param is like this:
>>
>> modparam("mtree", "db_url", CFGDB)
>> modparam("mtree", "mtree",
>> "name=nts;dbtable=service_numbers_view;type=0;")
>> modpmodparam("mtree", "char_list", "0123456789*+#YMDabcdefgh")
>> modparam("mtree", "pv_value", "$avp(mtval)")
>> modparam("mtree", "pv_values", "$avp(mtvals)")
>>
>> The thing is, that i tried all:
>>
>> if(!mt_match("nts", "$avp(DID)","1"))
>> if(!mt_match("nts", "$avp(DID)","2"))
>> if(!mt_match("nts", "$avp(DID)","0"))
>>
>> and lets say i have the both prefix in the nts mtree:
>> 09555
>> 09555333
>>
>> And the prefix i search for is $avp(DID)=09555444
>>
>> I allwasy get the 09555 because it is the longest match.
>> I need exact match.....
>>
>> how do i do that?
>>