[SR-Users] sr-users Digest, Vol 146, Issue 2

Narayan P narayana88 at outlook.com
Mon Jul 3 17:49:16 CEST 2017


Hi Sebastian,


Thanks for your reply.


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.


My architecture is like this,

external ipv4 network(port 5060)----------rtpproxy(ipv4)--kamailio(ipv6)(port 5070)----------client(ipv4)(port 5077)


Please look at the attached wireshark capture.


Highly appreciate any suggestion as always.


Thanks,

Narayan


________________________________
From: sr-users <sr-users-bounces at lists.kamailio.org> on behalf of sr-users-request at lists.kamailio.org <sr-users-request at lists.kamailio.org>
Sent: Monday, July 3, 2017 10:00:02 AM
To: sr-users at lists.kamailio.org
Subject: sr-users Digest, Vol 146, Issue 2

Send sr-users mailing list submissions to
        sr-users at lists.kamailio.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
or, via email, send a message with subject or body 'help' to
        sr-users-request at lists.kamailio.org

You can reach the person managing the list at
        sr-users-owner at lists.kamailio.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of sr-users digest..."


Today's Topics:

   1. Re: host to get name of local server (Daniel-Constantin Mierla)
   2. Re: remote ip address of sender and receiver
      (Daniel-Constantin Mierla)
   3. Re: remote ip address of sender and receiver
      (Daniel-Constantin Mierla)
   4. Re: Question regarding calling a shell script from kamailio
      (Daniel-Constantin Mierla)
   5. Re: Compiling errors (Daniel-Constantin Mierla)
   6. Re: evapi module and async_relay (Daniel-Constantin Mierla)
   7. Re: Using lock() correctly (Sebastian Damm)
   8. Re: call forward on no answer (Daniel-Constantin Mierla)
   9. Re: How to convert ipv6 to ipv4 address inside message    body
      (Sebastian Damm)
  10. Re: UAC auth for incoming call (Daniel-Constantin Mierla)
  11. Re: drouting / do_routing / prefix unknown
      (Daniel-Constantin Mierla)
  12. Re: Using lock() correctly (Daniel-Constantin Mierla)
  13. Re: Using lock() correctly (Sebastian Damm)
  14. Re: Using lock() correctly (Daniel-Constantin Mierla)


----------------------------------------------------------------------

Message: 1
Date: Mon, 3 Jul 2017 09:03:16 +0200
From: Daniel-Constantin Mierla <miconda at gmail.com>
To: "Kamailio (SER) - Users Mailing List"
        <sr-users at lists.kamailio.org>, Henry Fernandes <henry at usinternet.com>
Subject: Re: [SR-Users] host to get name of local server
Message-ID: <9c3f6b62-d79f-1376-b0f5-1ccbb69e37c1 at gmail.com>
Content-Type: text/plain; charset="windows-1252"

Hello,


