<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1254">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Hi Sebastian,</p>
<p><br>
</p>
<p>Thanks for your reply.</p>
<p><br>
</p>
<p>Today I am trying to install rtpengine as suggested by you.Could you please tell me from which part of the script I need to add  rtpengine functions as my client is getting 183 from kamailio as of now.</p>
<p><br>
</p>
<p>My architecture is like this,<br>
</p>
<p>external ipv4 network(port 5060)----------rtpproxy(ipv4)--kamailio(ipv6)(port 5070)----------client(ipv4)(port 5077)</p>
<p><br>
</p>
<p>Please look at the attached wireshark capture.</p>
<p><br>
</p>
<p>Highly appreciate any suggestion as always.<br>
</p>
<p><br>
</p>
<p>Thanks,</p>
<p>Narayan<br>
</p>
<p><br>
</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> sr-users <sr-users-bounces@lists.kamailio.org> on behalf of sr-users-request@lists.kamailio.org <sr-users-request@lists.kamailio.org><br>
<b>Sent:</b> Monday, July 3, 2017 10:00:02 AM<br>
<b>To:</b> sr-users@lists.kamailio.org<br>
<b>Subject:</b> sr-users Digest, Vol 146, Issue 2</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Send sr-users mailing list submissions to<br>
        sr-users@lists.kamailio.org<br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
or, via email, send a message with subject or body 'help' to<br>
        sr-users-request@lists.kamailio.org<br>
<br>
You can reach the person managing the list at<br>
        sr-users-owner@lists.kamailio.org<br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of sr-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re: host to get name of local server (Daniel-Constantin Mierla)<br>
   2. Re: remote ip address of sender and receiver<br>
      (Daniel-Constantin Mierla)<br>
   3. Re: remote ip address of sender and receiver<br>
      (Daniel-Constantin Mierla)<br>
   4. Re: Question regarding calling a shell script from kamailio<br>
      (Daniel-Constantin Mierla)<br>
   5. Re: Compiling errors (Daniel-Constantin Mierla)<br>
   6. Re: evapi module and async_relay (Daniel-Constantin Mierla)<br>
   7. Re: Using lock() correctly (Sebastian Damm)<br>
   8. Re: call forward on no answer (Daniel-Constantin Mierla)<br>
   9. Re: How to convert ipv6 to ipv4 address inside message    body<br>
      (Sebastian Damm)<br>
  10. Re: UAC auth for incoming call (Daniel-Constantin Mierla)<br>
  11. Re: drouting / do_routing / prefix unknown<br>
      (Daniel-Constantin Mierla)<br>
  12. Re: Using lock() correctly (Daniel-Constantin Mierla)<br>
  13. Re: Using lock() correctly (Sebastian Damm)<br>
  14. Re: Using lock() correctly (Daniel-Constantin Mierla)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 3 Jul 2017 09:03:16 +0200<br>
From: Daniel-Constantin Mierla <miconda@gmail.com><br>
To: "Kamailio (SER) - Users Mailing List"<br>
        <sr-users@lists.kamailio.org>, Henry Fernandes <henry@usinternet.com><br>
Subject: Re: [SR-Users] host to get name of local server<br>
Message-ID: <9c3f6b62-d79f-1376-b0f5-1ccbb69e37c1@gmail.com><br>
Content-Type: text/plain; charset="windows-1252"<br>
<br>
Hello,<br>
<br>
<br>
On 29.06.17 18:11, Henry Fernandes wrote:<br>
> We have multiple Kamailio 4.4.x servers and I am setting up stats<br>
> tracking.  I would like to track the stats for each individual<br>
> Kamailio server separately like so:<br>
><br>
>     kamailio_1.sip.register.count<br>
>     kamailio_2.sip.register.count<br>
>     kamailio_3.sip.register.count<br>
><br>
> The problem is that we use one common file (in version control) for<br>
> our Kamailio configuration.  Thus, I can’t just hardcode the hostname<br>
> into the file because it will be the same for each server.<br>
><br>
> Does anyone have a solution for me?  Is there a variable that provides<br>
> the hostname or is there something else I can do?<br>
><br>
> Ideally, I’d love to be able to do something like this.<br>
><br>
>     statsd_incr($host_name + “.sip.register.count");<br>
><br>
><br>
<br>
one option would be to define it via command line parameter with -A<br>
option. Your start script can set it using the usual shell scripts.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
-- <br>
Daniel-Constantin Mierla<br>
<a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">
www.linkedin.com/in/miconda</a><br>
Kamailio Advanced Training - <a href="http://www.asipto.com">www.asipto.com</a><br>
Kamailio World Conference - <a href="http://www.kamailioworld.com">www.kamailioworld.com</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.kamailio.org/pipermail/sr-users/attachments/20170703/4b089870/attachment-0001.html">http://lists.kamailio.org/pipermail/sr-users/attachments/20170703/4b089870/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Mon, 3 Jul 2017 09:06:27 +0200<br>
From: Daniel-Constantin Mierla <miconda@gmail.com><br>
To: "Kamailio (SER) - Users Mailing List"<br>
        <sr-users@lists.kamailio.org>, vuleetu <vuleetu@gmail.com>,<br>
        sr-users@lists.sip-router.org<br>
Subject: Re: [SR-Users] remote ip address of sender and receiver<br>
Message-ID: <4b3ae5cc-360d-1ef0-4315-568b4dfd812a@gmail.com><br>
Content-Type: text/plain; charset=utf-8<br>
<br>
Hello,<br>
<br>
<br>
On 29.06.17 12:45, vuleetu wrote:<br>
> Hi, all<br>
><br>
>    Is there any way to get remote ip address of both sender($si) and<br>
> receiver(?)? I am configuring kamailio with multiple rtpproxy sets.<br>
> Basically, rtpproxy set will be choosed based on the country those ip<br>
> addresses of caller and callee belong to. Lets say if caller and<br>
> callee are both in US, set 1 will selected. If they are not in the<br>
> same country, set 2 will be selected.  I dont know if there is any way<br>
> to do that.<br>
><br>
source IP is $si.<br>
<br>
For target IP, I assume you use registrar/usrloc - after lookup<br>
location, if $du is not null, then $dd gives the address, otherwise $rd.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
-- <br>
Daniel-Constantin Mierla<br>
<a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">
www.linkedin.com/in/miconda</a><br>
Kamailio Advanced Training - <a href="http://www.asipto.com">www.asipto.com</a><br>
Kamailio World Conference - <a href="http://www.kamailioworld.com">www.kamailioworld.com</a><br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Mon, 3 Jul 2017 09:06:27 +0200<br>
From: Daniel-Constantin Mierla <miconda@gmail.com><br>
To: "Kamailio (SER) - Users Mailing List"<br>
        <sr-users@lists.kamailio.org>, vuleetu <vuleetu@gmail.com>,<br>
        sr-users@lists.sip-router.org<br>
Subject: Re: [SR-Users] remote ip address of sender and receiver<br>
Message-ID: <4b3ae5cc-360d-1ef0-4315-568b4dfd812a@gmail.com><br>
Content-Type: text/plain; charset=utf-8<br>
<br>
Hello,<br>
<br>
<br>
On 29.06.17 12:45, vuleetu wrote:<br>
> Hi, all<br>
><br>
>    Is there any way to get remote ip address of both sender($si) and<br>
> receiver(?)? I am configuring kamailio with multiple rtpproxy sets.<br>
> Basically, rtpproxy set will be choosed based on the country those ip<br>
> addresses of caller and callee belong to. Lets say if caller and<br>
> callee are both in US, set 1 will selected. If they are not in the<br>
> same country, set 2 will be selected.  I dont know if there is any way<br>
> to do that.<br>
><br>
source IP is $si.<br>
<br>
For target IP, I assume you use registrar/usrloc - after lookup<br>
location, if $du is not null, then $dd gives the address, otherwise $rd.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
-- <br>
Daniel-Constantin Mierla<br>
<a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">
www.linkedin.com/in/miconda</a><br>
Kamailio Advanced Training - <a href="http://www.asipto.com">www.asipto.com</a><br>
Kamailio World Conference - <a href="http://www.kamailioworld.com">www.kamailioworld.com</a><br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Mon, 3 Jul 2017 09:09:27 +0200<br>
From: Daniel-Constantin Mierla <miconda@gmail.com><br>
To: "Kamailio (SER) - Users Mailing List"<br>
        <sr-users@lists.kamailio.org>, Anuradha Selvarajan<br>
        <anuradha.selvarajan@ericsson.com><br>
Subject: Re: [SR-Users] Question regarding calling a shell script from<br>
        kamailio<br>
Message-ID: <8158f4b2-d1eb-c487-43bc-4c950e98d0d6@gmail.com><br>
Content-Type: text/plain; charset="windows-1252"<br>
<br>
Hello,<br>
<br>
your first email was answered:<br>
<br>
  - <a href="https://lists.kamailio.org/pipermail/sr-users/2017-June/097640.html">
https://lists.kamailio.org/pipermail/sr-users/2017-June/097640.html</a><br>
<br>
The exec_avp() should allow you to get back values in kamailio.cfg, iirc.<br>
<br>
Cheers,<br>
daniel<br>
<br>
On 29.06.17 18:58, Anuradha Selvarajan wrote:<br>
><br>
> Hello,<br>
><br>
>  <br>
><br>
> Resending as I didn’t get any reply yet. I tried to use exec_msg to<br>
> call a external script but that is not working as expected (used it<br>
> under request_route function as suggested). Also exec_msg doesn’t<br>
> store any return value so not sure if this will help. Like mentioned<br>
> in my previous email, looking for calling a external shell script and<br>
> use the return value in fork.cfg file. I need help with this asap.<br>
> Appreciate some help!<br>
><br>
>  <br>
><br>
> Thanks a lot!<br>
><br>
> Anu<br>
><br>
>  <br>
><br>
> *From:* Anuradha Selvarajan<br>
> *Sent:* Wednesday, June 28, 2017 10:03 AM<br>
> *To:* Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org><br>
> *Subject:* Question regarding calling a shell script from kamailio<br>
><br>
>  <br>
><br>
> Hello,<br>
><br>
>  <br>
><br>
> I am using fork.cfg file and I want to call a shell script (which has<br>
> curl commands extracting value from database and returns the value)<br>
> and use the value in the fork.cfg. How can I do it?<br>
><br>
>  <br>
><br>
> Appreciate your help!<br>
><br>
>  <br>
><br>
> Thanksm<br>
> Anu<br>
><br>
><br>
><br>
> _______________________________________________<br>
> Kamailio (SER) - Users Mailing List<br>
> sr-users@lists.kamailio.org<br>
> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
-- <br>
Daniel-Constantin Mierla<br>
<a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">
www.linkedin.com/in/miconda</a><br>
Kamailio Advanced Training - <a href="http://www.asipto.com">www.asipto.com</a><br>
Kamailio World Conference - <a href="http://www.kamailioworld.com">www.kamailioworld.com</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.kamailio.org/pipermail/sr-users/attachments/20170703/34b5c761/attachment-0001.html">http://lists.kamailio.org/pipermail/sr-users/attachments/20170703/34b5c761/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Mon, 3 Jul 2017 09:11:00 +0200<br>
From: Daniel-Constantin Mierla <miconda@gmail.com><br>
To: Yasin CANER <yasin.caner@netgsm.com.tr>, "Kamailio (SER) - Users<br>
        Mailing List" <sr-users@lists.kamailio.org><br>
Subject: Re: [SR-Users] Compiling errors<br>
Message-ID: <794e0e9f-625b-cb07-7554-4473d9244067@gmail.com><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hello,<br>
<br>
thanks for the infor, I thought it is a new compiler version, because<br>
travis-ci and in my environment there was no compile error reported.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<br>
On 29.06.17 09:54, Yasin CANER wrote:<br>
><br>
> Hello ,<br>
><br>
> gcc is updated from  4.4.7 20120313 (Red Hat 4.4.7-16) to 4.4.7<br>
> 20120313 (Red Hat 4.4.7-18) and then kamailio cloned from git again.<br>
> it didnt give any error.<br>
><br>
> thanks.<br>
><br>
><br>
> 29.06.2017 10:35 tarihinde Daniel-Constantin Mierla yazdý:<br>
>><br>
>> Hello,<br>
>><br>
>> what's your compiler (and its version)? clang was dealing fine with<br>
>> this case.<br>
>><br>
>> Anyhow, should be fixed in master branch, just fetch latest version.<br>
>><br>
>> Cheers,<br>
>> Daniel<br>
>><br>
>><br>
>> On 29.06.17 09:23, Yasin CANER wrote:<br>
>>><br>
>>> Hello,<br>
>>><br>
>>><br>
>>>  <br>
>>><br>
>>> on compiling git master branch gives error as below. Could you check<br>
>>> it please.<br>
>>><br>
>>> Cheers.<br>
>>><br>
>>><br>
>>><br>
>>> make include_modules="acc_radius auth_radius misc_radius" cfg<br>
>>><br>
>>> make all<br>
>>><br>
>>> make[3]: `libsrutils.so.1.0' is up to date.<br>
>>> LD (gcc) [M jsonrpcs.so]                jsonrpcs.so<br>
>>> CC (gcc) [M keepalive.so]               keepalive_api.o<br>
>>> In file included from keepalive_api.c:40:<br>
>>> api.h:39: error: redefinition of typedef ‘ka_statechanged_f’<br>
>>> keepalive.h:48: note: previous declaration of ‘ka_statechanged_f’<br>
>>> was here<br>
>>> make[2]: *** [keepalive_api.o] Error 1<br>
>>> make[1]: *** [modules] Error 1<br>
>>> make[1]: Leaving directory `/usr/src/kamailio/src'<br>
>>> make: *** [all] Error 2<br>
>>><br>
>>> -- <br>
>>> *Yasin CANER*<br>
>>> Communication Tech Engineer<br>
>>> 0850 303 0 303 / 0312 911 0 911<br>
>>> <a href="http://www.netgsm.com.tr">www.netgsm.com.tr</a> <<a href="https://www.netgsm.com.tr">https://www.netgsm.com.tr</a>><br>
>>><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> Kamailio (SER) - Users Mailing List<br>
>>> sr-users@lists.kamailio.org<br>
>>> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>><br>
>> -- <br>
>> Daniel-Constantin Mierla<br>
>> <a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">
www.linkedin.com/in/miconda</a><br>
>> Kamailio Advanced Training - <a href="http://www.asipto.com">www.asipto.com</a><br>
>> Kamailio World Conference - <a href="http://www.kamailioworld.com">www.kamailioworld.com</a><br>
><br>
> -- <br>
> *Yasin CANER*<br>
> Communication Tech Engineer<br>
> 0850 303 0 303 / 0312 911 0 911<br>
> <a href="http://www.netgsm.com.tr">www.netgsm.com.tr</a> <<a href="https://www.netgsm.com.tr">https://www.netgsm.com.tr</a>><br>
><br>
<br>
-- <br>
Daniel-Constantin Mierla<br>
<a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">
www.linkedin.com/in/miconda</a><br>
Kamailio Advanced Training - <a href="http://www.asipto.com">www.asipto.com</a><br>
Kamailio World Conference - <a href="http://www.kamailioworld.com">www.kamailioworld.com</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.kamailio.org/pipermail/sr-users/attachments/20170703/236ea542/attachment-0001.html">http://lists.kamailio.org/pipermail/sr-users/attachments/20170703/236ea542/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 6<br>
Date: Mon, 3 Jul 2017 09:18:36 +0200<br>
From: Daniel-Constantin Mierla <miconda@gmail.com><br>
To: "Kamailio (SER) - Users Mailing List"<br>
        <sr-users@lists.kamailio.org>, Diego Nadares <dnadares@gmail.com><br>
Subject: Re: [SR-Users] evapi module and async_relay<br>
Message-ID: <2e56f182-5d48-5eff-fabd-68a0d2850757@gmail.com><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hello,<br>
<br>
Can you check with netstat the recv and send queues for the sockets used<br>
in this communication? If the recv queu for receiving up is big, then it<br>
cannot handle the traffic fast enough.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<br>
On 28.06.17 21:58, Diego Nadares wrote:<br>
> Sorry, maybe this log clarifies what I meant:<br>
><br>
> These are the messages that my client read. It's connected to<br>
> 127.0.0.1 to kamailio evapi.<br>
><br>
> 2017-06-27 19:29:50,313 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:50,401 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:50,444 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:50,456 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:50,521 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:50,565 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:50,604 - routing - INFO - netstrings in message 2<br>
> 2017-06-27 19:29:50,649 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:50,687 - routing - INFO - netstrings in message 2<br>
> 2017-06-27 19:29:50,730 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:50,857 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:50,896 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:50,921 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:50,929 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:51,029 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:51,180 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:51,235 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:51,279 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:51,337 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:51,380 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:51,491 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:51,521 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:51,630 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:51,706 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:51,787 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:51,893 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:51,917 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:51,929 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:51,970 - routing - INFO - netstrings in message 2<br>
> 2017-06-27 19:29:52,016 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:52,345 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:52,363 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:52,553 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:52,592 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:52,605 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:52,766 - routing - INFO - netstrings in message 1<br>
> 2017-06-27 19:29:53,002 - routing - INFO - netstrings in message 5<br>
> 2017-06-27 19:29:53,226 - routing - INFO - netstrings in message 4<br>
> 2017-06-27 19:29:54,716 - routing - INFO - netstrings in message 15<br>
> 2017-06-27 19:29:56,260 - routing - INFO - netstrings in message 30<br>
> 2017-06-27 19:29:59,183 - routing - INFO - netstrings in message 52<br>
> 2017-06-27 19:30:04,104 - routing - INFO - netstrings in message 77<br>
> 2017-06-27 19:30:12,158 - routing - INFO - netstrings in message 128<br>
> 2017-06-27 19:30:24,277 - routing - INFO - netstrings in message 180<br>
> 2017-06-27 19:30:42,990 - routing - INFO - netstrings in message 327<br>
> 2017-06-27 19:31:20,273 - routing - INFO - netstrings in message 645<br>
><br>
> I hope this answer your question.<br>
><br>
> Cheers,<br>
><br>
> Diego<br>
><br>
><br>
> 2017-06-28 12:04 GMT-03:00 Alex Balashov <abalashov@evaristesys.com<br>
> <<a href="mailto:abalashov@evaristesys.com">mailto:abalashov@evaristesys.com</a>>>:<br>
><br>
>     On Wed, Jun 28, 2017 at 11:59:31AM -0300, Diego Nadares wrote:<br>
><br>
>     > It's weird. When sends 1 or 2 net strings per message I see that<br>
>     my client<br>
>     > receives ~18 messages per second. When starts to grow the amount of<br>
>     > netstrings the messages received decrease to 1 per second and fewer.<br>
><br>
>     Do you mean that the objective rate at which the client receives the<br>
>     messages decreases, or that a very large amount of them end up<br>
>     buffered<br>
>     into a smaller number of packets, with the same effective throughput?<br>
><br>
>     -- Alex<br>
><br>
>     --<br>
>     Alex Balashov | Principal | Evariste Systems LLC<br>
><br>
>     Tel: +1-706-510-6800 <tel:%2B1-706-510-6800> / +1-800-250-5920<br>
>     <tel:%2B1-800-250-5920> (toll-free)<br>
>     Web: <a href="http://www.evaristesys.com/">http://www.evaristesys.com/</a>,
<a href="http://www.csrpswitch.com/">http://www.csrpswitch.com/</a><br>
><br>
>     _______________________________________________<br>
>     Kamailio (SER) - Users Mailing List<br>
>     sr-users@lists.kamailio.org <<a href="mailto:sr-users@lists.kamailio.org">mailto:sr-users@lists.kamailio.org</a>><br>
>     <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>     <<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Kamailio (SER) - Users Mailing List<br>
> sr-users@lists.kamailio.org<br>
> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
-- <br>
Daniel-Constantin Mierla<br>
<a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">
www.linkedin.com/in/miconda</a><br>
Kamailio Advanced Training - <a href="http://www.asipto.com">www.asipto.com</a><br>
Kamailio World Conference - <a href="http://www.kamailioworld.com">www.kamailioworld.com</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.kamailio.org/pipermail/sr-users/attachments/20170703/04946be7/attachment-0001.html">http://lists.kamailio.org/pipermail/sr-users/attachments/20170703/04946be7/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 7<br>
Date: Mon, 3 Jul 2017 10:04:52 +0200<br>
From: Sebastian Damm <damm@sipgate.de><br>
To: "Kamailio (SER) - Users Mailing List"<br>
        <sr-users@lists.kamailio.org><br>
Subject: Re: [SR-Users] Using lock() correctly<br>
Message-ID:<br>
        <CABkWSFyB4PaGiZzPWk6sKD4_RMxapZnqap8B3wLbzqKMHJm+LA@mail.gmail.com><br>
Content-Type: text/plain; charset="UTF-8"<br>
<br>
Hi again,<br>
<br>
since there really isn't much to find about the lock() function, can<br>
somebody tell me if my assumptions about how it should work are wrong?<br>
Daniel?<br>
<br>
Best Regards,<br>
Sebastian<br>
<br>
On Wed, Jun 28, 2017 at 1:39 PM, Sebastian Damm <damm@sipgate.de> wrote:<br>
> Hi,<br>
><br>
> for a project I need to make sure, I have a setup where I get<br>
> mirror-traffic into Kamailio which has to do something with it. To<br>
> work correctly, I need to make sure, the initial INVITE is processed<br>
> correctly before any reply to the same call. So I thought I use lock()<br>
> and unlock() for it.<br>
><br>
> This is what the relevant kamailio.cfg part looks like:<br>
><br>
> request_route {<br>
>   xlog("L_INFO", "Got new packet $rm: $si => $Ri\n");<br>
>   route(li);<br>
> }<br>
><br>
> onreply_route {<br>
>   xlog("L_INFO", "Got new packet $rm: $si => $Ri - Reply Code $rs\n");<br>
>   route(li);<br>
> }<br>
><br>
> route[magic] {<br>
>   lock("$ci");<br>
>   xlog("L_INFO", "Obtained lock, calling lua...\n");<br>
>   if(!lua_run("handle_packet")) {<br>
>     xlog("L_ERR", "SCRIPT: failed to execute lua function!\n");<br>
>   }<br>
>   unlock("$ci");<br>
>   xlog("L_INFO", "Lua finished, released lock...\n");<br>
><br>
>   drop;<br>
>   exit;<br>
> }<br>
><br>
><br>
><br>
> And this is what the log says:<br>
><br>
> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: <script>: Got<br>
> new packet INVITE: 172.20.21.247 => 172.20.21.4<br>
> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: <script>:<br>
> Obtained lock, calling lua...<br>
> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: app_lua<br>
> [app_lua_sr.c:98]: lua_sr_log(): some logging<br>
> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>: Got<br>
> new packet INVITE: 172.20.21.4 => 172.20.21.247 - Reply Code 407<br>
> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>:<br>
> Obtained lock, calling lua...<br>
> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>: Lua<br>
> finished, released lock...<br>
> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: app_lua<br>
> [app_lua_sr.c:98]: lua_sr_log(): some more logging<br>
><br>
><br>
><br>
><br>
> As far as I understand the documentation, the second packet should<br>
> wait for the lock on the Call-ID before executing the lua function. So<br>
> process 18836 should finish its lua execution before 18837 can do<br>
> anything further. Did I completely misunderstand the lock() function?<br>
><br>
> I'm using Kamailio 5.0.2.<br>
><br>
> Thanks for helping me understand what Kamailio is doing here.<br>
><br>
> Best Regards,<br>
> Sebastian<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 8<br>
Date: Mon, 3 Jul 2017 10:10:31 +0200<br>
From: Daniel-Constantin Mierla <miconda@gmail.com><br>
To: "Kamailio (SER) - Users Mailing List"<br>
        <sr-users@lists.kamailio.org>, frédéric Gaisnon<br>
        <frederic.gaisnon@gmail.com><br>
Subject: Re: [SR-Users] call forward on no answer<br>
Message-ID: <cddefdfd-5ac0-d875-e5e8-7b31e4c33478@gmail.com><br>
Content-Type: text/plain; charset=utf-8<br>
<br>
Hello,<br>
<br>
what is the order in the call flow: caller, sbc, proxy, callee or<br>
caller, proxy, sbc, callee? To understand which node generates the<br>
cancel and see what can be tuned there.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<br>
On 28.06.17 10:25, frédéric Gaisnon wrote:<br>
> Hello,<br>
><br>
> In my Platform i have a kamailio used as pseudo SBC and a kamailio<br>
> used as Proxy (AS trigger) (cpl are applied on this instance). When I<br>
> make a call and callee doesn't answer that call my SBC detects the<br>
> timeout and generates a 408 to Proxy (according to fr_inv_timer) , but<br>
> it generates CANCEL too. Is it possible to deactivate these CANCEL? if<br>
> not what is the configuration in order to be able to trigger CFNA?<br>
><br>
> Regards,<br>
><br>
> Frédéric<br>
><br>
<br>
-- <br>
Daniel-Constantin Mierla<br>
<a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">
www.linkedin.com/in/miconda</a><br>
Kamailio Advanced Training - <a href="http://www.asipto.com">www.asipto.com</a><br>
Kamailio World Conference - <a href="http://www.kamailioworld.com">www.kamailioworld.com</a><br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 9<br>
Date: Mon, 3 Jul 2017 10:13:43 +0200<br>
From: Sebastian Damm <damm@sipgate.de><br>
To: "Kamailio (SER) - Users Mailing List"<br>
        <sr-users@lists.kamailio.org><br>
Subject: Re: [SR-Users] How to convert ipv6 to ipv4 address inside<br>
        message body<br>
Message-ID:<br>
        <CABkWSFyoaFiK8XwfcKeQT8H+XEFFPBY2Q_=gbv1WkCy04j4+tQ@mail.gmail.com><br>
Content-Type: text/plain; charset="UTF-8"<br>
<br>
Hi,<br>
<br>
On Fri, Jun 30, 2017 at 5:40 PM, Narayan P <narayana88@outlook.com> wrote:<br>
> But when 183 session progress came ,kamailio is sending its ipv6 address to<br>
> pjsip client inside sdp body.So that  it is not accepting and 488 error<br>
> message is giving.<br>
><br>
><br>
> How to convert ipv6 to ipv4  inside kamailio so that pjsip can accept.<br>
<br>
don't know how the appropriate options would look like for rtpproxy,<br>
but with rtpengine you have to define an "external" and an "internal"<br>
interface and then use the correct options for bridging from external<br>
to internal. And you have to call the appropriate rtpproxy function<br>
for each reply that has an SDP body, not only for the request.<br>
<br>
See <a href="https://www.youtube.com/watch?v=j8e0D2aOE5A">https://www.youtube.com/watch?v=j8e0D2aOE5A</a> (from Kamailioworld<br>
two years ago) for configuration examples using the rtpengine module.<br>
<br>
HTH<br>
Sebastian<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 10<br>
Date: Mon, 3 Jul 2017 10:15:34 +0200<br>
From: Daniel-Constantin Mierla <miconda@gmail.com><br>
To: "Kamailio (SER) - Users Mailing List"<br>
        <sr-users@lists.kamailio.org>, Юрий Гончаров<br>
        <yur4eg@gmail.com><br>