On 29.06.17 18:11, Henry Fernandes wrote:
> We have multiple Kamailio 4.4.x servers and I am setting up stats
> tracking.  I would like to track the stats for each individual
> Kamailio server separately like so:
>
>     kamailio_1.sip.register.count
>     kamailio_2.sip.register.count
>     kamailio_3.sip.register.count
>
> The problem is that we use one common file (in version control) for
> our Kamailio configuration.  Thus, I can’t just hardcode the hostname
> into the file because it will be the same for each server.
>
> Does anyone have a solution for me?  Is there a variable that provides
> the hostname or is there something else I can do?
>
> Ideally, I’d love to be able to do something like this.
>
>     statsd_incr($host_name + “.sip.register.count");
>
>

one option would be to define it via command line parameter with -A
option. Your start script can set it using the usual shell scripts.

Cheers,
Daniel

--
Daniel-Constantin Mierla
www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Kamailio Advanced Training - www.asipto.com<http://www.asipto.com>
Kamailio World Conference - www.kamailioworld.com<http://www.kamailioworld.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170703/4b089870/attachment-0001.html>

------------------------------

Message: 2
Date: Mon, 3 Jul 2017 09:06:27 +0200
From: Daniel-Constantin Mierla <miconda at gmail.com>
To: "Kamailio (SER) - Users Mailing List"
        <sr-users at lists.kamailio.org>, vuleetu <vuleetu at gmail.com>,
        sr-users at lists.sip-router.org
Subject: Re: [SR-Users] remote ip address of sender and receiver
Message-ID: <4b3ae5cc-360d-1ef0-4315-568b4dfd812a at gmail.com>
Content-Type: text/plain; charset=utf-8

Hello,


On 29.06.17 12:45, vuleetu wrote:
> Hi, all
>
>    Is there any way to get remote ip address of both sender($si) and
> receiver(?)? I am configuring kamailio with multiple rtpproxy sets.
> Basically, rtpproxy set will be choosed based on the country those ip
> addresses of caller and callee belong to. Lets say if caller and
> callee are both in US, set 1 will selected. If they are not in the
> same country, set 2 will be selected.  I dont know if there is any way
> to do that.
>
source IP is $si.

For target IP, I assume you use registrar/usrloc - after lookup
location, if $du is not null, then $dd gives the address, otherwise $rd.

Cheers,
Daniel

--
Daniel-Constantin Mierla
www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Kamailio Advanced Training - www.asipto.com<http://www.asipto.com>
Kamailio World Conference - www.kamailioworld.com<http://www.kamailioworld.com>




------------------------------

Message: 3
Date: Mon, 3 Jul 2017 09:06:27 +0200
From: Daniel-Constantin Mierla <miconda at gmail.com>
To: "Kamailio (SER) - Users Mailing List"
        <sr-users at lists.kamailio.org>, vuleetu <vuleetu at gmail.com>,
        sr-users at lists.sip-router.org
Subject: Re: [SR-Users] remote ip address of sender and receiver
Message-ID: <4b3ae5cc-360d-1ef0-4315-568b4dfd812a at gmail.com>
Content-Type: text/plain; charset=utf-8

Hello,


On 29.06.17 12:45, vuleetu wrote:
> Hi, all
>
>    Is there any way to get remote ip address of both sender($si) and
> receiver(?)? I am configuring kamailio with multiple rtpproxy sets.
> Basically, rtpproxy set will be choosed based on the country those ip
> addresses of caller and callee belong to. Lets say if caller and
> callee are both in US, set 1 will selected. If they are not in the
> same country, set 2 will be selected.  I dont know if there is any way
> to do that.
>
source IP is $si.

For target IP, I assume you use registrar/usrloc - after lookup
location, if $du is not null, then $dd gives the address, otherwise $rd.

Cheers,
Daniel

--
Daniel-Constantin Mierla
www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Kamailio Advanced Training - www.asipto.com<http://www.asipto.com>
Kamailio World Conference - www.kamailioworld.com<http://www.kamailioworld.com>




------------------------------

Message: 4
Date: Mon, 3 Jul 2017 09:09:27 +0200
From: Daniel-Constantin Mierla <miconda at gmail.com>
To: "Kamailio (SER) - Users Mailing List"
        <sr-users at lists.kamailio.org>, Anuradha Selvarajan
        <anuradha.selvarajan at ericsson.com>
Subject: Re: [SR-Users] Question regarding calling a shell script from
        kamailio
Message-ID: <8158f4b2-d1eb-c487-43bc-4c950e98d0d6 at gmail.com>
Content-Type: text/plain; charset="windows-1252"

Hello,

your first email was answered:

  - https://lists.kamailio.org/pipermail/sr-users/2017-June/097640.html

The exec_avp() should allow you to get back values in kamailio.cfg, iirc.

Cheers,
daniel

On 29.06.17 18:58, Anuradha Selvarajan wrote:
>
> Hello,
>
>
>
> Resending as I didn’t get any reply yet. I tried to use exec_msg to
> call a external script but that is not working as expected (used it
> under request_route function as suggested). Also exec_msg doesn’t
> store any return value so not sure if this will help. Like mentioned
> in my previous email, looking for calling a external shell script and
> use the return value in fork.cfg file. I need help with this asap.
> Appreciate some help!
>
>
>
> Thanks a lot!
>
> Anu
>
>
>
> *From:* Anuradha Selvarajan
> *Sent:* Wednesday, June 28, 2017 10:03 AM
> *To:* Kamailio (SER) - Users Mailing List <sr-users at lists.sip-router.org>
> *Subject:* Question regarding calling a shell script from kamailio
>
>
>
> Hello,
>
>
>
> I am using fork.cfg file and I want to call a shell script (which has
> curl commands extracting value from database and returns the value)
> and use the value in the fork.cfg. How can I do it?
>
>
>
> Appreciate your help!
>
>
>
> Thanksm
> Anu
>
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

--
Daniel-Constantin Mierla
www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Kamailio Advanced Training - www.asipto.com<http://www.asipto.com>
Kamailio World Conference - www.kamailioworld.com<http://www.kamailioworld.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170703/34b5c761/attachment-0001.html>

------------------------------

Message: 5
Date: Mon, 3 Jul 2017 09:11:00 +0200
From: Daniel-Constantin Mierla <miconda at gmail.com>
To: Yasin CANER <yasin.caner at netgsm.com.tr>, "Kamailio (SER) - Users
        Mailing List" <sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] Compiling errors
Message-ID: <794e0e9f-625b-cb07-7554-4473d9244067 at gmail.com>
Content-Type: text/plain; charset="utf-8"

Hello,

thanks for the infor, I thought it is a new compiler version, because
travis-ci and in my environment there was no compile error reported.

Cheers,
Daniel


On 29.06.17 09:54, Yasin CANER wrote:
>
> Hello ,
>
> gcc is updated from  4.4.7 20120313 (Red Hat 4.4.7-16) to 4.4.7
> 20120313 (Red Hat 4.4.7-18) and then kamailio cloned from git again.
> it didnt give any error.
>
> thanks.
>
>
> 29.06.2017 10:35 tarihinde Daniel-Constantin Mierla yazdı:
>>
>> Hello,
>>
>> what's your compiler (and its version)? clang was dealing fine with
>> this case.
>>
>> Anyhow, should be fixed in master branch, just fetch latest version.
>>
>> Cheers,
>> Daniel
>>
>>
>> On 29.06.17 09:23, Yasin CANER wrote:
>>>
>>> Hello,
>>>
>>>
>>>
>>>
>>> on compiling git master branch gives error as below. Could you check
>>> it please.
>>>
>>> Cheers.
>>>
>>>
>>>
>>> make include_modules="acc_radius auth_radius misc_radius" cfg
>>>
>>> make all
>>>
>>> make[3]: `libsrutils.so.1.0' is up to date.
>>> LD (gcc) [M jsonrpcs.so]                jsonrpcs.so
>>> CC (gcc) [M keepalive.so]               keepalive_api.o
>>> In file included from keepalive_api.c:40:
>>> api.h:39: error: redefinition of typedef ‘ka_statechanged_f’
>>> keepalive.h:48: note: previous declaration of ‘ka_statechanged_f’
>>> was here
>>> make[2]: *** [keepalive_api.o] Error 1
>>> make[1]: *** [modules] Error 1
>>> make[1]: Leaving directory `/usr/src/kamailio/src'
>>> make: *** [all] Error 2
>>>
>>> --
>>> *Yasin CANER*
>>> Communication Tech Engineer
>>> 0850 303 0 303 / 0312 911 0 911
>>> www.netgsm.com.tr<http://www.netgsm.com.tr> <https://www.netgsm.com.tr>
>>>
>>>
>>>
>>> _______________________________________________
>>> Kamailio (SER) - Users Mailing List
>>> sr-users at lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>> --
>> Daniel-Constantin Mierla
>> www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
>> Kamailio Advanced Training - www.asipto.com<http://www.asipto.com>
>> Kamailio World Conference - www.kamailioworld.com<http://www.kamailioworld.com>
>
> --
> *Yasin CANER*
> Communication Tech Engineer
> 0850 303 0 303 / 0312 911 0 911
> www.netgsm.com.tr<http://www.netgsm.com.tr> <https://www.netgsm.com.tr>
>

--
Daniel-Constantin Mierla
www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Kamailio Advanced Training - www.asipto.com<http://www.asipto.com>
Kamailio World Conference - www.kamailioworld.com<http://www.kamailioworld.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170703/236ea542/attachment-0001.html>

------------------------------

Message: 6
Date: Mon, 3 Jul 2017 09:18:36 +0200
From: Daniel-Constantin Mierla <miconda at gmail.com>
To: "Kamailio (SER) - Users Mailing List"
        <sr-users at lists.kamailio.org>, Diego Nadares <dnadares at gmail.com>
Subject: Re: [SR-Users] evapi module and async_relay
Message-ID: <2e56f182-5d48-5eff-fabd-68a0d2850757 at gmail.com>
Content-Type: text/plain; charset="utf-8"

Hello,

Can you check with netstat the recv and send queues for the sockets used
in this communication? If the recv queu for receiving up is big, then it
cannot handle the traffic fast enough.

Cheers,
Daniel


On 28.06.17 21:58, Diego Nadares wrote:
> Sorry, maybe this log clarifies what I meant:
>
> These are the messages that my client read. It's connected to
> 127.0.0.1 to kamailio evapi.
>
> 2017-06-27 19:29:50,313 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:50,401 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:50,444 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:50,456 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:50,521 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:50,565 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:50,604 - routing - INFO - netstrings in message 2
> 2017-06-27 19:29:50,649 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:50,687 - routing - INFO - netstrings in message 2
> 2017-06-27 19:29:50,730 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:50,857 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:50,896 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:50,921 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:50,929 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:51,029 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:51,180 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:51,235 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:51,279 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:51,337 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:51,380 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:51,491 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:51,521 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:51,630 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:51,706 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:51,787 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:51,893 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:51,917 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:51,929 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:51,970 - routing - INFO - netstrings in message 2
> 2017-06-27 19:29:52,016 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:52,345 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:52,363 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:52,553 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:52,592 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:52,605 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:52,766 - routing - INFO - netstrings in message 1
> 2017-06-27 19:29:53,002 - routing - INFO - netstrings in message 5
> 2017-06-27 19:29:53,226 - routing - INFO - netstrings in message 4
> 2017-06-27 19:29:54,716 - routing - INFO - netstrings in message 15
> 2017-06-27 19:29:56,260 - routing - INFO - netstrings in message 30
> 2017-06-27 19:29:59,183 - routing - INFO - netstrings in message 52
> 2017-06-27 19:30:04,104 - routing - INFO - netstrings in message 77
> 2017-06-27 19:30:12,158 - routing - INFO - netstrings in message 128
> 2017-06-27 19:30:24,277 - routing - INFO - netstrings in message 180
> 2017-06-27 19:30:42,990 - routing - INFO - netstrings in message 327
> 2017-06-27 19:31:20,273 - routing - INFO - netstrings in message 645
>
> I hope this answer your question.
>
> Cheers,
>
> Diego
>
>
> 2017-06-28 12:04 GMT-03:00 Alex Balashov <abalashov at evaristesys.com
> <mailto:abalashov at evaristesys.com>>:
>
>     On Wed, Jun 28, 2017 at 11:59:31AM -0300, Diego Nadares wrote:
>
>     > It's weird. When sends 1 or 2 net strings per message I see that
>     my client
>     > receives ~18 messages per second. When starts to grow the amount of
>     > netstrings the messages received decrease to 1 per second and fewer.
>
>     Do you mean that the objective rate at which the client receives the
>     messages decreases, or that a very large amount of them end up
>     buffered
>     into a smaller number of packets, with the same effective throughput?
>
>     -- Alex
>
>     --
>     Alex Balashov | Principal | Evariste Systems LLC
>
>     Tel: +1-706-510-6800 <tel:%2B1-706-510-6800> / +1-800-250-5920
>     <tel:%2B1-800-250-5920> (toll-free)
>     Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
>     _______________________________________________
>     Kamailio (SER) - Users Mailing List
>     sr-users at lists.kamailio.org <mailto:sr-users at lists.kamailio.org>
>     https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>     <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
>
>
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

--
Daniel-Constantin Mierla
www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Kamailio Advanced Training - www.asipto.com<http://www.asipto.com>
Kamailio World Conference - www.kamailioworld.com<http://www.kamailioworld.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170703/04946be7/attachment-0001.html>

------------------------------

Message: 7
Date: Mon, 3 Jul 2017 10:04:52 +0200
From: Sebastian Damm <damm at sipgate.de>
To: "Kamailio (SER) - Users Mailing List"
        <sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] Using lock() correctly