Subject: Re: [SR-Users] UAC auth for incoming call<br>
Message-ID: <ef4f19e1-11a4-ea60-7c3c-1e67cd1fa503@gmail.com><br>
Content-Type: text/plain; charset=utf-8<br>
<br>
Hello,<br>
<br>
<br>
On 27.06.17 17:44, Юрий Гончаров wrote:<br>
> Hello kamailio users,<br>
> I use uac module.  Registration and outbound calls from Kamailio are fine.<br>
> How can I check if INVITE sent from remote part not spoofed.<br>
><br>
what exactly do you mean here? The source IP is the one for REGISTER,<br>
but it is actually spoofed? Or you want to detect that INVITE comes from<br>
another IP than the REGISTER?<br>
<br>
Cheers,<br>
Daniel<br>
<br>
-- <br>
Daniel-Constantin Mierla<br>
<a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">
www.linkedin.com/in/miconda</a><br>
Kamailio Advanced Training - <a href="http://www.asipto.com">www.asipto.com</a><br>
Kamailio World Conference - <a href="http://www.kamailioworld.com">www.kamailioworld.com</a><br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 11<br>
Date: Mon, 3 Jul 2017 10:19:50 +0200<br>
From: Daniel-Constantin Mierla <miconda@gmail.com><br>
To: "Kamailio (SER) - Users Mailing List"<br>
        <sr-users@lists.kamailio.org>, Jean Cérien <cerien.jean@gmail.com><br>
Subject: Re: [SR-Users] drouting / do_routing / prefix unknown<br>
Message-ID: <3ae008ea-8a85-fcbb-029e-130d385184a1@gmail.com><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hello,<br>
<br>
I think that do_routing() returns false if no record was matched. Or do<br>
you have the empty prefix value that is matching everything.<br>
<br>
The keepalive feature was added in 5.1 (development version right now),<br>
so it should not be in the 5.0.x. If the docs say so, maybe it was a<br>
mistaken propagation with some other docs backports.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<br>
On 20.06.17 22:39, Jean Cérien wrote:<br>
><br>
> Hello<br>
> I am using Kamailio 5.0.2, with module drouting to do prefix based<br>
> routing.<br>
><br>
> 1. When I call do_routing and the prefix is not known, the r-uri<br>
> remains unchanged. Is there a way to detect that the prefix is<br>
> unknown, other than r-uri remains unchanged ?<br>
><br>
><br>
> 2. I have the following parameters<br>
> modparam("drouting", "db_url",DBURL)<br>
> modparam("drouting", "sort_order", 0)<br>
> modparam("drouting", "use_domain", 0)<br>
> modparam("drouting", "force_dns", 1)<br>
> # modparam("drouting", "enable_keepalive", 1)<br>
><br>
> If I enable keep alive, I get the following error: <br>
> Jun 20 22:37:17 kamailio1 kamailio: ERROR: <core><br>
> [core/modparam.c:141]: set_mod_param_regex(): parameter<br>
> <enable_keepalive> of type <2> not found in module <drouting><br>
><br>
> yet, the documentation leads me to think that it should work:<br>
> /NOTE: this option is only compatible with <em>sort_order</em> 0<br>
> currently. With sort_order value of 1 or 2, destinations status will<br>
> simply be ignored.<br>
> /<br>
><br>
> Thanks for your help<br>
><br>
> J.<br>
><br>
><br>
><br>
> _______________________________________________<br>
> Kamailio (SER) - Users Mailing List<br>
> sr-users@lists.kamailio.org<br>
> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
-- <br>
Daniel-Constantin Mierla<br>
<a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">
www.linkedin.com/in/miconda</a><br>
Kamailio Advanced Training - <a href="http://www.asipto.com">www.asipto.com</a><br>
Kamailio World Conference - <a href="http://www.kamailioworld.com">www.kamailioworld.com</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.kamailio.org/pipermail/sr-users/attachments/20170703/33ecae86/attachment-0001.html">http://lists.kamailio.org/pipermail/sr-users/attachments/20170703/33ecae86/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 12<br>
Date: Mon, 3 Jul 2017 10:23:07 +0200<br>
From: Daniel-Constantin Mierla <miconda@gmail.com><br>
To: "Kamailio (SER) - Users Mailing List"<br>
        <sr-users@lists.kamailio.org>, Sebastian Damm <damm@sipgate.de><br>