Message-ID:
        <CABkWSFyB4PaGiZzPWk6sKD4_RMxapZnqap8B3wLbzqKMHJm+LA at mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

Hi again,

since there really isn't much to find about the lock() function, can
somebody tell me if my assumptions about how it should work are wrong?
Daniel?

Best Regards,
Sebastian

On Wed, Jun 28, 2017 at 1:39 PM, Sebastian Damm <damm at sipgate.de> wrote:
> Hi,
>
> for a project I need to make sure, I have a setup where I get
> mirror-traffic into Kamailio which has to do something with it. To
> work correctly, I need to make sure, the initial INVITE is processed
> correctly before any reply to the same call. So I thought I use lock()
> and unlock() for it.
>
> This is what the relevant kamailio.cfg part looks like:
>
> request_route {
>   xlog("L_INFO", "Got new packet $rm: $si => $Ri\n");
>   route(li);
> }
>
> onreply_route {
>   xlog("L_INFO", "Got new packet $rm: $si => $Ri - Reply Code $rs\n");
>   route(li);
> }
>
> route[magic] {
>   lock("$ci");
>   xlog("L_INFO", "Obtained lock, calling lua...\n");
>   if(!lua_run("handle_packet")) {
>     xlog("L_ERR", "SCRIPT: failed to execute lua function!\n");
>   }
>   unlock("$ci");
>   xlog("L_INFO", "Lua finished, released lock...\n");
>
>   drop;
>   exit;
> }
>
>
>
> And this is what the log says:
>
> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: <script>: Got
> new packet INVITE: 172.20.21.247 => 172.20.21.4
> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: <script>:
> Obtained lock, calling lua...
> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: app_lua
> [app_lua_sr.c:98]: lua_sr_log(): some logging
> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>: Got
> new packet INVITE: 172.20.21.4 => 172.20.21.247 - Reply Code 407
> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>:
> Obtained lock, calling lua...
> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>: Lua
> finished, released lock...
> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: app_lua
> [app_lua_sr.c:98]: lua_sr_log(): some more logging
>
>
>
>
> As far as I understand the documentation, the second packet should
> wait for the lock on the Call-ID before executing the lua function. So
> process 18836 should finish its lua execution before 18837 can do
> anything further. Did I completely misunderstand the lock() function?
>
> I'm using Kamailio 5.0.2.
>
> Thanks for helping me understand what Kamailio is doing here.
>
> Best Regards,
> Sebastian



------------------------------

Message: 8
Date: Mon, 3 Jul 2017 10:10:31 +0200
From: Daniel-Constantin Mierla <miconda at gmail.com>
To: "Kamailio (SER) - Users Mailing List"
        <sr-users at lists.kamailio.org>, frédéric Gaisnon
        <frederic.gaisnon at gmail.com>
Subject: Re: [SR-Users] call forward on no answer
Message-ID: <cddefdfd-5ac0-d875-e5e8-7b31e4c33478 at gmail.com>
Content-Type: text/plain; charset=utf-8

Hello,

what is the order in the call flow: caller, sbc, proxy, callee or
caller, proxy, sbc, callee? To understand which node generates the
cancel and see what can be tuned there.

Cheers,
Daniel


On 28.06.17 10:25, frédéric Gaisnon wrote:
> Hello,
>
> In my Platform i have a kamailio used as pseudo SBC and a kamailio
> used as Proxy (AS trigger) (cpl are applied on this instance). When I
> make a call and callee doesn't answer that call my SBC detects the
> timeout and generates a 408 to Proxy (according to fr_inv_timer) , but
> it generates CANCEL too. Is it possible to deactivate these CANCEL? if
> not what is the configuration in order to be able to trigger CFNA?
>
> Regards,
>
> Frédéric
>