Subject: Re: [SR-Users] Using lock() correctly<br>
Message-ID: <e45739ab-be38-33eb-3d7f-60a2af8d90fe@gmail.com><br>
Content-Type: text/plain; charset=utf-8<br>
<br>
Hello,<br>
<br>
first a quick check: is route[li] supposed to be route[magic]? Otherwise<br>
it is missing from your example.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
On 03.07.17 10:04, Sebastian Damm wrote:<br>
> Hi again,<br>
><br>
> since there really isn't much to find about the lock() function, can<br>
> somebody tell me if my assumptions about how it should work are wrong?<br>
> Daniel?<br>
><br>
> Best Regards,<br>
> Sebastian<br>
><br>
> On Wed, Jun 28, 2017 at 1:39 PM, Sebastian Damm <damm@sipgate.de> wrote:<br>
>> Hi,<br>
>><br>
>> for a project I need to make sure, I have a setup where I get<br>
>> mirror-traffic into Kamailio which has to do something with it. To<br>
>> work correctly, I need to make sure, the initial INVITE is processed<br>
>> correctly before any reply to the same call. So I thought I use lock()<br>
>> and unlock() for it.<br>
>><br>
>> This is what the relevant kamailio.cfg part looks like:<br>
>><br>
>> request_route {<br>
>>   xlog("L_INFO", "Got new packet $rm: $si => $Ri\n");<br>
>>   route(li);<br>
>> }<br>
>><br>
>> onreply_route {<br>
>>   xlog("L_INFO", "Got new packet $rm: $si => $Ri - Reply Code $rs\n");<br>
>>   route(li);<br>
>> }<br>
>><br>
>> route[magic] {<br>
>>   lock("$ci");<br>
>>   xlog("L_INFO", "Obtained lock, calling lua...\n");<br>
>>   if(!lua_run("handle_packet")) {<br>
>>     xlog("L_ERR", "SCRIPT: failed to execute lua function!\n");<br>
>>   }<br>
>>   unlock("$ci");<br>
>>   xlog("L_INFO", "Lua finished, released lock...\n");<br>
>><br>
>>   drop;<br>
>>   exit;<br>
>> }<br>
>><br>
>><br>
>><br>
>> And this is what the log says:<br>
>><br>
>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: <script>: Got<br>
>> new packet INVITE: 172.20.21.247 => 172.20.21.4<br>
>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: <script>:<br>
>> Obtained lock, calling lua...<br>
>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: app_lua<br>
>> [app_lua_sr.c:98]: lua_sr_log(): some logging<br>
>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>: Got<br>
>> new packet INVITE: 172.20.21.4 => 172.20.21.247 - Reply Code 407<br>
>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>:<br>
>> Obtained lock, calling lua...<br>
>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>: Lua<br>
>> finished, released lock...<br>
>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: app_lua<br>
>> [app_lua_sr.c:98]: lua_sr_log(): some more logging<br>
>><br>
>><br>
>><br>
>><br>
>> As far as I understand the documentation, the second packet should<br>
>> wait for the lock on the Call-ID before executing the lua function. So<br>
>> process 18836 should finish its lua execution before 18837 can do<br>
>> anything further. Did I completely misunderstand the lock() function?<br>
>><br>
>> I'm using Kamailio 5.0.2.<br>
>><br>
>> Thanks for helping me understand what Kamailio is doing here.<br>
>><br>
>> Best Regards,<br>
>> Sebastian<br>
> _______________________________________________<br>
> Kamailio (SER) - Users Mailing List<br>
> sr-users@lists.kamailio.org<br>
> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
-- <br>
Daniel-Constantin Mierla<br>
<a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">
www.linkedin.com/in/miconda</a><br>
Kamailio Advanced Training - <a href="http://www.asipto.com">www.asipto.com</a><br>
Kamailio World Conference - <a href="http://www.kamailioworld.com">www.kamailioworld.com</a><br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 13<br>
Date: Mon, 3 Jul 2017 10:30:41 +0200<br>
From: Sebastian Damm <damm@sipgate.de><br>
Cc: "Kamailio (SER) - Users Mailing List"<br>
        <sr-users@lists.kamailio.org><br>