--
Daniel-Constantin Mierla
www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Kamailio Advanced Training - www.asipto.com<http://www.asipto.com>
Kamailio World Conference - www.kamailioworld.com<http://www.kamailioworld.com>




------------------------------

Message: 9
Date: Mon, 3 Jul 2017 10:13:43 +0200
From: Sebastian Damm <damm at sipgate.de>
To: "Kamailio (SER) - Users Mailing List"
        <sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] How to convert ipv6 to ipv4 address inside
        message body
Message-ID:
        <CABkWSFyoaFiK8XwfcKeQT8H+XEFFPBY2Q_=gbv1WkCy04j4+tQ at mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

Hi,

On Fri, Jun 30, 2017 at 5:40 PM, Narayan P <narayana88 at outlook.com> wrote:
> But when 183 session progress came ,kamailio is sending its ipv6 address to
> pjsip client inside sdp body.So that  it is not accepting and 488 error
> message is giving.
>
>
> How to convert ipv6 to ipv4  inside kamailio so that pjsip can accept.

don't know how the appropriate options would look like for rtpproxy,
but with rtpengine you have to define an "external" and an "internal"
interface and then use the correct options for bridging from external
to internal. And you have to call the appropriate rtpproxy function
for each reply that has an SDP body, not only for the request.

See https://www.youtube.com/watch?v=j8e0D2aOE5A (from Kamailioworld
two years ago) for configuration examples using the rtpengine module.

HTH
Sebastian



------------------------------

Message: 10
Date: Mon, 3 Jul 2017 10:15:34 +0200
From: Daniel-Constantin Mierla <miconda at gmail.com>
To: "Kamailio (SER) - Users Mailing List"
        <sr-users at lists.kamailio.org>, ???? ????????
        <yur4eg at gmail.com>
Subject: Re: [SR-Users] UAC auth for incoming call
Message-ID: <ef4f19e1-11a4-ea60-7c3c-1e67cd1fa503 at gmail.com>
Content-Type: text/plain; charset=utf-8

Hello,


On 27.06.17 17:44, ???? ???????? wrote:
> Hello kamailio users,
> I use uac module.  Registration and outbound calls from Kamailio are fine.
> How can I check if INVITE sent from remote part not spoofed.
>
what exactly do you mean here? The source IP is the one for REGISTER,
but it is actually spoofed? Or you want to detect that INVITE comes from
another IP than the REGISTER?

Cheers,
Daniel

--
Daniel-Constantin Mierla
www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Kamailio Advanced Training - www.asipto.com<http://www.asipto.com>
Kamailio World Conference - www.kamailioworld.com<http://www.kamailioworld.com>




------------------------------

Message: 11
Date: Mon, 3 Jul 2017 10:19:50 +0200
From: Daniel-Constantin Mierla <miconda at gmail.com>
To: "Kamailio (SER) - Users Mailing List"
        <sr-users at lists.kamailio.org>, Jean Cérien <cerien.jean at gmail.com>
Subject: Re: [SR-Users] drouting / do_routing / prefix unknown
Message-ID: <3ae008ea-8a85-fcbb-029e-130d385184a1 at gmail.com>
Content-Type: text/plain; charset="utf-8"

Hello,

I think that do_routing() returns false if no record was matched. Or do
you have the empty prefix value that is matching everything.

The keepalive feature was added in 5.1 (development version right now),
so it should not be in the 5.0.x. If the docs say so, maybe it was a
mistaken propagation with some other docs backports.

Cheers,
Daniel


On 20.06.17 22:39, Jean Cérien wrote:
>
> Hello
> I am using Kamailio 5.0.2, with module drouting to do prefix based
> routing.
>
> 1. When I call do_routing and the prefix is not known, the r-uri
> remains unchanged. Is there a way to detect that the prefix is
> unknown, other than r-uri remains unchanged ?
>
>
> 2. I have the following parameters
> modparam("drouting", "db_url",DBURL)
> modparam("drouting", "sort_order", 0)
> modparam("drouting", "use_domain", 0)
> modparam("drouting", "force_dns", 1)
> # modparam("drouting", "enable_keepalive", 1)
>
> If I enable keep alive, I get the following error:
> Jun 20 22:37:17 kamailio1 kamailio: ERROR: <core>
> [core/modparam.c:141]: set_mod_param_regex(): parameter
> <enable_keepalive> of type <2> not found in module <drouting>
>
> yet, the documentation leads me to think that it should work:
> /NOTE: this option is only compatible with <em>sort_order</em> 0
> currently. With sort_order value of 1 or 2, destinations status will
> simply be ignored.
> /
>
> Thanks for your help
>
> J.
>
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

--
Daniel-Constantin Mierla
www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Kamailio Advanced Training - www.asipto.com<http://www.asipto.com>
Kamailio World Conference - www.kamailioworld.com<http://www.kamailioworld.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170703/33ecae86/attachment-0001.html>

------------------------------

Message: 12
Date: Mon, 3 Jul 2017 10:23:07 +0200
From: Daniel-Constantin Mierla <miconda at gmail.com>
To: "Kamailio (SER) - Users Mailing List"
        <sr-users at lists.kamailio.org>, Sebastian Damm <damm at sipgate.de>
Subject: Re: [SR-Users] Using lock() correctly
Message-ID: <e45739ab-be38-33eb-3d7f-60a2af8d90fe at gmail.com>
Content-Type: text/plain; charset=utf-8

Hello,

first a quick check: is route[li] supposed to be route[magic]? Otherwise
it is missing from your example.

Cheers,
Daniel

On 03.07.17 10:04, Sebastian Damm wrote:
> Hi again,
>
> since there really isn't much to find about the lock() function, can
> somebody tell me if my assumptions about how it should work are wrong?
> Daniel?
>
> Best Regards,
> Sebastian
>
> On Wed, Jun 28, 2017 at 1:39 PM, Sebastian Damm <damm at sipgate.de> wrote:
>> Hi,
>>
>> for a project I need to make sure, I have a setup where I get
>> mirror-traffic into Kamailio which has to do something with it. To
>> work correctly, I need to make sure, the initial INVITE is processed
>> correctly before any reply to the same call. So I thought I use lock()
>> and unlock() for it.
>>
>> This is what the relevant kamailio.cfg part looks like:
>>
>> request_route {
>>   xlog("L_INFO", "Got new packet $rm: $si => $Ri\n");
>>   route(li);
>> }
>>
>> onreply_route {
>>   xlog("L_INFO", "Got new packet $rm: $si => $Ri - Reply Code $rs\n");
>>   route(li);
>> }
>>
>> route[magic] {
>>   lock("$ci");
>>   xlog("L_INFO", "Obtained lock, calling lua...\n");
>>   if(!lua_run("handle_packet")) {
>>     xlog("L_ERR", "SCRIPT: failed to execute lua function!\n");
>>   }
>>   unlock("$ci");
>>   xlog("L_INFO", "Lua finished, released lock...\n");
>>
>>   drop;
>>   exit;
>> }
>>
>>
>>
>> And this is what the log says:
>>
>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: <script>: Got
>> new packet INVITE: 172.20.21.247 => 172.20.21.4
>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: <script>:
>> Obtained lock, calling lua...
>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: app_lua
>> [app_lua_sr.c:98]: lua_sr_log(): some logging
>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>: Got
>> new packet INVITE: 172.20.21.4 => 172.20.21.247 - Reply Code 407
>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>:
>> Obtained lock, calling lua...
>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>: Lua
>> finished, released lock...
>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: app_lua
>> [app_lua_sr.c:98]: lua_sr_log(): some more logging
>>
>>
>>
>>
>> As far as I understand the documentation, the second packet should
>> wait for the lock on the Call-ID before executing the lua function. So
>> process 18836 should finish its lua execution before 18837 can do
>> anything further. Did I completely misunderstand the lock() function?
>>
>> I'm using Kamailio 5.0.2.
>>
>> Thanks for helping me understand what Kamailio is doing here.
>>
>> Best Regards,
>> Sebastian
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