Subject: Re: [SR-Users] Using lock() correctly<br>
Message-ID:<br>
        <CABkWSFxi20vy2HjS7HrMVMe360fiA4moe-jK0wpho2DtMMn_-w@mail.gmail.com><br>
Content-Type: text/plain; charset="UTF-8"<br>
<br>
Hi,<br>
<br>
yes, it is. I'm really bad in fixing my configuration for the mailing<br>
list or the bugtracker. But those two route calls do call<br>
route[magic].<br>
<br>
Best Regards,<br>
Sebastian<br>
<br>
On Mon, Jul 3, 2017 at 10:23 AM, Daniel-Constantin Mierla<br>
<miconda@gmail.com> wrote:<br>
> Hello,<br>
><br>
> first a quick check: is route[li] supposed to be route[magic]? Otherwise<br>
> it is missing from your example.<br>
><br>
> Cheers,<br>
> Daniel<br>
><br>
> On 03.07.17 10:04, Sebastian Damm wrote:<br>
>> Hi again,<br>
>><br>
>> since there really isn't much to find about the lock() function, can<br>
>> somebody tell me if my assumptions about how it should work are wrong?<br>
>> Daniel?<br>
>><br>
>> Best Regards,<br>
>> Sebastian<br>
>><br>
>> On Wed, Jun 28, 2017 at 1:39 PM, Sebastian Damm <damm@sipgate.de> wrote:<br>
>>> Hi,<br>
>>><br>
>>> for a project I need to make sure, I have a setup where I get<br>
>>> mirror-traffic into Kamailio which has to do something with it. To<br>
>>> work correctly, I need to make sure, the initial INVITE is processed<br>
>>> correctly before any reply to the same call. So I thought I use lock()<br>
>>> and unlock() for it.<br>
>>><br>
>>> This is what the relevant kamailio.cfg part looks like:<br>
>>><br>
>>> request_route {<br>
>>>   xlog("L_INFO", "Got new packet $rm: $si => $Ri\n");<br>
>>>   route(li);<br>
>>> }<br>
>>><br>
>>> onreply_route {<br>
>>>   xlog("L_INFO", "Got new packet $rm: $si => $Ri - Reply Code $rs\n");<br>
>>>   route(li);<br>
>>> }<br>
>>><br>
>>> route[magic] {<br>
>>>   lock("$ci");<br>
>>>   xlog("L_INFO", "Obtained lock, calling lua...\n");<br>
>>>   if(!lua_run("handle_packet")) {<br>
>>>     xlog("L_ERR", "SCRIPT: failed to execute lua function!\n");<br>
>>>   }<br>
>>>   unlock("$ci");<br>
>>>   xlog("L_INFO", "Lua finished, released lock...\n");<br>
>>><br>
>>>   drop;<br>
>>>   exit;<br>
>>> }<br>
>>><br>
>>><br>
>>><br>
>>> And this is what the log says:<br>
>>><br>
>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: <script>: Got<br>
>>> new packet INVITE: 172.20.21.247 => 172.20.21.4<br>
>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: <script>:<br>
>>> Obtained lock, calling lua...<br>
>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: app_lua<br>
>>> [app_lua_sr.c:98]: lua_sr_log(): some logging<br>
>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>: Got<br>
>>> new packet INVITE: 172.20.21.4 => 172.20.21.247 - Reply Code 407<br>
>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>:<br>
>>> Obtained lock, calling lua...<br>
>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>: Lua<br>
>>> finished, released lock...<br>
>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: app_lua<br>
>>> [app_lua_sr.c:98]: lua_sr_log(): some more logging<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> As far as I understand the documentation, the second packet should<br>
>>> wait for the lock on the Call-ID before executing the lua function. So<br>
>>> process 18836 should finish its lua execution before 18837 can do<br>
>>> anything further. Did I completely misunderstand the lock() function?<br>
>>><br>
>>> I'm using Kamailio 5.0.2.<br>
>>><br>
>>> Thanks for helping me understand what Kamailio is doing here.<br>
>>><br>
>>> Best Regards,<br>
>>> Sebastian<br>
>> _______________________________________________<br>
>> Kamailio (SER) - Users Mailing List<br>
>> sr-users@lists.kamailio.org<br>
>> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
><br>
> --<br>
> Daniel-Constantin Mierla<br>
> <a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">
www.linkedin.com/in/miconda</a><br>
> Kamailio Advanced Training - <a href="http://www.asipto.com">www.asipto.com</a><br>
> Kamailio World Conference - <a href="http://www.kamailioworld.com">www.kamailioworld.com</a><br>
><br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 14<br>
Date: Mon, 3 Jul 2017 11:57:52 +0200<br>
From: Daniel-Constantin Mierla <miconda@gmail.com><br>
To: "Kamailio (SER) - Users Mailing List"<br>
        <sr-users@lists.kamailio.org>, Sebastian Damm <damm@sipgate.de><br>