--
Daniel-Constantin Mierla
www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Kamailio Advanced Training - www.asipto.com<http://www.asipto.com>
Kamailio World Conference - www.kamailioworld.com<http://www.kamailioworld.com>




------------------------------

Message: 13
Date: Mon, 3 Jul 2017 10:30:41 +0200
From: Sebastian Damm <damm at sipgate.de>
Cc: "Kamailio (SER) - Users Mailing List"
        <sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] Using lock() correctly
Message-ID:
        <CABkWSFxi20vy2HjS7HrMVMe360fiA4moe-jK0wpho2DtMMn_-w at mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

Hi,

yes, it is. I'm really bad in fixing my configuration for the mailing
list or the bugtracker. But those two route calls do call
route[magic].

Best Regards,
Sebastian

On Mon, Jul 3, 2017 at 10:23 AM, Daniel-Constantin Mierla
<miconda at gmail.com> wrote:
> Hello,
>
> first a quick check: is route[li] supposed to be route[magic]? Otherwise
> it is missing from your example.
>
> Cheers,
> Daniel
>
> On 03.07.17 10:04, Sebastian Damm wrote:
>> Hi again,
>>
>> since there really isn't much to find about the lock() function, can
>> somebody tell me if my assumptions about how it should work are wrong?
>> Daniel?
>>
>> Best Regards,
>> Sebastian
>>
>> On Wed, Jun 28, 2017 at 1:39 PM, Sebastian Damm <damm at sipgate.de> wrote:
>>> Hi,
>>>
>>> for a project I need to make sure, I have a setup where I get
>>> mirror-traffic into Kamailio which has to do something with it. To
>>> work correctly, I need to make sure, the initial INVITE is processed
>>> correctly before any reply to the same call. So I thought I use lock()
>>> and unlock() for it.
>>>
>>> This is what the relevant kamailio.cfg part looks like:
>>>
>>> request_route {
>>>   xlog("L_INFO", "Got new packet $rm: $si => $Ri\n");
>>>   route(li);
>>> }
>>>
>>> onreply_route {
>>>   xlog("L_INFO", "Got new packet $rm: $si => $Ri - Reply Code $rs\n");
>>>   route(li);
>>> }
>>>
>>> route[magic] {
>>>   lock("$ci");
>>>   xlog("L_INFO", "Obtained lock, calling lua...\n");
>>>   if(!lua_run("handle_packet")) {
>>>     xlog("L_ERR", "SCRIPT: failed to execute lua function!\n");
>>>   }
>>>   unlock("$ci");
>>>   xlog("L_INFO", "Lua finished, released lock...\n");
>>>
>>>   drop;
>>>   exit;
>>> }
>>>
>>>
>>>
>>> And this is what the log says:
>>>
>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: <script>: Got
>>> new packet INVITE: 172.20.21.247 => 172.20.21.4
>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: <script>:
>>> Obtained lock, calling lua...
>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: app_lua
>>> [app_lua_sr.c:98]: lua_sr_log(): some logging
>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>: Got
>>> new packet INVITE: 172.20.21.4 => 172.20.21.247 - Reply Code 407
>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>:
>>> Obtained lock, calling lua...
>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>: Lua
>>> finished, released lock...
>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: app_lua
>>> [app_lua_sr.c:98]: lua_sr_log(): some more logging
>>>
>>>
>>>
>>>
>>> As far as I understand the documentation, the second packet should
>>> wait for the lock on the Call-ID before executing the lua function. So
>>> process 18836 should finish its lua execution before 18837 can do
>>> anything further. Did I completely misunderstand the lock() function?
>>>
>>> I'm using Kamailio 5.0.2.
>>>
>>> Thanks for helping me understand what Kamailio is doing here.
>>>
>>> Best Regards,
>>> Sebastian
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users at lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla
> www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
> Kamailio Advanced Training - www.asipto.com<http://www.asipto.com>
> Kamailio World Conference - www.kamailioworld.com<http://www.kamailioworld.com>
>



------------------------------

Message: 14
Date: Mon, 3 Jul 2017 11:57:52 +0200
From: Daniel-Constantin Mierla <miconda at gmail.com>
To: "Kamailio (SER) - Users Mailing List"
        <sr-users at lists.kamailio.org>, Sebastian Damm <damm at sipgate.de>
Subject: Re: [SR-Users] Using lock() correctly
Message-ID: <45a664f4-a835-8129-857c-123c28a207ea at gmail.com>
Content-Type: text/plain; charset=utf-8

Hello,

the last log message is outside of the lock()/unlock(), so it can
printed whenever the OS decides to allocate CPU for it. You should move
it inside the locked block, but then also be sure the syslog is not
asynchronous, because then it can be syslog changing the order.

Also, unrelated, you should not use drop, unless you want to drop the
response and not sending it out. For request is not making any
difference compared with exit.

Cheers,
Daniel


On 03.07.17 10:30, Sebastian Damm wrote:
> Hi,
>
> yes, it is. I'm really bad in fixing my configuration for the mailing
> list or the bugtracker. But those two route calls do call
> route[magic].
>
> Best Regards,
> Sebastian
>
> On Mon, Jul 3, 2017 at 10:23 AM, Daniel-Constantin Mierla
> <miconda at gmail.com> wrote:
>> Hello,
>>
>> first a quick check: is route[li] supposed to be route[magic]? Otherwise
>> it is missing from your example.
>>
>> Cheers,
>> Daniel
>>
>> On 03.07.17 10:04, Sebastian Damm wrote:
>>> Hi again,
>>>
>>> since there really isn't much to find about the lock() function, can
>>> somebody tell me if my assumptions about how it should work are wrong?
>>> Daniel?
>>>
>>> Best Regards,
>>> Sebastian
>>>
>>> On Wed, Jun 28, 2017 at 1:39 PM, Sebastian Damm <damm at sipgate.de> wrote:
>>>> Hi,
>>>>
>>>> for a project I need to make sure, I have a setup where I get
>>>> mirror-traffic into Kamailio which has to do something with it. To
>>>> work correctly, I need to make sure, the initial INVITE is processed
>>>> correctly before any reply to the same call. So I thought I use lock()
>>>> and unlock() for it.
>>>>
>>>> This is what the relevant kamailio.cfg part looks like:
>>>>
>>>> request_route {
>>>>   xlog("L_INFO", "Got new packet $rm: $si => $Ri\n");
>>>>   route(li);
>>>> }
>>>>
>>>> onreply_route {
>>>>   xlog("L_INFO", "Got new packet $rm: $si => $Ri - Reply Code $rs\n");
>>>>   route(li);
>>>> }
>>>>
>>>> route[magic] {
>>>>   lock("$ci");
>>>>   xlog("L_INFO", "Obtained lock, calling lua...\n");
>>>>   if(!lua_run("handle_packet")) {
>>>>     xlog("L_ERR", "SCRIPT: failed to execute lua function!\n");
>>>>   }
>>>>   unlock("$ci");
>>>>   xlog("L_INFO", "Lua finished, released lock...\n");
>>>>
>>>>   drop;
>>>>   exit;
>>>> }
>>>>
>>>>
>>>>
>>>> And this is what the log says:
>>>>
>>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: <script>: Got
>>>> new packet INVITE: 172.20.21.247 => 172.20.21.4
>>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: <script>:
>>>> Obtained lock, calling lua...
>>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: app_lua
>>>> [app_lua_sr.c:98]: lua_sr_log(): some logging
>>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>: Got
>>>> new packet INVITE: 172.20.21.4 => 172.20.21.247 - Reply Code 407
>>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>:
>>>> Obtained lock, calling lua...
>>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18837]: INFO: <script>: Lua
>>>> finished, released lock...
>>>> Jun 28 13:27:04 busch /usr/sbin/kamailio[18836]: INFO: app_lua
>>>> [app_lua_sr.c:98]: lua_sr_log(): some more logging
>>>>
>>>>
>>>>
>>>>
>>>> As far as I understand the documentation, the second packet should
>>>> wait for the lock on the Call-ID before executing the lua function. So
>>>> process 18836 should finish its lua execution before 18837 can do
>>>> anything further. Did I completely misunderstand the lock() function?
>>>>
>>>> I'm using Kamailio 5.0.2.
>>>>
>>>> Thanks for helping me understand what Kamailio is doing here.
>>>>
>>>> Best Regards,
>>>> Sebastian
>>> _______________________________________________
>>> Kamailio (SER) - Users Mailing List
>>> sr-users at lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>> --
>> Daniel-Constantin Mierla
>> www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
>> Kamailio Advanced Training - www.asipto.com<http://www.asipto.com>
>> Kamailio World Conference - www.kamailioworld.com<http://www.kamailioworld.com>
>>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

--
Daniel-Constantin Mierla
www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Kamailio Advanced Training - www.asipto.com<http://www.asipto.com>
Kamailio World Conference - www.kamailioworld.com<http://www.kamailioworld.com>




------------------------------

Subject: Digest Footer

_______________________________________________
sr-users mailing list
sr-users at lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


------------------------------

End of sr-users Digest, Vol 146, Issue 2
****************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170703/acf5e68d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wire12.pcap
Type: application/vnd.tcpdump.pcap
Size: 118476 bytes
Desc: wire12.pcap
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170703/acf5e68d/attachment.pcap>


More information about the sr-users mailing list