Subject: Re: [SR-Users] Using lock() correctly<br>
Message-ID: <45a664f4-a835-8129-857c-123c28a207ea@gmail.com><br>
Content-Type: text/plain; charset=utf-8<br>
<br>
Hello,<br>
<br>
the last log message is outside of the lock()/unlock(), so it can<br>
printed whenever the OS decides to allocate CPU for it. You should move<br>
it inside the locked block, but then also be sure the syslog is not<br>
asynchronous, because then it can be syslog changing the order.<br>
<br>
Also, unrelated, you should not use drop, unless you want to drop the<br>
response and not sending it out. For request is not making any<br>
difference compared with exit.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<br>
On 03.07.17 10:30, Sebastian Damm wrote:<br>
> Hi,<br>
><br>
> yes, it is. I'm really bad in fixing my configuration for the mailing<br>
> list or the bugtracker. But those two route calls do call<br>
> route[magic].<br>
><br>
> Best Regards,<br>
> Sebastian<br>
><br>
> On Mon, Jul 3, 2017 at 10:23 AM, Daniel-Constantin Mierla<br>
> <miconda@gmail.com> wrote:<br>
>> Hello,<br>
>><br>
>> first a quick check: is route[li] supposed to be route[magic]? Otherwise<br>
>> it is missing from your example.<br>
>><br>
>> Cheers,<br>
>> Daniel<br>
>><br>
>> On 03.07.17 10:04, Sebastian Damm wrote:<br>
>>> Hi again,<br>
>>><br>
>>> since there really isn't much to find about the lock() function, can<br>
>>> somebody tell me if my assumptions about how it should work are wrong?<br>
>>> Daniel?<br>
>>><br>
>>> Best Regards,<br>
>>> Sebastian<br>
>>><br>
>>> On Wed, Jun 28, 2017 at 1:39 PM, Sebastian Damm <damm@sipgate.de> wrote:<br>
>>>> Hi,<br>
>>>><br>
>>>> for a project I need to make sure, I have a setup where I get<br>
>>>> mirror-traffic into Kamailio which has to do something with it. To<br>
>>>> work correctly, I need to make sure, the initial INVITE is processed<br>
>>>> correctly before any reply to the same call. So I thought I use lock()<br>
>>>> and unlock() for it.<br>
>>>><br>
>>>> This is what the relevant kamailio.cfg part looks like:<br>
>>>><br>
>>>> request_route {<br>
>>>>   xlog("L_INFO", "Got new packet $rm: $si => $Ri\n");<br>
>>>>   route(li);<br>
>>>> }<br>
>>>><br>
>>>> onreply_route {<br>
>>>>   xlog("L_INFO", "Got new packet $rm: $si => $Ri - Reply Code $rs\n");<br>
>>>>   route(li);<br>
>>>> }<br>
>>>><br>
>>>> route[magic] {<br>
>>>>   lock("$ci");<br>
>>>>   xlog("L_INFO", "Obtained lock, calling lua...\n");<br>
>>>>   if(!lua_run("handle_packet")) {<br>
>>>>     xlog("L_ERR", "SCRIPT: failed to execute lua function!\n");<br>
>>>>   }<br>
>>>>   unlock("$ci");<br>
>>>>   xlog("L_INFO", "Lua finished, released lock...\n");<br>
>>>><br>
>>>>   drop;<br>
>>>>   exit;<br>
>>>> }<br>
>>>><br>
>>>><br>
>>>><br>
>>>> And this is what the log says:<br>
>>>><br>
>>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: <script>: Got<br>
>>>> new packet INVITE: 172.20.21.247 => 172.20.21.4<br>
>>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: <script>:<br>
>>>> Obtained lock, calling lua...<br>
>>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: app_lua<br>
>>>> [app_lua_sr.c:98]: lua_sr_log(): some logging<br>
>>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>: Got<br>
>>>> new packet INVITE: 172.20.21.4 => 172.20.21.247 - Reply Code 407<br>
>>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>:<br>
>>>> Obtained lock, calling lua...<br>
>>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>: Lua<br>
>>>> finished, released lock...<br>
>>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: app_lua<br>
>>>> [app_lua_sr.c:98]: lua_sr_log(): some more logging<br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>> As far as I understand the documentation, the second packet should<br>
>>>> wait for the lock on the Call-ID before executing the lua function. So<br>
>>>> process 18836 should finish its lua execution before 18837 can do<br>
>>>> anything further. Did I completely misunderstand the lock() function?<br>
>>>><br>
>>>> I'm using Kamailio 5.0.2.<br>
>>>><br>
>>>> Thanks for helping me understand what Kamailio is doing here.<br>
>>>><br>
>>>> Best Regards,<br>
>>>> Sebastian<br>
>>> _______________________________________________<br>
>>> Kamailio (SER) - Users Mailing List<br>
>>> sr-users@lists.kamailio.org<br>
>>> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>> --<br>
>> Daniel-Constantin Mierla<br>
>> <a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">
www.linkedin.com/in/miconda</a><br>
>> Kamailio Advanced Training - <a href="http://www.asipto.com">www.asipto.com</a><br>
>> Kamailio World Conference - <a href="http://www.kamailioworld.com">www.kamailioworld.com</a><br>
>><br>
> _______________________________________________<br>
> Kamailio (SER) - Users Mailing List<br>
> sr-users@lists.kamailio.org<br>
> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
-- <br>
Daniel-Constantin Mierla<br>
<a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">
www.linkedin.com/in/miconda</a><br>
Kamailio Advanced Training - <a href="http://www.asipto.com">www.asipto.com</a><br>
Kamailio World Conference - <a href="http://www.kamailioworld.com">www.kamailioworld.com</a><br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
sr-users mailing list<br>
sr-users@lists.kamailio.org<br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
<br>
------------------------------<br>
<br>
End of sr-users Digest, Vol 146, Issue 2<br>
****************************************<br>
</div>
</span></font>
</body>
</html>