Re: [SR-Users] Kamailio stops responding to OPTIONS for some time

2022-09-30 Thread Yuriy Gorlichenko
I would check ksr_request_route() first if it contains any blocking
operations like  http_client or long database queries before sending a
response to the sender

пт, 30 сент. 2022 г. в 08:37, Muhammad Danish Moosa :

> Hi,
>
> With Kamailio 5.5.3 (with KEMI/Lua) I noticed it apparently had stopped
> responding to OPTIONS in my test system. It can cause problems if a similar
> issue appears in production.
> Only thing i could observe it was apparently responding to INVITE and
> CANCEL etc randomly , its pretty strange as it was not dead completely.
> There was no core dump, I restarted and it started functioning again.
>
> Any clues please?
>
>
> --
> Muhammad Danish Moosa
>
> " The core of mans' spirit comes from new experiences. "___ Christopher
> McCandless
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Disabling video rtp proxing

2022-08-26 Thread Yuriy Gorlichenko
The easiest way I see is:
Set up mod parameters for rtpengine
Read_avp and write_avp
During the request processing get $rb and put it into read_avp

Change/remove needed lines from the sdp in avp using regexp or
lua/js/python (do not use sdpos as it works with initial sdp, so it won't
affect the data in avp )

Call rtpengine_manage
Use write_avp after in the call of set_body to apply updated value

https://www.kamailio.org/docs/modules/devel/modules/textops.html#textops.f.set_body

Then you get your changes.

On Fri, 26 Aug 2022, 01:23 mayamatakeshi,  wrote:

> Hi,
> Yes, I tried.
> I had this code in my cfg file:
>
> sdp_remove_media("video");
> append_hf("P-hint: video removed\r\n");
> rtpengine_offer("symetric direction=pub direction=priv
> codec-transcode=PCMU codec-transcode=PCMA codec-transcode=GSM
> codec-transcode=G729");
>
> But when I check the INVITE going out from kamailio,
> I see the P-hint header but the m=video line is still there in the SDP:
>
> INVITE sip:user2@10.255.255.1997072 SIP/2.0
> Max-Forwards: 70
> Record-Route:
> 
> To:  
> From:  050 ;tag=837235
> Call-ID: 368391
> CSeq: 14806 INVITE
> Content-Type: application/sdp
> Contact:  
> User-Agent: Zoiper
> Allow-Events: presence, kpml, talk
> Via: SIP/2.0/UDP
> 192.168.2.198;branch=z9hG4bK82de.2d1517380038597f70a08f7217851c70.0
> Via: SIP/2.0/UDP 10.255.255.199:7070
> ;received=192.168.2.50;branch=z9hG4bK794289;rport=7070
> Content-Length: 518
> P-hint: video removed
>
> v=0
> v=0
> o=71924084 8000 8001 IN IP4 192.168.2.110
> s=SIP Call
> c=IN IP4 192.168.2.198
> t=0 0
> m=audio 48882 RTP/AVP 0 8 3 18 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:3 GSM/8000
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=no
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-15
> a=sendrecv
> a=rtcp:48883
> a=ptime:20
> m=video 48912 RTP/AVP 105
> b=AS:704
> a=rtcp-fb:* nack pli
> a=rtcp-fb:* ccm fira=rtpmap:105 H264/9
> a=fmtp:105 profile-level-id=428016; packetization-mode=1
> a=sendrecv
> a=rtcp:48913
>
> I also tried doing the removal after rtpengine_offer()/rtpengine_manage()
> but the same thing happens.
> I also tried to use
>   msg_apply_changes();
> with the same results.
>
> So it seems rtpengine_offer() is executed later in the processing and over
> the original SDP.
>
> Checking the docs what eventually worked was this:
>
> # set rtpengine to read the body from an AVP:
> modparam("rtpengine", "read_sdp_pv", "$avp(sdp)")
>
> # set $avp(sdp) to a copy of $rb and replace the m=video line:
> $avp(sdp) = $rb;
> subst_attr("$sdp","/m=video [0-9]*/m=video 0/");
>
> So rtpengine would operate on a
>   m=video 0 RTP/AVP XXX
> line and so it would not set up rtp proxying for it.
>
> Then the original SDP line:
>   m=video 10004 RTP/AVP 105
> became this in the forwarded SDP:
>   m=video 0 RTP/AVP 0
>
> Thanks.
>
> On Thu, Aug 25, 2022 at 3:39 PM Henning Westerholt  wrote:
>
>> Hello,
>>
>>
>>
>> already tried the sdpops module?
>>
>>
>> https://kamailio.org/docs/modules/5.5.x/modules/sdpops.html#sdpops.f.sdp_remove_media
>>
>>
>>
>> Cheers,
>>
>>
>>
>> Henning
>>
>>
>>
>> --
>>
>> Henning Westerholt – https://skalatan.de/blog/
>>
>> Kamailio services – https://gilawa.com
>>
>>
>>
>> *From:* sr-users  *On Behalf Of *
>> mayamatakeshi
>> *Sent:* Thursday, August 25, 2022 1:49 AM
>> *To:* Kamailio (SER) - Users Mailing List 
>> *Subject:* [SR-Users] Disabling video rtp proxing
>>
>>
>>
>> Hi,
>>
>> I'm using rtpengine for RTP proxying with kamailio.
>>
>> I use it just for audio.
>>
>> But eventually some terminal reinvites offering video.
>>
>> I don't want to refuse the request but just disable RTP proxying for
>> video as my employer has limited bandwidth and want to reserve it only for
>> audio.
>>
>> So I checked the rtpengine module documentation but it seems there is no
>> way to restrict RTP proxying to be performed only for m=audio.
>>
>> I tried some things like
>>
>> replace_body("^m=video [0-9]+", "m=video 0");
>>
>> and
>> subst_body('/^m=video [0-9]+ /m=video 0 /');
>>
>> and
>>
>> msg_apply_changes();
>>
>> but still the RTP proxying  for video is set up.
>>
>>
>>
>> Any hints on how to solve this?
>>
>>
>>
>>
>>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Forward reply in onreply_route

2022-06-29 Thread Yuriy Gorlichenko
Since 5.6.0 there is forward_reply() in corex module
https://kamailio.org/docs/modules/5.6.x/modules/corex.html#corex.f.forward_reply
it doesn't have enough description but looking at the source it calls
core->do_forward_reply function
which ( at least as I see ) doesn't block the execution of the further
script commands.

вт, 28 июн. 2022 г. в 18:45, Alex Balashov :

>
> > On Jun 28, 2022, at 10:06 AM, Olle E. Johansson  wrote:
> >
> > I don’t know how to do it that way, but I would add stuff to mqueue and
> process it asynchronously in the background.
>
> +1 — I think this is the way to go. Just push the workload off to some
> other async routine.
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] ipops dns_query not working using Kemi

2022-06-09 Thread Yuriy Gorlichenko
BTW for the KEMI ( at least in Lua ) it is not a big deal to do in the
language itself:

local socket = require "socket"
> local _, details = socket.dns.to.ip(domain)


-- details.ip would contain list of IPs resolved.

чт, 9 июн. 2022 г. в 08:44, Daniel-Constantin Mierla :

> Hello,
>
> this should be fixed in 5.6.x series. Probably it will be backported to
> 5.5.x before releasing next version in the series, if it is not too complex
> to do it.
>
> Cheers,
> Daniel
> On 09.06.22 08:20, Thomas de Rooij | CM.com wrote:
>
> Hi all,
>
>
>
> We are trying to do a DNS query using Kemi:
>
> KSR.ipops.dns_query(domain, "xyz")
>
>
>
> The result is always -3. This is returned here:
>
>
> https://github.com/kamailio/kamailio/blob/5.5.4/src/modules/ipops/ipops_pv.c#L370
>
>
>
> It seems weird to me that the error code is returned because the same
> non-Kemi code works just fine.
>
> Could it be related to this issue:
>
> https://github.com/kamailio/kamailio/issues/2052
>
>
>
> Thanks.
>
>
>
> Kind regards,
>
> Thomas
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Kamailio Advanced Training - Online: June 20-23, 2022
>   * https://www.asipto.com/sw/kamailio-advanced-training-online/
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Debian: Kamailio: -> FIN - SYN -> on new port

2022-05-26 Thread Yuriy Gorlichenko
Usually Kamailio tries to establish connection with the port was described
in latest contact from client. Whydo you expect to call other port?

And the second question - there are keepalive tcp mechanics available at
the kamailio side and reuse port as well. Why not use it to avoid
reistablishing connection?

On Thu, 26 May 2022, 08:04 Kevin Browne,  wrote:

> Hi, am looking for some specific Kamailio help i cant seem to find
> anywhere (
>
> #
>
> running Kamailio on Debian/buster ...
>
> ##
>
> after receipt of tcp FIN, port is closed.
>
> when signaling is required again from Kamailio side.
>
> Kam is attempting SYN on FINd (closed) port.
>
> this is rejected RST.
>
> How to change SYN to re-establish tcp on new ephemeral port?
>
>
> ##
>
> another description, same problem:
>
> FIN received from (external) cisco (call owner) due to port recycling, not
> to keep port open after x minutes. everything is as expected re ACKs and
> such.
> When Kam wants to send REFER to cisco after the FIN, tcp attempts a SYN
> (as we'd expect) but sends SYN on old closed port.
>
> ##
>
> Where to change this Kam/OS/other is where i'm attempting to identify,
> then figure how to change.
>
> Thank you.
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Problem with Record-Route in Public to Private Network

2022-05-03 Thread Yuriy Gorlichenko
Adding some more info:
It also can be tricky to manage Route headers via loose_route as Kamailio
might not find an external (advertised ) IP and keep sending requests to
this IP as it will present at the routes
There are 2 ways how to avoid it:
 - Use one Record-Route and regex to change Record-Route header values
depending on packet direction
 - Use record_route_preset(addr1, addr2 ) and rewrite the loose_route()
function behavior to force it to handle Route handing logic to make it
possible to remove addresses Kamailio doesn't know

P.S. I believe Kamailio must remove all Route headers containing
its addresses whether it is advertised or not, but at 5.5 it wasn't working
for me in that way. I did not have a chance to spend much time diving into
the source code and find why, but I rewrote loose_route on Lua with KEMI to
make it work. The benefit I've got - the Kamailio script logic is
now independent of the IP addresses it listens to.

вт, 3 мая 2022 г. в 12:23, Daniel-Constantin Mierla :

> Hello
>
> using two sockets for internal and external traffic is the easier way. The
> alternative is to use various functions from rr and core to set
> record-route and via headers.
>
> To detect what is the incoming local sockets, there are variables for
> received ip, port or socket name -- see the pv cookbook.
>
> Cheers,
> Daniel
> On 29.04.22 19:02, Carlos Escalona wrote:
>
>
> Hello! I wish everyone who reads this message a good day.
>
> I would appreciate some guidance with the configuration of my Kamailio.
>
> Initially, I have the following architecture:
>
> Endpoints  Kamailio (listen PrivateIP advertise
> PublicIP)  Asterisk
>
> CONFIG:
> https://gist.github.com/Carlos-Escalona94/3a289af05b05c69ae563ab29c9ec4710
>
> In general, calls initiated from outside the system work perfectly, but I
> have a problem with calls initiated from Asterisk.
>
> According to what I was able to investigate and understand, the problem
> arises from the fact that Kamailio uses the public IP for the entire
> routing system that involves the Record-Route and Route Headers. This in
> turn causes Asterisk to get lost trying to send messages outside of the
> INITIAL INVITE transaction, for example, the ACK response to the 200 Ok
> received from the Endpoint since it tries to use Kamailio's public IP to
> which Asterisk doesn't have access.
>
> I tried to force Asterisk to send all messages to Kamailio's private IP
> regardless of their nature, but it doesn't seem like an appropriate
> solution.
>
> On the other hand, I tried to modify the architecture a bit so that it was
> something similar to this:
>
> Endpoints < Public IP> Kamailio (listen PrivateIP:P1 advertise
> PublicIP) < PrivateIP-> Kamailio (listen PrivateIP:P2) <
> PrivateIP > Asterisk
>
> CONFIG:
> https://gist.github.com/Carlos-Escalona94/4d681bb189c6190941d291965e123889
>
> It seems to me that this would solve the problem, but I have two doubts
> about this architecture, the first is that I would like to know if there is
> an easier way to solve the problem that I am not considering, and on the
> other hand, I have not found a way to identify from which interface is
> receiving the message to perform the routing properly.
>
>
> Thanks for the attention.
>
>
>
> *Esta mensagem pode conter informação confidencial ou privilegiada, sendo
> seu sigilo protegido por lei. Se você não for o destinatário ou a pessoa
> autorizada a receber esta mensagem, não pode usar, copiar ou divulgar as
> informações nela contidas ou tomar qualquer ação baseada nessas
> informações. Se você recebeu esta mensagem por engano, por favor, avise
> imediatamente ao remetente, respondendo o e-mail e em seguida apague-a.
> Agradecemos sua cooperação. *
>
>
> *This message may contain confidential or privileged information and its
> confidentiality is protected by law. If you are not the addressed or
> authorized person to receive this message, you must not use, copy, disclose
> or take any action based on it or any information herein. If you have
> received this message by mistake, please advise the sender immediately by
> replying the e-mail and then deleting it. Thank you for your cooperation. *
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Kamailio Advanced Training - Online
>   * https://www.asipto.com/sw/kamailio-advanced-training-online/
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep 

Re: [SR-Users] function 'sl_send_reply' is not available

2022-05-03 Thread Yuriy Gorlichenko
Done it for myself but might be will be useful too:
There are some helpers and tools might be reused for some who uses lua
https://github.com/ovoshlook/kemi-lua-utils-and-tools

вт, 3 мая 2022 г. в 13:28, David Villasmil :

> Hello guys,
>
> To answer my own question and leave here for help:
>
> I was using sl_send_reply like:
>
> function send_reply()
> KSR.log("err","error log message from embedded interpreter\n");
> KSR.sl.modf("sl_send_reply", "200", "OK");
> end
>
> but sl_send_reply is not used like that, if you go to
>
> https://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/modules/#sl
> (you can find documentation for all modules here)
>
> you'll see that i must be used like:
>
> KSR.sl.sl_send_reply("200", "OK");
>
> And now it works great.
>
>
> Thanks everyone!
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
>
>
> On Tue, May 3, 2022 at 12:01 PM David Villasmil <
> david.villasmil.w...@gmail.com> wrote:
>
>> Hello guys,
>>
>> I'm starting to try KEMI and i already hit a snag... right now i'm
>> simply testing with:
>>
>>
>> loadmodule "app_lua.so"
>> modparam("app_lua", "load", "/etc/kamailio/myscript.lua")
>> cfgengine "lua"
>> route {
>>   lua_run("send_reply");
>> }
>>
>> But i'm always getting:
>>
>> 0(118) ERROR: app_lua [app_lua_api.c:1633]: sr_kemi_lua_modf(): function
>> 'sl_send_reply' is not available
>>
>>
>> I'm guessing that function is not exported by the module.. if that's the
>> case, how can i use it?
>>
>> Regards,
>>
>> David Villasmil
>> email: david.villasmil.w...@gmail.com
>> phone: +34669448337
>>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Can Kamailio send an ACK to a final response?

2022-03-21 Thread Yuriy Gorlichenko
 Here are some methods You can use like:
- t_uac_send from TM
- uac_req_send from UAC
- send_data from COREX
Depending on your needs

On Sat, 19 Mar 2022, 12:36 Marrold,  wrote:

> Hello,
>
> I'm exploring using Kamailio as a dumb edge proxy, and as such I want to
> keep things as lean as possible.
>
> In some scenarios I would like the "core" proxies to signal to the edge
> that a request should be dropped without a response. This could be with a
> custom header in the reply or perhaps a 444 response ( nginx uses this
> internally to drop a request without responding )
>
> I have discovered that if I drop the response in the reply_route, the edge
> proxy doesn't send an ACK and keeps retransmitting the request until it
> times out, at which point it sends a 408 back to the UA.
>
> Is there any way to ACK the response from the core and destroy the
> transaction?
>
> Thanks
> Matthew
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio call flows with Asterisk

2022-01-05 Thread Yuriy Gorlichenko
This might be tricky to move fast  registrations from the asterisk to
kamailio if asterisk for example,  handles a lot of logic and used as
presence service and queues manager.
The other approach  might work here: to go with kamailio as a load balancer
between asterisks but keep registrations of all users across the asterisks
first till migration of other functionality will be done. Usable scenario
in that case - to share registration of the user between multiple asterisks
using kamailio.

However regarding trunks: kamailio is a good candidate to be used as
entrypoint for trunks and as main point for outgoing calls from the trunks.
It can handle as IP2IP based relationship as registration based ( see UAC
module ).

If your providers allow you to send RTP traffic from specific ips but not
from ip of the endpoint SIP message came from - you can run rtp directly
from the asterisks.

*Annoying mode on
Asterisk is not an RTP proxy in any case
*Annoying mode off

On Wed, 5 Jan 2022, 17:41 Henning Westerholt,  wrote:

> Hello,
>
> there are of course many options depending on your requirements etc..
>
> But if your infrastructure has grown over a certain size, then common
> architectures are:
>
> - using kamailio of load balancer in front of asterisk for
> security/scalability
> - using kamailio additionally to handle also certain SIP applications,
> like registration handling
>
> Again, generalization - Kamailio should handle the registration more
> scalable and more reliable as asterisk.
>
> Cheers,
>
> Henning
>
> --
> Henning Westerholt – https://skalatan.de/blog/
> Kamailio services – https://gilawa.com
>
> -Original Message-
> From: sr-users  On Behalf Of Nauman
> Sulaiman (SESSIONTALK)
> Sent: Wednesday, January 5, 2022 3:13 PM
> To: sr-users@lists.kamailio.org
> Subject: [SR-Users] Kamailio call flows with Asterisk
>
> Hi,
>
> We are using Asterisk as a PBX with users directly registered to Asterisk
> and Asterisk registering to SIP trunks. We are now looking to put Kamailio
> in front of Asterisk to handle SIP registrations from the SIP clients.
>
> In a ‘typical’ architecture should we keep the SIP trunk registrations on
> Asterisk or is Kamailio used for this? We want to keep Asterisk as the RTP
> proxy so we don’t want a call setup by Kamailio with RTP then going direct
> between user agents.
>
> Regards
> Nauman
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Kamailio and robotics repo

2021-09-01 Thread Yuriy Gorlichenko
Following the promise during the Kamailio world 2021 I share the source
code of the Kamailoi and robotics repo:

https://github.com/arigativa/robolive
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Manage multiple RTP streams with different TO-tags (forking)

2021-08-27 Thread Yuriy Gorlichenko
Hello.
The first thing: to tag can't be changed due session once it passed.

If provider uses forking mechanism the it has to be hidden from your
system.

Regarding SDP according
https://datatracker.ietf.org/doc/html/rfc3261#section-13.2.1
They can't change SDP answer description on the fly. Only first SDP answer
used as proper, all othe answers will be ignored.

On Fri, 27 Aug 2021, 11:27 B. Tietz,  wrote:

> Hello,
>
> following situation.
> I have a Kamailio (5.4) using rtpengine to loadbalance calls.
>
> If a call from Alice comes in, Kamailio decides to send the call to
> Carrier B from Bob.
> Bobs Phone is ringing and the carrier B send a 183 Session Progress with
> SDP and To-tag=abcd. The SDP has G722 as codec and port 1234.
> A few moments later carrier B send a second 183 Session Progress with SDP
> and TO-tag=fghi. The SDP has G711 as codec and port 5678. This is done, to
> play some funky music as ringtone -.-
> If Bob answers the call, carrier B sends a 200 OK WITHOUT SDP and
> TO-tag=abcd. So this should instruct our Kamailio to switch to the first
> G722 and port 1234.
>
> But sadly, this is just not working as expected.
>
> We tried to set the flags media-handover and port-latching for the
> rtpengine options and additionally set a to-tag when using rtpenging_manage.
> But this doesn't solve the codec change, so we have only audio when Bob
> answers the call, but no ringtone-music. If we allow G711 only in the
> outgoing INVITE to Bob, we have also tha ringtone-muisic, because there is
> no codec-change.
>
> Carrier B tells us, they are using a fork-mechanism.
>
> Is there something we can do, to support the codec change in 183? Or
> enforce carrier B to send SDP in 200 OK? Or anything else?
>
> Carrier B can not change anything in the ringtone-music-backend. They are
> stuck on G711.
>
> Thanks!
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [VoLTE] 401 unauthorized error

2021-08-24 Thread Yuriy Gorlichenko
   alg: hmac-sha-1-96*
> *prot: esp*
> *mod=trans*
> *ealg: aes-cbc*
> *spi-c: 10559690 (0x00a120ca)*
> *spi-s: 65664952 (0x03e9f7b8)*
> *port-c: 31112*
> *port-s: 31803*
> *[Security-mechanism]: ipsec-3gpp*
> *alg: hmac-sha-1-96*
> *prot: esp*
> *mod=trans*
> *ealg: null*
> *spi-c: 10559690 (0x00a120ca)*
> *spi-s: 65664952 (0x03e9f7b8)*
> *port-c: 31112*
> *port-s: 31803*
> *[Security-mechanism]: ipsec-3gpp*
> *alg: hmac-md5-96*
> *prot: esp*
> *mod=trans*
> *ealg: des-ede3-cbc*
> *spi-c: 10559690 (0x00a120ca)*
> *spi-s: 65664952 (0x03e9f7b8)*
> *port-c: 31112*
> *port-s: 31803*
> *[Security-mechanism]: ipsec-3gpp*
> *alg: hmac-md5-96*
> *prot: esp*
> *mod=trans*
> *ealg: aes-cbc*
> *spi-c: 10559690 (0x00a120ca)*
> *spi-s: 65664952 (0x03e9f7b8)*
> *port-c: 31112*
> *port-s: 31803*
> *[Security-mechanism]: ipsec-3gpp*
> *alg: hmac-md5-96*
> *prot: esp*
> *mod=trans*
> *ealg: null*
> *spi-c: 10559690 (0x00a120ca)*
> *spi-s: 65664952 (0x03e9f7b8)*
> *port-c: 31112*
> *port-s: 31803*
> *Authorization: Digest
> username="00101031...@ims.mnc001.mcc001.3gppnetwork.org
> <00101031...@ims.mnc001.mcc001.3gppnetwork.org>",realm="ims.mnc001.mcc001.3gppnetwork.org
> <http://ims.mnc001.mcc001.3gppnetwork.org>",uri="sip:ims.mnc001.mcc001.3gppnetwork.org
> <http://ims.mnc001.mcc001.3gppnetwork.org>",nonce="",response=""*
> *Authentication Scheme: Digest*
> *Username: "00101031...@ims.mnc001.mcc001.3gppnetwork.org
> <00101031...@ims.mnc001.mcc001.3gppnetwork.org>"*
> *Realm: "ims.mnc001.mcc001.3gppnetwork.org
> <http://ims.mnc001.mcc001.3gppnetwork.org>"*
> *Authentication URI: "sip:ims.mnc001.mcc001.3gppnetwork.org
> <http://ims.mnc001.mcc001.3gppnetwork.org>"*
> *    Nonce Value: ""*
> *Digest Authentication Response: ""*
> *Call-ID: txecbknlk@192.168.101.3 *
> *CSeq: 1 REGISTER*
> *Sequence Number: 1*
> *Method: REGISTER*
> *Max-Forwards: 70*
> *Via: SIP/2.0/TCP
> 192.168.101.3:5060;branch=z9hG4bKrzecbkJzsat7Xk6daqm5;rport*
> *Transport: TCP*
> *Sent-by Address: 192.168.101.3*
> *Sent-by port: 5060*
> *Branch: z9hG4bKrzecbkJzsat7Xk6daqm5*
> *RPort: rport*
> *User-Agent: IM-client/OMA1.0 HW-Rto/V1.0*
> *Content-Length: 0*
>
>
>
>
> -Original Message-
> From: "Yuriy Gorlichenko" 
> To: "Kamailio (SER) - Users Mailing List" ;
> Cc:
> Sent: 2021-08-24 (화) 05:55:26 (UTC+09:00)
> Subject: Re: [SR-Users] [VoLTE] 401 unauthorized error
>
>
> Hi  401 is normal response for sip auth
> It is also normal response for IMS service
> Look into sip basic auth mechanism to clarify what is going on here and
> additionally look into Spec of IMS auth. There should be only auth algo
> change
> I believe you did not check further request processing.
> On Mon, 23 Aug 2021, 18:19 오택경,  wrote:
>
> Hi.
>
> I am implementing the VoLTE setup with the dockerized project (
> https://github.com/herlesupreeth/docker_open5gs).
>
> I have almost done to run the VoLTE service, but 401 unauthorized error in
> sip and auth-pending error in fhoss have occured.
>
> How can I fix this problem?
>
> I will share the discussion note in which I tried to solve some problems
> including the above one.
> : https://github.com/herlesupreeth/docker_open5gs/issues/55
>
> Very thanks,
> Taekkyung Oh.
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> __ Kamailio -
> Users Mailing List - Non Commercial Discussions *
> sr-users@lists.kamailio.org Important: keep the mailing list in

Re: [SR-Users] [VoLTE] 401 unauthorized error

2021-08-23 Thread Yuriy Gorlichenko
Hi  401 is normal response for sip auth
It is also normal response for IMS service
Look into sip basic auth mechanism to clarify what is going on here and
additionally look into Spec of IMS auth. There should be only auth algo
change
I believe you did not check further request processing.
On Mon, 23 Aug 2021, 18:19 오택경,  wrote:

> Hi.
>
> I am implementing the VoLTE setup with the dockerized project (
> https://github.com/herlesupreeth/docker_open5gs).
>
> I have almost done to run the VoLTE service, but 401 unauthorized error in
> sip and auth-pending error in fhoss have occured.
>
> How can I fix this problem?
>
> I will share the discussion note in which I tried to solve some problems
> including the above one.
> : https://github.com/herlesupreeth/docker_open5gs/issues/55
>
> Very thanks,
> Taekkyung Oh.
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] How tell if rtp packets are being relayed through rtpengine in kamailio

2021-08-23 Thread Yuriy Gorlichenko
You can look into rtpengine logs with log level 7 to see if there are
requests from the kamailio to rtpengine.
Also you can look on it with tcpdump on port you passed into kamailio.cfg
to connect rtpengine to.

If there are requests and responses then you can look into SDP part of the
packet to see if SDP changed properly after being handled by rtpengine.
Also rtpengine after each call gives summary of the call which also sent
back in more detailed way ( stats ) after calling delete message.

On Mon, 23 Aug 2021, 09:20 Mojtaba,  wrote:

> Hello,
> The Kamailio just works  as SIPProxy and it does not relay RTP packets at
> all. Some services are available as module in Kamailio for relaying RTP
> packets like as rtpproxy, rtpengine, lrkproxy. In all cases, you have to
> set WITH_NAT option in Kamailio configuration.
> With Regards.
> Mojtaba
>
> On Mon, Aug 23, 2021 at 10:42 AM Faiz Fazaluddin 
> wrote:
>
>> Hi,
>> I want to see if rtp packets are being relayed through kamailio. I am
>> attmepting to connect rtpengine with kamailio, but am not sure if it is
>> working, how can I tell?
>>
>> I have the kamailio server on a different VM than the clients. In
>> wireshark, no rtp packets show on the server VM and rtp packets only seem
>> to be going directly through the client VM.
>>
>> Rtp engine mentions being unable to find hashtables when attempting to
>> implement a delete_node command.
>>
>> Thank you very much for your help,
>> Faiz
>>
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
> --
> --Mojtaba Esfandiari.S
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] RTPEngine: Async connection/communication between Kamailio and RTPEngine

2021-08-12 Thread Yuriy Gorlichenko
RTPengine since 9.0 provided HTTP transport for control protocol messages.
you can use http_async_client as the easiest way to achieve async
communication between Kamailio and RTPengine.
But this doesn't resolve the latency problem. This will only unblock
workers to be able to handle other requests while waiting for rtpengine
response.

чт, 12 авг. 2021 г. в 10:29, David Villasmil :

> Hello,
>
> I may be grossly misunderstanding you, but how would doing async polling
> with RTPEngine that solve a latency problem? I’m not trying to shoot down
> the idea/question/request, just wondering.
>
> David
>
> On Thu, 12 Aug 2021 at 09:06, Mitesh Thakkar 
> wrote:
>
>> Hi,
>>
>> Couple of week before I have posted feature request -
>> https://github.com/kamailio/kamailio/issues/2807
>>
>> As suggested, I am trying to figure out how I can achieve it with async
>> or sworker modules. Can someone help me to understand how to use those
>> modules to achieve async connectivity?
>>
>> Regards,
>> Miteshkumar Thakkar
>>
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> --
> Regards,
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Issues with TOPOS when not relaying an in-dialog request

2021-08-05 Thread Yuriy Gorlichenko
for me, it seems you don't handle subscribe as other requests and it
changes IP which came at the Contact header. Then this address is used for
for the rest of the requests in this dialog.

чт, 5 авг. 2021 г. в 14:27, Marrold :

> Hi Henning,
>
> I realised as soon as I sent the message I'd forgotten that important
> detail. It's 5.5.1 on Debian 10 from the repos.
>
> Thanks!
>
> On Thu, Aug 5, 2021 at 8:53 AM Henning Westerholt  wrote:
>
>> Hello,
>>
>>
>>
>> Others might be able to comment in more detail, but quick question: which
>> version of Kamailio you are using?
>>
>> For 5.5.x branch some extensions were added to the topos module for
>> SUBSCRIBEs:
>>
>>
>>
>> +This module is designed to work for presence
>> (SUBSCRIBE-based) dialogs too.
>>
>> +   The REGISTER and PUBLISH requests are skipped from
>> processing
>>
>>
>>
>> Cheers,
>>
>>
>>
>> Henning
>>
>>
>>
>> --
>>
>> Henning Westerholt – https://skalatan.de/blog/
>>
>> Kamailio services – https://gilawa.com
>>
>>
>>
>> *From:* sr-users  *On Behalf Of *
>> Marrold
>> *Sent:* Wednesday, August 4, 2021 10:15 PM
>> *To:* Kamailio (SER) - Users Mailing List 
>> *Subject:* [SR-Users] Issues with TOPOS when not relaying an in-dialog
>> request
>>
>>
>>
>> Hi,
>>
>> I am currently using TOPOS to make Kamailio behave more like a B2BUA from
>> the clients perspective. It's working well, however I have discovered a
>> scenario where it fails.
>>
>> To aid with some interoperability I am sending (sl_send_reply) 200 OK to
>> an in-dialog SUBSCRIBE request during a call. Once this has happened, the
>> subsequent BYE from the B leg goes to the incorrect (Private) IP. If I
>> disable this SUBSCRIBE, or relay it to the B leg, the BYE goes to the
>> expected IP address.
>>
>>
>>
>> Does anyone know where I am going wrong? I have tried not calling
>> record_route() for these messages but the result is the same.
>>
>>
>>
>> I've attached the ladder diagram of the call below. Note the subscribe is
>> not relayed in this scenario.
>>
>>
>>
>> Thanks!
>>
>>
>>
>>
>>
>>
>>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] get defined names in kemi script

2021-07-13 Thread Yuriy Gorlichenko
#define is a directive for the cfg scripting. So you won't be able to reach
this definition from Lua/python/etc AFAIK.

But there are at least 2 possibilities how to achieve this:
1 - define global variables/constants in your script instead of #define.
It will be visible across all namespace of your script.
2 - use  pv modparap setvar. Once you done #define put it into variable on
a modparam stage via this param. Then you can access those vars via kemi.


On Tue, 13 Jul 2021, 08:55 Daniel-Constantin Mierla, 
wrote:

> Hello,
>
> if you have:
>
> #!define X
>
> then you can have conditional blocks like:
>
> #!ifdef X
>
> #endif
>
> or:
>
> #!ifndef X
>
> #endif
>
> Or, are you looking for something else?
>
> Cheers,
> Daniel
>
> On 12.07.21 14:17, Riccardo Villa wrote:
> > Hello guys,
> >
> > do you know if it’s possible for a kemi script to know if a name is
> defined (with #!define) in kamailio.cfg? It would be useful to modify kemi
> script logic depending on feature/module presence.
> >
> > Thanks in advance for your help.
> >
> > Regards,
> >
> > Riccardo
> >
> >
> > --
> > --
> > NOTICE: This electronic mail transmission may contain confidential
> > information and is intended only for the person(s) named. Any use,
> copying,
> > or disclosure by any other person is strictly prohibited. If you have
> > received this transmission in error, please notify the sender via e-mail.
> >
> > __
> > Kamailio - Users Mailing List - Non Commercial Discussions
> >   * sr-users@lists.kamailio.org
> > Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> > Edit mailing list options or unsubscribe:
> >   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.com
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] UAC_AUTH with RTPEngine NAT

2021-07-02 Thread Yuriy Gorlichenko
You won't see proper $mb after rtpengine changes in that way. $mb will be
rewritten on the latest stage of packet processing. See sngrep or wireshark
or either use read_sdp_pv / write_sdp_pv

Also our can use apply_message_changes before log, but I would not
recommend to do so if this is a production under load.

On Fri, 2 Jul 2021, 10:28 Paul Smith,  wrote:

>
> Hi,
>
> [Note I posted this yesterday from the wrong email address.]
>
>
> I am struggling to see why my SDP is not being set correctly on the INVITE
> to my supplier with Proxy-Authentication when I use uac_auth().
>
> The initial INVITE to my supplier has correct SDP set by rtpengine_manage.
> Then supplier replies with a 407.  My failure route correctly handles the
> Auth, and also calls NATMANAGE again... but this time the SDP is unchanged
> and the private IP and original media information from the original device
> is relayed to my supplier.
>
> kamailio.cfg isbased on the default config.  Running kamailio 5.4.6 and
> using example from uac module for uac_auth.
>
> My failure route calls NATMANAGE.  Is there anything special about
> uac_auth?  Do I need some extra magic to apply the message body changes
> after I have run rtpengine_manage().
>
>
> I can see that the NATMANAGEr test for nat_uac_test("8") is true, and
> rtpengine_manage() s being called.  But the outgoing SDP is not changed.
>
>
> Thanks for any hints!
>
> Paul
>
>
> 
>
> Extract of kamailio.cfg
>
>
> failure_route[TRUNKAUTH] {
>
> if (t_is_canceled()) {
>
> exit;
>
> }
>
> route(NATMANAGE);
>
> xlog("L_INFO","In failure route, just finshed NATMANAGE and now body is 
> $mb");
>
> if(t_check_status("401|407")) {
>
> # $avp(auser) = "test";
>
> # $avp(apass) = "test";
>
> # $avp(apass) = "36d0a02793542b4961e8348347236dbf";
>
> if (uac_auth()) {
>
> t_relay();
>
> }
>
> exit;
>
> }
>
> }
>
>
>
>
>
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] UAC module register originating from private interface on server

2021-06-02 Thread Yuriy Gorlichenko
Yes. That is correct. Also from 5.5 you can specify contact header for
particular registration separately via DB.

On Wed, 2 Jun 2021, 15:33 Jonathan Hunter,  wrote:

> Hi Yuriy,
>
>
>
> Thank you for the reply! Yes I had seen that but not in 4.4, I assume
> that’s version 5 and above?
>
>
>
> Thanks
>
>
>
> Jon
>
>
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
> Windows 10
>
>
>
> *From: *Yuriy Gorlichenko 
> *Sent: *02 June 2021 14:16
> *To: *Kamailio (SER) - Users Mailing List 
> *Subject: *Re: [SR-Users] UAC module register originating from private
> interface on server
>
>
>
> Ahh sorry I did not see the version of kamailio you are using...
>
>
>
> On Wed, 2 Jun 2021, 14:58 Yuriy Gorlichenko,  wrote:
>
> There is a socket field in the uacreg table you can use to manage which
> interface to use to send register messages from.
>
>
>
> On Wed, 2 Jun 2021, 14:15 Jonathan Hunter,  wrote:
>
> Hi,
>
>
>
> I am working with the UAC module and trying to register with providers,
> and can see
>
> that kamailio keeps sending the REGISTER from the private IP address
> socket on the server (eth0).
>
>
>
> Is it possible to set the default socket or send socket for the REGISTER
> message that gets sent out via kamailio?
>
>
>
> I am running version 4.4.7.
>
>
>
> I notice SIP OPTIONS are being sent out from the public IP address (eth1)
> on the server (as I have set socket in dispatcher) and was hoping for same
> behaviour with uac module.
>
>
>
> Please can anyone advise?
>
>
>
> Many thanks
>
>
>
> Jon
>
>
>
> Sent from Mail
> <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986=04%7C01%7C%7C312a3925a8d54d6321c708d925c8a2fe%7C84df9e7fe9f640afb435%7C1%7C0%7C637582365917513280%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=irrJuXGA%2FeZ%2FeoIAxawrKaYu%2BK6IcGwop2zCBdxujwQ%3D=0>
> for Windows 10
>
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.kamailio.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fsr-users=04%7C01%7C%7C312a3925a8d54d6321c708d925c8a2fe%7C84df9e7fe9f640afb435%7C1%7C0%7C637582365917523351%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=SpDEUsw%2B1mcg4vUkJeT2jKbw63lInmdWa2AC5r%2FsiHQ%3D=0>
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] UAC module register originating from private interface on server

2021-06-02 Thread Yuriy Gorlichenko
Ahh sorry I did not see the version of kamailio you are using...

On Wed, 2 Jun 2021, 14:58 Yuriy Gorlichenko,  wrote:

> There is a socket field in the uacreg table you can use to manage which
> interface to use to send register messages from.
>
> On Wed, 2 Jun 2021, 14:15 Jonathan Hunter,  wrote:
>
>> Hi,
>>
>>
>>
>> I am working with the UAC module and trying to register with providers,
>> and can see
>>
>> that kamailio keeps sending the REGISTER from the private IP address
>> socket on the server (eth0).
>>
>>
>>
>> Is it possible to set the default socket or send socket for the REGISTER
>> message that gets sent out via kamailio?
>>
>>
>>
>> I am running version 4.4.7.
>>
>>
>>
>> I notice SIP OPTIONS are being sent out from the public IP address (eth1)
>> on the server (as I have set socket in dispatcher) and was hoping for same
>> behaviour with uac module.
>>
>>
>>
>> Please can anyone advise?
>>
>>
>>
>> Many thanks
>>
>>
>>
>> Jon
>>
>>
>>
>> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
>> Windows 10
>>
>>
>> __
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users@lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to
>> the sender!
>> Edit mailing list options or unsubscribe:
>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] UAC module register originating from private interface on server

2021-06-02 Thread Yuriy Gorlichenko
There is a socket field in the uacreg table you can use to manage which
interface to use to send register messages from.

On Wed, 2 Jun 2021, 14:15 Jonathan Hunter,  wrote:

> Hi,
>
>
>
> I am working with the UAC module and trying to register with providers,
> and can see
>
> that kamailio keeps sending the REGISTER from the private IP address
> socket on the server (eth0).
>
>
>
> Is it possible to set the default socket or send socket for the REGISTER
> message that gets sent out via kamailio?
>
>
>
> I am running version 4.4.7.
>
>
>
> I notice SIP OPTIONS are being sent out from the public IP address (eth1)
> on the server (as I have set socket in dispatcher) and was hoping for same
> behaviour with uac module.
>
>
>
> Please can anyone advise?
>
>
>
> Many thanks
>
>
>
> Jon
>
>
>
> Sent from Mail  for
> Windows 10
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio: split initialized call to two (three or four or five) numbers

2021-05-28 Thread Yuriy Gorlichenko
If the question only in changing R-URI but not call forking behaviour
itself - you can go with append_branch function and pseudo vars you can set
to each branch.

On Fri, 28 May 2021, 09:34 Henning Westerholt,  wrote:

> Hello,
>
>
>
> there are many ways of doing this parallel-call functionality.
>
>
>
> But one idea is to use e.g., the alias_db module. When you enable a
> certain parameter, it should add additional contacts in the DB table as
> branches.
>
>
>
>
> https://kamailio.org/docs/modules/5.4.x/modules/alias_db.html#alias_db.p.append_branches
>
>
>
> Cheers,
>
>
>
> Henning
>
>
>
> --
>
> Henning Westerholt – https://skalatan.de/blog/
>
> Kamailio services – https://gilawa.com
>
>
>
> *From:* sr-users  *On Behalf Of *?
> 
> *Sent:* Thursday, May 27, 2021 4:45 PM
> *To:* sr-users@lists.kamailio.org
> *Subject:* [SR-Users] kamailio: split initialized call to two (three or
> four or five) numbers
>
>
>
> Hello,
>
>
>
> I have question regarding of call forking on kamailio. Maybe somebody can
> help me.
> For example I have table like
>
>
>
>
> +--+---+--+---+--+
> | First number | Second number | Third number | Fourth number | Fifth
> number |
>
> +--+---+--+---+--+
> |   A number   |   B number|   C number   |   --- |
> --- |
>
> +--+---+--+---+--+
> Table 1: Extra_numbers
>
>
>
> or
>
>
>
> separated by comma
>
>
>
> ++-+
> | First_number   | Additional_numbers  |
> ++-+
> |   Primary number   | 2nd,3rd number  |
> +--+---+
> Table 2: Extra_numbers
>
> ++-+
> | First_number   | Additional_numbers  |
> ++-+
> |   Primary number   |  2nd number,3rd number,4 number |
> ++-+
> Table 3: Extra_numbers
>
>
>
> If kamailio get the call (INVITE) to some number/extension (for example,
> "1st number"), then in routing I request (select `Additional_numbers` from
> `Extra_numbers` where First_number='1 number';) from the mysql database and
> there I check, if "Additional_numbers" exists in the database.
> Then I add "Additional_numbers" to the routing, and generate INVITE to
> "Additional_numbers" and 1 number. (always)
>
>
> set r-uri ($ru) to first destination (2 number)
>
> set r-uri ($ru) to second destination (3 number)
>
> set r-uri ($ru) to Third destination (1 number)
>
> set r-uri ($ru) to n destination
>
>
> How could this be done?
>
>
>
> Who can help with routing?
>
>
>
> --
>
> Best regards,
>
> Fjodor Izmajlov
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio as front proxy for multiple sip servers

2021-05-06 Thread Yuriy Gorlichenko
If pjsip path doest work ( which indeed can be a case )
It is an option for you to mascarade contact on kamailio ( if you need to
register phones on asterisk ), but this is not a trivial.

If you do registrar on kamailio then lookup and set up proper $du for
webrtc endpoints will workout for you I believe.

On Thu, 6 May 2021, 20:43 Eliphas Levy Theodoro,  wrote:

> As I have got 4 different answers (thanks!) I will paste them all down
> there.
>
> Em qua., 5 de mai. de 2021 às 18:44, Eliphas Levy Theodoro
>  escreveu:
> >
> > I am trying to config one kamailio as reverse proxy for a bunch of
> internal (no internet address) separate asterisk sip
> > instances (per domain). The kamailio server would be the only with the
> valid IP address, so would use rtpengine to
> > force to be in the media path.
> >
> > Like this scenario:
> https://opensips.org/pipermail/users/2020-August/043610.html
> >
> > I have used as starting point this very basic config:
> >
> https://blog.voipxswitch.com/2015/03/27/kamailio-basic-sip-proxy-all-requests-setup/
> >
> > Basically just added rtpproxy support, and voilà, inter-SIP is working,
> media always passing into the proxy.
> >
> > The problem: I would have WebRTC phones connecting too. I tried setting
> WSS up in kamailio, and asterisk (pjsip)
> > wouldn't know how to send the message to the proxy: on register it has
> trasnport=wss in the contact: header, looks
> > like it is confusing the asterisk.
> >
> > So, I resort for the wisdom of the list :) What would be the
> good-best-path to take here, hack the header, or put the
> > webphones registering directly on the asterisks (with a nginx reverse
> proxy maybe)?
>
> [..]
>
> Daniel-Constantin Mierla mico...@gmail.com por  lists.kamailio.org
> 06:26 (há 8 horas)
> >
> > if both endpoints can do webrtc srtp, then it works with rtpproxy to do
> srtp packet forwarding for nat traversal or networks bridging.
>
> Yes, when a pair of softphones (ok) and softphones (not yet) exchange
> signalling alright in that scenario, I will start on transcoding...
>
>
> Wojtko, Daniel daniel.woj...@rittec.de por  lists.kamailio.org 05:32
> (há 8 horas)
> > afaik rtpproxy doesn't support WebRTC but rtpengine does
>
> As Daniel said above, I reckon that rtpproxy would work when
> transcoding/translating sip/webrtc is not needed. But first, need to
> pass signalling at least :)
>
>
> Yuriy Gorlichenko ovoshl...@gmail.com por  lists.kamailio.org 05:55 (há 8
> horas)
> >
> > If you looking for examples: you can use this one
> > https://github.com/havfo/WEBRTC-to-SIP as starting point
> >
> > anyway, the Path mentioned by Alex is the best approach.
>
> I tried that one but could not figure most of it out... I think I
> borked it. Tried only changing $du to asterisk instead of doing
> register locally and got the same results (and lots of rtpengine
> chattiness) too, so I am using now a very simple config to make
> finding the signalling problem easier.
>
>
> > Alex Balashov abalas...@evaristesys.com por  lists.kamailio.org 03:26
> (há 10 horas)
> > It sounds like you are in need of the Path extension:
>
> That was one of the modifications I have made, found out later that
> the problem is PJSIP not handling Path: anyway:
> https://community.asterisk.org/t/pjsip-path-module-issues/88046
> https://issues.asterisk.org/jira/browse/ASTERISK-28211
> So I have changed back to the older chan_sip interface, problem
> solved, that one worked with Path: header. Now asterisk sends the
> invite back to kamailio!
>
> Now, the basic signalling of webphone -> kamailio -> asterisk ->
> kamailio -> otherphone is stopping on kamailio itself, it is sending
> the packet via UDP like asterisk was, instead of using the socket.
>
> This is how the webphone contact looks like:
> 
> Kamailio (and asterisk before Path: worked) invites
> UDP:192.0.2.210:5060, instead of the "local" websocket, and of course
> never succeeding.
>
> I tried save()ing the register locally, but I am sure I am doing it wrong.
>
> if someone wants to look at the actual test config, I pasted it:
> https://pastebin.com/RuXniDTU
>
> Cheers,
> --
> Eliphas
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio as front proxy for multiple sip servers

2021-05-06 Thread Yuriy Gorlichenko
If you looking for examples: you can use this one
https://github.com/havfo/WEBRTC-to-SIP as starting point

anyway, the Path mentioned by Alex is the best approach.

чт, 6 мая 2021 г. в 10:34, Wojtko, Daniel :

> ​Hi,
>
> afaik rtpproxy doesn't support WebRTC but rtpengine does
>
>
> Regards
>
>
> Daniel
> --
> *Von:* sr-users  im Auftrag von
> Eliphas Levy Theodoro 
> *Gesendet:* Mittwoch, 5. Mai 2021 23:44
> *An:* sr-users@lists.kamailio.org
> *Betreff:* [SR-Users] Kamailio as front proxy for multiple sip servers
>
> Hello!
>
> I am trying to config one kamailio as reverse proxy for a bunch of
> internal (no internet address) separate asterisk sip instances (per
> domain). The kamailio server would be the only with the valid IP address,
> so would use rtpengine to force to be in the media path.
>
> Like this scenario:
> https://opensips.org/pipermail/users/2020-August/043610.html
>
> I have used as starting point this very basic config:
>
> https://blog.voipxswitch.com/2015/03/27/kamailio-basic-sip-proxy-all-requests-setup/
>
> Basically just added rtpproxy support, and voilà, inter-SIP is
> working, media always passing into the proxy.
>
> The problem: I would have WebRTC phones connecting too. I tried setting
> WSS up in kamailio, and asterisk (pjsip) wouldn't know how to send the
> message to the proxy: on register it has trasnport=wss in the contact:
> header, looks like it is confusing the asterisk.
>
> So, I resort for the wisdom of the list :) What would be the
> good-best-path to take here, hack the header, or put the webphones
> registering directly on the asterisks (with a nginx reverse proxy maybe)?
>
> Someone must have already made a blog with such setup, but I could not
> google-unearth it at least until now.
>
> Regards,
> --
> Eliphas
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] kamailio 5.4.3 ubuntu 20.04 tls - http_async_client

2021-01-28 Thread Yuriy Gorlichenko
Running Debian 10 on docker with http_async_client
Connect to HTTPS.
No issues found.

ср, 27 янв. 2021 г. в 14:01, Filippo Graziola :

> Hello,
>
> here are the results for ssl packages (dpkg -l | grep ssl):
>
> ii  libcrypt-openssl-bignum-perl 0.09-1build3
>  amd64Perl module to access OpenSSL multiprecision integer
> arithmetic libraries
> ii  libcrypt-openssl-random-perl 0.15-1build2
>  amd64module to access the OpenSSL pseudo-random number generator
> ii  libcrypt-openssl-rsa-perl0.31-1build1
>  amd64module for RSA encryption using OpenSSL
> ii  libevent-openssl-2.1-7:amd64 2.1.11-stable-1
> amd64Asynchronous event notification library (openssl)
> ii  libgnutls-openssl27:amd643.6.13-2ubuntu1.3
> amd64GNU TLS library - OpenSSL wrapper
> ii  libssl-dev:amd64 1.1.1f-1ubuntu2.1
> amd64Secure Sockets Layer toolkit - development files
> ii  libssl1.1:amd64  1.1.1f-1ubuntu2.1
> amd64Secure Sockets Layer toolkit - shared libraries
> ii  libwavpack1:amd645.2.0-1ubuntu0.1
>  amd64audio codec (lossy and lossless) - library
> ii  libxmlsec1-openssl:amd64 1.2.28-2
>  amd64Openssl engine for the XML security library
> ii  libzstd1:amd64   1.4.4+dfsg-3
>  amd64fast lossless compression algorithm
> ii  openssl  1.1.1f-1ubuntu2.1
> amd64Secure Sockets Layer toolkit - cryptographic utility
> ii  perl-openssl-defaults:amd64  4
> amd64version compatibility baseline for Perl OpenSSL packages
> ii  python3-openssl  19.0.0-1build1
>  all  Python 3 wrapper around the OpenSSL library
> ii  ssl-cert 1.0.39
>  all  simple debconf wrapper for OpenSSL
>
> here is the result of ldd on tls.so:
>
>  linux-vdso.so.1 (0x7ffd687d6000)
> libssl.so.1.1 => /lib/x86_64-linux-gnu/libssl.so.1.1 (0x7f9feaf1c000)
> libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
> (0x7f9feaef9000)
> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7f9fead07000)
> libcrypto.so.1.1 => /lib/x86_64-linux-gnu/libcrypto.so.1.1
> (0x7f9feaa31000)
> /lib64/ld-linux-x86-64.so.2 (0x7f9feb071000)
> libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x7f9feaa2b000)
>
> thanks
> Filippo
>
>
> Il giorno mer 27 gen 2021 alle ore 13:11 Daniel-Constantin Mierla <
> mico...@gmail.com> ha scritto:
>
>> Hello,
>>
>> can you give more details about libssl on Ubuntu 20.04? The version (apt
>> show libssl, or apt search libssl, ...), eventually the ldd over the tls.so
>> kamailio module.
>>
>> Cheers,
>> Daniel
>> On 26.01.21 16:10, Filippo Graziola wrote:
>>
>> Hello,
>>
>> thanks for the fast reply, I just tried kamailio (5.4.3) from kamailio
>> repo on debian buster, self-signed certificates, same minimal
>> configuration. No error on start, so it seems specific for ubuntu.
>>
>> Il giorno mar 26 gen 2021 alle ore 15:39 Daniel-Constantin Mierla <
>> mico...@gmail.com> ha scritto:
>>
>>> Hello,
>>>
>>> would you be able to test on Debian 10 (maybe using docker or virtual
>>> machine/virtualbox) and see if you get the same issue?
>>>
>>> I do not have Ubuntu 20.04 at hand and I haven't encountered any issue
>>> lately with tls on Debian 10. In this way we can rule out if it is specific
>>> to Ubuntu version of the libraries or not.
>>>
>>> Cheers,
>>> Daniel
>>> On 26.01.21 15:06, Filippo Graziola wrote:
>>>
>>> Hi all,
>>> I have an issue related (my guess) to tls and http_async_client module
>>> that result in a segmentation fault and a not correct handle of tls
>>> connections.
>>>
>>> First with only tls module loaded, not forked:
>>>
>>>  0(1021) INFO:  [core/tcp_main.c:4983]: init_tcp(): using epoll_lt
>>> as the io watch method (auto detected)
>>>  0(1021) INFO: rr [../outbound/api.h:52]: ob_load_api(): unable to
>>> import bind_ob - maybe module is not loaded
>>>  0(1021) INFO: rr [rr_mod.c:185]: mod_init(): outbound module not
>>> available
>>>  0(1021) INFO: tls [tls_mod.c:389]: mod_init(): With ECDH-Support!
>>>  0(1021) INFO: tls [tls_mod.c:392]: mod_init(): With Diffie Hellman
>>>  0(1021) WARNING: tls [tls_init.c:784]: tls_h_mod_init_f(): openssl bug
>>> #1491 (crash/mem leaks on low memory) workaround enabled (on low memory tls
>>> operations will fail preemptively) with free memory thresholds 4718592 and
>>> 2359296 bytes
>>>  0(1021) INFO:  [core/cfg/cfg_ctx.c:595]: cfg_set_now():
>>> tls.low_mem_threshold1 has been changed to 4718592
>>>  0(1021) INFO:  [core/cfg/cfg_ctx.c:595]: cfg_set_now():
>>> tls.low_mem_threshold2 has been changed to 2359296
>>>  0(1021) INFO:  [main.c:2833]: main(): processes (at least): 9 -
>>> shm size: 67108864 - pkg size: 67108864
>>>  0(1021) INFO:  [core/udp_server.c:154]:
>>> probe_max_receive_buffer(): SO_RCVBUF is initially 212992
>>>  0(1021) INFO:  

Re: [SR-Users] Kamailio and Serverless

2021-01-21 Thread Yuriy Gorlichenko
I'm using serverless Kamailio. It built with KEMI ( for me it based on Lua
code ) which gives me much more freedom. Especially if you run Kamailio in
docker or some dockerisation tech built in to the cloud

ср, 20 янв. 2021 г. в 19:44, Alex Balashov :

> You can use a module such as http_client or rtjson to query a Lambda by
> putting an AWS API Gateway in front of the Lambda.
>
> —
> Sent from my iPad
>
> On Jan 20, 2021, at 1:40 PM, H Yavari  wrote:
>
> 
> Hi Henning,
>
> Thanks for your reply.
> For example functions for processing some action based on different SIP
> messages from outside.
> Is there any sample or tutorial for scenarios like this? please share.
>
> Regards,
> H.Yavari
>
> On Wednesday, January 20, 2021, 08:19:18 AM PST, Henning Westerholt <
> h...@skalatan.de> wrote:
>
>
> Hi HYavari,
>
>
>
> you can process json with some of the json modules available in Kamailio.
>
>
>
> Regarding the other question about lambda functions – maybe you can share
> some more details what you want to achieve.
>
>
>
> Cheers,
>
>
>
> Henning
>
>
>
> --
>
> Henning Westerholt – https://skalatan.de/blog/
>
> Kamailio services – https://gilawa.com
>
>
>
> *From:* sr-users  *On Behalf Of *H
> Yavari
> *Sent:* Wednesday, January 20, 2021 4:51 AM
> *To:* sr-users@lists.kamailio.org
> *Subject:* [SR-Users] Kamailio and Serverless
>
>
>
> Hi to all,
>
>
>
> Does anyone have experience using Kamailio in front of some Lambda / Cloud
> functions? For example, passing call info with JSON to functions.
>
> Please share your ideas.
>
>
>
> Regards,
>
> HYavari
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] BYE and TCP

2021-01-12 Thread Yuriy Gorlichenko
It doesn't matter whet port used by provider when it sent initial INVITE to
you.

Record-route and Route headers are Proxy headers. They are announce
addresses of the proxy for the listening. That means when UA sends the
request it has to use port mentioned in the first of the Route headers or
in the Request URI header.
That means that your kamailio has to create new connection to this host
port pair or reuse it if it already exists to reach provider's server. So
there is nothing bad if you will create new connection for BYE to port 7071.

However, If provider initiated INVITE to you and sent it from the different
port ( which is true because for that transaction provider has to behave
atleast as TCP client ) and connection still alive ( socket still exists )
- you can try to use $du variable and put here existing address used for
the connection to provider.
But remember it is a hack.

This is also can be achieved via as mentioned above global param

tcp_accept_aliases =yes

And functions wich has to be called on initial invite:
tcp_keepalive_enable
force_tcp_alias

On Tue, 12 Jan 2021, 07:15 Kjeld Flarup, 
wrote:

> Hi Daniel
>
> The Record route in the INVITE from 194.247.61.26 sets this pair
>
> Record-Route:
> 
> Record-Route:
> 
>
> The Bye requests this route
>
> Route:
> 
> Route: 
>
> But the real port on 194.255.22.44 is 36059
>
> It is my invite to 194.247.61.26 that sets the 7071 port, which
> automatically comes from the listen statement.
> I suspect that it might work if the invite was using 36059, but how can I
> know this port, if the NAT router decides to map it to another port.
>
>
> What is the correct behaviour. Should my Kamailio somehow set the correct
> port?
>
> Should the providers Kamailio rewrite the route information?
>
> Or something else?
>
>
>
>  Med Liberalistiske Hilsner --
>Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
>Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
>Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk
>
> On 1/11/21 10:18 AM, Daniel-Constantin Mierla wrote:
>
> The From/To/Call-ID are not used to match the connection. The connection
> is matched based on target IP and port. For BYE, these are taken from Route
> header, if there is one for next hop, otherwise it is the request URI.
> Check these two to see if something is not as expected. Otherwise, you have
> to discuss with the provider and see the reason it returns back the 477
> response.
>
> Cheers,
> Daniel
> On 08.01.21 20:36, Kjeld Flarup wrote:
>
> Happy New Year everyone.
>
>
> I haven't solved this problem yet. Although is it not critical, it is a
> bit annoying.
>
> I have tried to simplify things, and have a reference setup that works.
> My linphone sends a TCP call and my Asterisk answers, plays a speak and
> hangs up.
>
>
> If I instead sends the call to my PBX, which handles the authentication
> via UAC, it fails with this error, which the customer site also generated.
>
> Status-Line: SIP/2.0 477 Unfortunately error on sending to next hop
> occurred (477/SL)
>
> Unfortunately the error is not generated by my Kamailio, but by a Kamailio
> at the provider, when it gets a Bye forwarded via their SBC.
>
>
> I have attached a capture which the provider send me. This is the setup
>
> linphone -> My Kamailio PBX (194.255.22.44:36089) -> provider
> Kamailio(194.247.61.26) -> SBC(194.247.61.32) -> provider
> Kamailio(194.247.61.26) -> my Asterisk (194.255.22.44:45075)
>
> A note on the providers Kamailio. It listens on both port 5060 and 5070,
> and both UDP/TCP.
> It is also used as access point for both my PBX and my Asterisk, thus the
> trace may be a little confusing to read.
>
> As far as I can see, the provider Kamailio gets the correct To/From and
> CallID in the bye. Thus it should be able to match the TCP connection.
> The flow is also clean, there is no change of ports etc.
>
>
>
> I have this reference setup which works
>
> linphone -> provider Kamailio -> SBC -> provider Kamailio -> my Asterisk
>
> The only differences towards the reference I can see these. I do not have
> a capture from the provider on this.
>
>- There is an extra Via step.
>- Contact points to the Linphone IP, not the Kamailio IP
>
> Any hint will be appreciated.
>
>
>
>  Med Liberalistiske Hilsner --
>Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
>Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
>Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk
>
> On 11/9/20 12:06 PM, Daniel-Constantin Mierla wrote:
>
> Hello,
>
> there is no association between a SIP call and a TCP connection. SIP is
> not designed on TCP streams, the forwarding is based on the headers. It
> doesn't matter if there are messages belonging to same call or not, they
> can share same connection, or can open a new one...
>
> The BYE from caller gets to 

Re: [SR-Users] sngrep TLS connection

2020-12-07 Thread Yuriy Gorlichenko
As I remember sngrep doesn't work with TLS 1.3, so may be it is your case.

On Tue, 8 Dec 2020, 08:01 Agiftel,  wrote:

> Hi all, does anyone was able to use sngrep (with -k option) to decrypt TLS
> connections?
> I'am doing what help says; used private key is the correct one; but no
> traffic is seen on sngrep.
> If i use not ecrypted call i can see everything, so sngrep is working good.
>
> Any hint?
>
> regards
>
>
>
>
> --
> Sent from: http://sip-router.1086192.n5.nabble.com/Users-f3.html
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] question regarding rtpengine and ICE candidate selection

2020-12-04 Thread Yuriy Gorlichenko
Hello
2020-12-03T18:05:46.456106+00:00 ashmainkama51 kamailio[22147]:
a=candidate:2274611867 1 tcp 1518283007
2001:8a0:78fc:7000:e1d7:e93:3c50:ee71 9 typ host tcptype active generation
0 network-id 2 network-cost 10
is a local candidate sent in the offer from the client
ICE=force just says rtpengine: "when you will resend this offer  to the
receiver, remove all candidates sent by sender and put yourself as the only
candidate"
But rtpengine still has to follow the ICE check for the received candidates
as in that case rtpengine is the receiver and it can't just not check local
candidates. That is why you facing this behaviour from the rtpengine, which
is totally correct.

In other terms
Sender ---> rtpengine :rtpengine must follow ice procedure and
check availability of these local candidates to establish connection
between Sender and rtpengine
rtpengine -> Receiver:  rtpengine pretends to be a Sender for
the ICE agent of the receiver. but in this term, RTPengine will be the only
candidate for this part of the call, so this part is establishing a
connection between rtpengine and Receiver

чт, 3 дек. 2020 г. в 23:40, Richard Fuchs :

> On 03/12/2020 13.39, Andrew Chen wrote:
> > Hi all,
> >
> > I was wondering if someone can help me understand how the ICE
> > parameter works in the rtpengine module works.
> >
> > So basically our client does an ICE candidate lookup and grabs a list
> > of them and applies it to the INVITE that gets sent to the Kamailio.
> > The list looks like this:
> >
> > 2020-12-03T18:05:46.456030+00:00 ashmainkama51 kamailio[22147]:
> > a=candidate:3373280875 1 udp 2122262783
> > 2001:8a0:78fc:7000:e1d7:e93:3c50:ee71 59827 typ host generation 0
> > network-id 2 network-cost 10
> > 2020-12-03T18:05:46.456057+00:00 ashmainkama51 kamailio[22147]:
> > a=candidate:3040609428 1 udp 2122197247
> > 2001:8a0:78fc:7000:d979:bf75:dbc0:69f 59828 typ host generation 0
> > network-id 3 network-cost 10
> > 2020-12-03T18:05:46.456081+00:00 ashmainkama51 kamailio[22147]:
> > a=candidate:1681997092 1 udp 2122129151 192.168.1.66 59829 typ host
> > generation 0 network-id 1 network-cost 10
> > 2020-12-03T18:05:46.456106+00:00 ashmainkama51 kamailio[22147]:
> > a=candidate:2274611867 1 tcp 1518283007
> > 2001:8a0:78fc:7000:e1d7:e93:3c50:ee71 9 typ host tcptype active
> > generation 0 network-id 2 network-cost 10
> > 2020-12-03T18:05:46.456131+00:00 ashmainkama51 kamailio[22147]:
> > a=candidate:4223662180 1 tcp 1518217471
> > 2001:8a0:78fc:7000:d979:bf75:dbc0:69f 9 typ host tcptype active
> > generation 0 network-id 3 network-cost 10
> > 2020-12-03T18:05:46.456155+00:00 ashmainkama51 kamailio[22147]:
> > a=candidate:717406676 1 tcp 1518149375 192.168.1.66 9 typ host tcptype
> > active generation 0 network-id 1 network-cost 10
> > 2020-12-03T18:05:46.456180+00:00 ashmainkama51 kamailio[22147]:
> > a=candidate:2130547417 1 udp 8199935 206.81.191.27 61165 typ relay
> > raddr 85.247.0.121 rport 53091 generation 0 network-id 1 network-cost 10
> >
> >
> > In the rtpengine_offer, I have this:
> >
> > rtpengine_offer("ICE=force DTLS=passive replace-session-connection
> > replace-origin external internal");
> >
> > What i am trying to do is to tell the freeswitch endpoint to use
> > rtpengine as ICE candidate and I see in the SDP this is happening:
> >
> > a=candidate:6296910676 1 udp 659136 206.81.191.52 52766 typ host
> > generation 0
> >
> > Btw..206.81.191.52 is a separate AWS instance running rtpengine binary.
> >
> > On the rtpengine_answer, I tell the remote client side the same
> > thing..use rtpengine as your ICE candidate:
> >
> > rtpengine_answer("ICE=force DTLS=passive replace-session-connection
> > replace-origin internal external");
> >
> > and this is snippet from 200 OK:
> >
> > a=candidate:6296910676 1 udp 659136 206.81.191.52 52766 typ host
> > generation 0
> >
> > Question:
> >
> > Why does the rtpengine logs still show that it's trying to use
> > 2001:8a0:78fc:7000:e1d7:e93:3c50:ee71 as RTP candidate in this scenario?
> >
> > Dec  3 18:05:47 ashmainrtpe42 rtpengine[8505]: DEBUG:
> > [ep1sbnkk9tikhg4kpmot]: Forward to sink endpoint:
> > 2001:8a0:78fc:7000:e1d7:e93:3c50:ee71:59827 (RTP seq 25423 TS 0)
> >
> > I thought ICE=force will handle such adjustments so that all rtp is
> > handled by the rtpengine to our client and bypass the STUN server?
> >
> Isn't that what's happening? Rtpengine receives media from one peer and
> forwards it to one of the ICE candidates (presumably the primary one
> that was negotiated) of the other peer. Or am I misunderstanding what
> you posted?
>
> Cheers
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] KEMI and Native mixing

2020-10-22 Thread Yuriy Gorlichenko
It is not a big deal to use it with lua_run().
It will work without any double_trouble in general
I do it  a lot in many projects which are still in native lang but already
need some extensions
I would recommend you to test your Lua before set into production.
Here is a test suite which can help you to protect yourself from some
mistakes https://github.com/ovoshlook/kemi-lua-test-suite

ср, 21 окт. 2020 г. в 20:18, Henning Westerholt :

> Hello,
>
>
>
> other people might be able to add more, but what you can certainly can do
> is to have a usual kamailio.cfg and then use e.g. lua_run(..) to execute
> some functions defined in the loaded lua script.
>
> In my opinion you will add some more complexity if you start to mix also
> the routes, but it might be fine for a certain migration period.
>
>
>
> Cheers,
>
>
>
> Henning
>
>
>
>
>
> --
>
> Henning Westerholt – https://skalatan.de/blog/
>
> Kamailio services – https://gilawa.com
>
>
>
> *From:* sr-users  *On Behalf Of *Marcin
> Kowalczyk
> *Sent:* Wednesday, October 21, 2020 7:25 PM
> *To:* sr-users@lists.kamailio.org
> *Subject:* [SR-Users] KEMI and Native mixing
>
>
>
> Hi,
>
>
>
>  Is it possible to mix both KEMI (lua) and Native configs in one kamailio
> instance? So some blocks are called from native script and some others from
> KEMI (lua)?
>
>
>
> Marcin
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Lua kemi-test-suite now availble from luaRocks

2020-09-25 Thread Yuriy Gorlichenko
Hello Kamailians!
I'm glad to announce some updates about the Lua Kemi-test-suite which has
been presented on KamailioWorld online 2020 conference

https://github.com/ovoshlook/kemi-lua-test-suite

There are some important updates that I hope will make your life easier if
you use Lua KEMI.

 - Now (finally!) it is available via LuaRocks. So it is easy to go for
now. No more manual source downloads! (this is the main reason I'm writing
this message ).
 - More modules and some core functions have been mocked. It is still a lot
of jobs that have to be done but the amount of available mocks is growing.
 - Added CRASH_PROTECTION functionality. So for now there is a mechanism
which is checks if you calling a function with an incorrect amount of
params ( see README ).
 - Extended mocking engine: now it is possible to mock any functions of KSR
or third-party modules/libraries: for example, Redis, MySQL, or other
connectors calls.

P.S. suite still on development and changes from time to time, but
published versions are stable and ready to use.
P.P.S. Warm welcome to contributors.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio Slack Channel Invite

2020-09-21 Thread Yuriy Gorlichenko
Also if anyone wants to join:
Here is a telegram unofficial chat. It is quite active. It is RU, but EN
friendy. Feel free to join for kamailio/SIP questions and related
interaction.
t.me/ru_kamailio


On Mon, 21 Sep 2020, 11:26 Daniel-Constantin Mierla, 
wrote:

> Hello,
>
> there is an "unofficial" Slack channel started by Emmanuel Schmidbauer --
> the announcement was a while ago, see:
>
>   * https://lists.kamailio.org/pipermail/sr-users/2018-October/103554.html
>
> Not sure if the invitation link in that announcement is still valid,
> though. If not, try to contact Emmanuel.
>
> Cheers,
> Daniel
> On 21.09.20 11:18, Olle E. Johansson wrote:
>
>
>
> On 21 Sep 2020, at 11:15, Peter Baines  wrote:
>
> Hi,
>
> Can someone send me an invite to the Kamailio Slack channel please.
>
>
> I am not aware of a slack channel. We have an IRC channel and a matrix
> channel.
>
> https://www.kamailio.org/w/irc-channels/
>
> #kamailio:matrix.kamailio
> 
>
>
> /O
>
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Funding: https://www.paypal.me/dcmierla
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Decrypting SRTP with Kamailio + rtpengine

2020-08-18 Thread Yuriy Gorlichenko
You have to call rtpengine_manage for the replies as well.

On Tue, 18 Aug 2020, 20:14 Alex Balashov,  wrote:

> They can...
>
> On 8/18/20 1:25 PM, Sergey Safarov wrote:
> > Thinks 180 Ringing messages do not contain SDP.
> > Some misunderstanding present here
> >
> > Sergey
> >
> > On Tue, Aug 18, 2020 at 9:51 AM Ildar Mukhametzhanov  > > wrote:
> >
> > Hello!
> >
> > __ __
> >
> > Decrypting SRTP with Kamailio + rtpengine.
> >
> > Hello! I have a task to decrypt SRTP for a legacy switch which
> > doesn’t support it.
> >
> > Simply adding rtpengine_manage("RTP/AVP") didn’t help. SDP converted
> > from SRTP to RTP while proxying INVITE to legacy switch, but 180
> > Ringing wasn’t converted back to SRTP.
> >
> > Little more detailed config snippet:
> >
> > __ __
> >
> > route[RELAY] {
> >
> > ...
> >
> > if (is_method("INVITE")) {
> >
> > __ __
> >
> > if ($rd=~$var(switch_ip_mask)) {
> >
> > rtpengine_manage("RTP/AVP");
> >
> > } else {
> >
> > rtpengine_manage();
> >
> > }
> >
> > ...
> >
> > }
> >
> > __ __
> >
> > Could someone please advise typical scenarios to achieve it, I
> > suppose the task is pretty standard.
> >
> > __ __
> >
> > Thank you in advance!
> >
> > __ __
> >
> > __ __
> >
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org 
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >
> >
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Do I need RTPEngine at every location onsite for webRTC

2020-08-17 Thread Yuriy Gorlichenko
Hello. If I understand your question correctly you have a PBX at each of
the location which will be in between devices.
If pbx you gonna use allows dtls and ICE,  then you don't need rtpengine or
any other kind of turn server.


On Mon, 17 Aug 2020, 21:45 Johnny Ritzer,  wrote:

> We have 100 customer  locations  and  I was  hoping to no deploy a kamabox
> at each location if traffic is mostly just local. But we  are building a
> WEBRTC.  and hoping our architecture  can use kamailio in the cloud.
>
>
>
> Each location has a PBX onsite.  We  are deploying  webRTC so  need  that
> websocket setup jssip/sip.js.
>
>
>
> SIP SIGNALING (relay) ()
>
> UA(webphone) à Cloud Kamailio à PBX
>
> 10.0.1.100 à cloud.kama.com à 10.0.1.1
>
>
>
> But  then  translate uac and  get RTP  to pass  locally without a device
> onsite at  each location.
>
>
>
> RTP Flow (not going  through kamailio)
>
> UA(webphone)  à PBX
>
> 10.0.1.100 à 10.0.1.1
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Manipulating SDP IP for Inbound Calls

2020-08-04 Thread Yuriy Gorlichenko
It looks like rtpengine has to be a bridge between docker-compose network
and external ( for docker compose ) net.

First of all there is an option of rrpengine to listen 2 interfaces, which
can be the same interface but one of them can be advertised to external ip.
So you can give aliases to those virtual interfaces and use flag
"direction" when call rtpengine module in kamailio.

Also you can use "media-addr" flag when call rtpengine module instead using
direction flag, this is more flexible but more tricky.

On Tue, 4 Aug 2020, 10:30 Daniel-Constantin Mierla, 
wrote:

> Hello,
>
> the mangler module does not have any idea of inbound/outbound directions,
> so you can use it for any of them.
>
>
> Also, the nathelper module should have a function allowing to change the
> ip in the sdp, iirc.
>
>
> On the other hand, if you use rtppengine for the calls, then the ips
> should be replaced by it.
>
>
> Do not forget to use msg_apply_changes() in case you want those changes to
> be visible immediately in the configuration file.
>
>
> Cheers,
> Daniel
>
>
> On 29.07.20 13:18, Edward Romanenco wrote:
>
> Hey guys,
>
> I am working on a project involving Kamailio dockerezation, which is
> meant to run alongside Freeswitch and RTPEngine containers, on the basis of
> a Docker-Compose file which is launched on top of a CentOS 7.7 host system
> .
>
> Anyway, I would love to know if there is any way to manipulate / mask the
> IP addresses that are being appended to a status 183 response for an
> incoming invite.
>
> For some reason which I am trying to figure out in parallel, Freeswitch
> uses the local network bridge subnet instead of the defined external RTP
> IPs, and I was wondering - Can I manipulate them using Kamailio? I know
> that Mangler module can do it for outbound calls, but can I do the same
> for inbound?
>
> v=0.
> o=FreeSWITCH 1595974788 1595974789 IN IP4 172.18.0.40.
> s=FreeSWITCH.
> c=IN IP4 172.18.0.40.
> t=0 0.
> m=audio 45878 RTP/AVP 8 101.
> a=rtpmap:8 PCMA/8000.
> a=rtpmap:101 telephone-event/8000.
> a=fmtp:101 0-16
>
> Edward
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Funding: https://www.paypal.me/dcmierla
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Lifetime of Invite with no Ack

2020-04-13 Thread Yuriy Gorlichenko
Sorry, opposit. For 200 ACK is separate. For 300 or greater it is belongs o
same transaction ofcourse.

On Mon, 13 Apr 2020, 14:08 Yuriy Gorlichenko,  wrote:

> For 300 and greater reply transaction ends on reply and ACK is a new
> thansaction
>
> On Mon, 13 Apr 2020, 13:25 Duarte Rocha,  wrote:
>
>> Sorry i didn't specify.
>>
>> It is after the 200 Ok. Will it be different in a reply greater than 300?
>>
>> Best regards
>>
>> A segunda, 13/04/2020, 12:16, Daniel-Constantin Mierla 
>> escreveu:
>>
>>> Hello,
>>>
>>> is it about ACK after 200ok or the ACK after 300 or greater reply?
>>>
>>> Cheers,
>>> Daniel
>>> On 13.04.20 13:04, Duarte Rocha wrote:
>>>
>>> Greetings,
>>>
>>> How much time will Kamailio keep a transaction active if the ACK to a
>>> INVITE is never received by Kamailio?
>>>
>>> Best Regards,
>>>
>>> ___
>>> Kamailio (SER) - Users Mailing 
>>> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>> --
>>> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
>>> www.linkedin.com/in/miconda
>>>
>>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Lifetime of Invite with no Ack

2020-04-13 Thread Yuriy Gorlichenko
For 300 and greater reply transaction ends on reply and ACK is a new
thansaction

On Mon, 13 Apr 2020, 13:25 Duarte Rocha,  wrote:

> Sorry i didn't specify.
>
> It is after the 200 Ok. Will it be different in a reply greater than 300?
>
> Best regards
>
> A segunda, 13/04/2020, 12:16, Daniel-Constantin Mierla 
> escreveu:
>
>> Hello,
>>
>> is it about ACK after 200ok or the ACK after 300 or greater reply?
>>
>> Cheers,
>> Daniel
>> On 13.04.20 13:04, Duarte Rocha wrote:
>>
>> Greetings,
>>
>> How much time will Kamailio keep a transaction active if the ACK to a
>> INVITE is never received by Kamailio?
>>
>> Best Regards,
>>
>> ___
>> Kamailio (SER) - Users Mailing 
>> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>> --
>> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
>> www.linkedin.com/in/miconda
>>
>> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [ot] lightweight sip app for auto-answering with play file and echo mode

2020-03-26 Thread Yuriy Gorlichenko
Sipp since version 3.3 ( as I remember ) can play files. I have used that
for some kind of testing.

On Thu, 26 Mar 2020, 08:45 Daniel-Constantin Mierla, 
wrote:

> Hello,
>
> wondering if anyone here is aware of a lightweight sip app that can
> answer a call, play some file and/or do echo mode, mainly targeted at
> using it for basic sip routing and call testing. Of course I know that
> Asterisk and FreeSwitch (or even SEMS) can do that, but they have many
> dependencies, requiring quite some resources to run them, so I thought
> maybe someone here figured out different solutions, eventually cli based
> apps like pjsua or baresip. GUI apps for Linux are also fine if they can
> be configured for such behaviour.
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierla -- www.asipto.com
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio - Force UAC to re register

2020-03-02 Thread Yuriy Gorlichenko
I see here scenario that probably will help you:

You can use asterisk real time db to share address of record between nodes.
In that case any asterisk will be able to know Where to send request if
some one calls to client.
I coming registration you will need to route based on your dispatcher list
on kamailio. So if one of asterisk will fail down - you it will Redirect
Register request automatically

On Tue, 3 Mar 2020, 06:38 Sharad Kumar, 
wrote:

> Hey guys,
>
> I am implementing one scenario where I want the help of very smart people.
> So let’s say one UAC 999 registers to Asterisk 1 server via kamailio and
> asterisk 1 server goes down. Is there any way I can move that registration
> to another asterisk server or is there any way I can force UAC to re
> register so that I can route the new Register to the available asterisk ?
>
> Any help will be really appreciated.
>
> Thank you
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] How to detect NAT during authenticated registration of clients which adjust the headers

2020-02-28 Thread Yuriy Gorlichenko
But why it becomes a problem? It looks like client reloves NAT issue on his
side. So during the call of this user you will send request to the proper
destination address anyway.

On Fri, 28 Feb 2020, 18:03 David Villasmil, 
wrote:

> Can you paste the challenge and responses?
>
> On Fri, 28 Feb 2020 at 14:50, Awal Junanto  wrote:
>
>> I added a call to add_uri_param("nat=yes") before auth_challenge("$fd",
>> "0"), but couldn't see any difference in the actual SIP messages. The
>> challenge (and the response) didn't contain that newly added keyword. Or am
>> I missing something here?
>>
>> On Fri, 28 Feb 2020 at 13:58, David Villasmil <
>> david.villasmil.w...@gmail.com> wrote:
>>
>>> There probably is a better way of doing this, but maybe you can store
>>> the fact that the first register came from a natted device in the locations
>>> table (or a hash).
>>>
>>> Or maybe add a parameter when challenging where you state the client is
>>> natting?
>>>
>>> Something like this
>>>
>>> https://kamailio.org/docs/modules/3.1.x/modules_k/siputils.html#id2769802
>>>
>>>
>>> Hope that helps
>>>
>>> David
>>>
>>> On Fri, 28 Feb 2020 at 12:03, Awal Junanto  wrote:
>>>
 Hi,

 We are building a service where we need to detect NAT when the clients
 register to our server. We are struggling in analyzing NAT status of some
 clients which modify their IP addresses/ports in the headers according to
 the value of "received" parameter sent during "401 Unauthorized" response.

 Here's the flow:

 Client->Server
 REGISTER sip:...
 Via: SIP/2.0/TLS 192.168.0.1:41157
 ;rport;branch=z9hG4bKPj30093e5d-550d-4d4c-a9a2-22c3bd1cda7e;alias
 Contact: 
 ...
 Server->Client
 SIP/2.0 401 Unauthorized
 Via: SIP/2.0/TLS 192.168.0.1:41157
 ;rport;branch=z9hG4bKPj30093e5d-550d-4d4c-a9a2-22c3bd1cda7e;alias;received=1.2.3.4
 WWW-Authenticate: ...
 ...

 Client->Server
 REGISTER sip:...
 Via: SIP/2.0/TLS 1.2.3.4:6201
 ;rport;branch=z9hG4bKPj30093e5d-550d-4d4c-a9a2-22c3bd1cda7e;alias
 Contact: 
 Authorization: ...
 ...

 By the time the client is authenticated, there is no way to detect
 whether the request was coming from a natted device or not by just
 analysing the Via or Contact headers.

 Thanks in advance.


 ___
 Kamailio (SER) - Users Mailing List
 sr-users@lists.kamailio.org
 https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

>>> --
>>> Regards,
>>>
>>> David Villasmil
>>> email: david.villasmil.w...@gmail.com
>>> phone: +34669448337
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>
>>
>> --
>> Best Regards,
>> Awal
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> --
> Regards,
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Access to CANCEL messages sent during parallel forking

2020-02-26 Thread Yuriy Gorlichenko
Never tried that but probably makes sence to check event_route[network:msg]

It acts in the network layer and message itself has to be parsed by some
additional script, but still an option.


On Wed, 26 Feb 2020, 10:36 Daniel-Constantin Mierla, 
wrote:

> Hello,
>
> the last option to try is onsend_route and if the CANCEL shows up there,
> then use some string operations over $snd(buf) to get the Via branch, last
> value after "." being the branch index. I am not sure you can get the
> INVITE avps there, but you can try.
>
> Otherwise a new event route has to be added for this purpose. Probably not
> much coding, depends of what is wanted to be exposed there, as the cancel
> is generated locally, there is no incoming sip_msg_t structure.
>
> Cheers,
> Daniel
> On 26.02.20 10:12, Marco Capetta wrote:
>
> Hi Yuriy,
>
> thanks for the suggestion.
> I tried both "event_route[tm:local-request]" and
> "event_route[tm:local-response]" but internally generated CANCEL messages
> are not captured by those event routes.
> On the contrary, I can see that OPTIONS, NOTIFY and also PUBLISH messages
> are there.
>
> Do you have any other suggestion?
>
> Thanks
> Regards
> Marco
>
> On 2/25/20 5:50 PM, Yuriy Gorlichenko wrote:
>
> You can try event_route[tm:local-request] for this.
>
> On Tue, 25 Feb 2020, 15:36 Marco Capetta,  wrote:
>
>> Hi All,
>>
>> I have a question regarding call forking and how to access failed
>> branches: the ones for which kamailio sends out the CANCEL because on
>> another one a 200OK was received.
>> This is the scenario:
>>   - A calls B
>>   - 3 devices are registered on B, so a parallel forking is done to B1,
>> B2 and B3
>>   - B1, B2, and B3 all reply with 180 Ringing
>>   - B1 replies with 200OK
>>   - Kamailio CANCELs the branches with B2 and B3
>>
>> What I need is access to each single CANCEL that Kamailio sends out to
>> B2 and B3.
>> In particular I need to know the branch-id and Via branch of all the
>> cancelled branches. Additionally it would be perfect to have them inside
>> the TM module, in order to have access also to internal AVPs.
>>
>> I tried with dedicated failure routes and also with per-branch failure
>> routes, but I was never able to access to those values.
>> I also didn't found a specific event-route that can help me solve this
>> problem.
>>
>> Does anyone have an idea?
>>
>> Kamailio version 5.2.5
>>
>>
>> Thanks
>>
>> Regards
>> Marco
>>
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> * Marco Capetta *
> VoIP Developer
>
> Sipwise GmbH <http://www.sipwise.com> , Campus 21/Europaring F15
> AT-2345 Brunn am Gebirge
>
> Phone:  +43(0)1 301 2044 <+4313012044>
> Email:  mcape...@sipwise.com
> Website:  www.sipwise.com
>
> Particulars according Austrian Companies Code paragraph 14
> "Sipwise GmbH" - Europaring F15 - 2345 Brunn am Gebirge
> FN:305595f, Commercial Court Vienna, ATU64002206
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Kamailio Advanced Training - March 9-11, 2020, Berlin - www.asipto.com
> Kamailio World Conference - April 27-29, 2020, in Berlin -- 
> www.kamailioworld.com
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Access to CANCEL messages sent during parallel forking

2020-02-25 Thread Yuriy Gorlichenko
You can try event_route[tm:local-request] for this.

On Tue, 25 Feb 2020, 15:36 Marco Capetta,  wrote:

> Hi All,
>
> I have a question regarding call forking and how to access failed
> branches: the ones for which kamailio sends out the CANCEL because on
> another one a 200OK was received.
> This is the scenario:
>   - A calls B
>   - 3 devices are registered on B, so a parallel forking is done to B1,
> B2 and B3
>   - B1, B2, and B3 all reply with 180 Ringing
>   - B1 replies with 200OK
>   - Kamailio CANCELs the branches with B2 and B3
>
> What I need is access to each single CANCEL that Kamailio sends out to
> B2 and B3.
> In particular I need to know the branch-id and Via branch of all the
> cancelled branches. Additionally it would be perfect to have them inside
> the TM module, in order to have access also to internal AVPs.
>
> I tried with dedicated failure routes and also with per-branch failure
> routes, but I was never able to access to those values.
> I also didn't found a specific event-route that can help me solve this
> problem.
>
> Does anyone have an idea?
>
> Kamailio version 5.2.5
>
>
> Thanks
>
> Regards
> Marco
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] ds_is_from_list doesn't accept groupid from a variable?

2020-02-14 Thread Yuriy Gorlichenko
You have to Put variable in  "" as I remember. This is usual rool for all
function calling in a config file.

On Fri, 14 Feb 2020, 14:54 Björn Bylander, 
wrote:

> Hi,
>
> According to
> https://kamailio.org/docs/modules/5.3.x/modules/dispatcher.html#dispatcher.f.ds_is_from_list,
> ds_is_from_list should accept an integer variable for the group id
> parameter. The following simple example doesn¹t work however:
>
> $var(foo) = 5;
> ds_is_from_list($var(foo));
>
> Kamailio logs ³function ds_is_from_list: parameter 1 is not constant². Is
> this a bug or have I misinterpreted the documentation somehow?
>
> Thanks in advance,
> Björn Bylander
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Same Via Tag for INVITE and ACK on S/L loadbalancer

2020-02-11 Thread Yuriy Gorlichenko
Stateless proxy always makes sence in high loaded distributed system. Even
in 2025 :-)

On Tue, 11 Feb 2020, 14:52 Sebastian Damm,  wrote:

> Hi all,
>
> thanks for the discussion and reminding everyone that it is already
> fixed. Henning, I guess we owe you a beer or two at Kamailioworld. :)
>
> Daniel, to answer your question regarding "why stateless": Our setup
> includes anycast, so multiple machines share the same IP address. And
> depending on the datacenter location of our gateways or the uplink to
> the carrier, even requests and answers can be routed through different
> instances running with the same IP address. So yes, even in 2020 there
> can be use cases for a stateless loadbalancer.
>
> We were running 5.2.2, and after I upgraded to 5.2.6, our error reply
> counter dropped significantly. Wow.
>
> Regards,
> Sebastian
>
> On Mon, Feb 10, 2020 at 8:02 PM Henning Westerholt  wrote:
> >
> > Hello Serge,
> >
> > there was a regression introduced by b64a25874e3 in 5.2 because of a
> wrong refactoring. This were not noticed for some time because only a few
> people (still) use stateless load balancers. I noticed it as well in middle
> of last year during a customer project. It was fixed in  82635674517 end of
> July 2019, you find in the related discussion also some test results that I
> posted before doing the backport. So, if this is your problem, after 5.2.4
> is should work again.
> >
> > Cheers,
> >
> > Henning
> >
> > --
> > Henning Westerholt – https://skalatan.de/blog/
> > Kamailio services – https://gilawa.com
> >
> > -Original Message-
> > From: sr-users  On Behalf Of Serge
> S.Yuriev
> > Sent: Monday, February 10, 2020 4:46 PM
> > To: Kamailio (SER) - Users Mailing List 
> > Subject: Re: [SR-Users] Same Via Tag for INVITE and ACK on S/L
> loadbalancer
> >
> > Hello,
> >
> > This stateless call flow is smooth in 5.1 branch, at least 5.1.7 but in
> 5.2.1 already broken IIRC.
> > Some time ago I wrote about this very same issue
> >
> > 10.02.2020, 18:39, "Daniel-Constantin Mierla" :
> > > In such case, because the proxy is doing stateless forwarding, there
> > > is no transaction. I guess the solution right now is to use tm for
> > > relaying
> > > - is any concern of doing that?
> > >
> > > If someone wants to look at generating same via branch, I am fine with
> > > it, eventually controlled by a parameter if the code change is
> > > significant, to be able to switch to current mode if unexpected side
> > > effects pop up.
> > >
> > > One more note in this case: I expect it would be required to generate
> > > different tag for 200ok ACK, so it is matched as different transaction
> > > by next hop, not sure if there is any easy way to discover the type of
> > > ACK in a stateless proxy.
> > >
> > > I am not sure I remember correctly, but in some discussions I think it
> > > was suggested to just reuse the branch value of incoming top Via when
> > > doing stateless forwarding.
> > >
> > > Cheers,
> > > Daniel
> > >
> > > On 10.02.20 16:26, Sebastian Damm wrote:
> > >>  We use 5.2 on the affected systems.
> > >>
> > >>  On Mon, Feb 10, 2020 at 4:15 PM Serge S. Yuriev 
> wrote:
> > >>>  Hi
> > >>>
> > >>>  I believe you are using 5.2 or 5.3 series? This tend to work
> > >>> properly on 5.1 series
> > >>>
> > >>>  10.02.2020, 18:10, "Sebastian Damm" :
> > >>>>  Hi,
> > >>>>
> > >>>>  actually, our only problem is handling negative replies. The ACK
> > >>>>  belongs to the same transaction and therefore has to carry the
> > >>>> same
> > >>>>  Via branch ID.
> > >>>>
> > >>>>  Sebastian
> > >>>>
> > >>>>  On Mon, Feb 10, 2020 at 3:50 PM Yuriy Gorlichenko <
> ovoshl...@gmail.com> wrote:
> > >>>>>   ACK for successull response is a new transaction. It has to be
> different. May be it is better to point provider to this?
> > >>>>>
> > >>>>>   On Mon, 10 Feb 2020, 14:26 Sebastian Damm, 
> wrote:
> > >>>>>>   Hi,
> > >>>>>>
> > >>>>>>   I stumbled upon an interop problem with a carrier. We have the
> > >>>>>>   

Re: [SR-Users] Different REGISTER expires based on User-Agent

2020-02-11 Thread Yuriy Gorlichenko
But you will see those changes in the pcap even without
apply_message_changes
It is highly recommended to not use this function as it parses all message
again.

On Tue, 11 Feb 2020, 12:29 mayamatakeshi,  wrote:

>
>
> On Tue, Feb 11, 2020 at 7:48 PM Daniel Tryba  wrote:
>
>> On Tue, Feb 11, 2020 at 08:03:29AM +0900, mayamatakeshi wrote:
>> > Actually, my idea was to do something like this before handing the
>> REGISTER
>> > to registrar save() function:
>> > remove_hf("Expires");
>> > append_hf("Expires: 200\r\n");
>> > However, this didn't work (or at least, it doesn't work with kamailio
>> 4.3.7
>> > which is the one I use).
>>
>> These changes aren't applied to the processing of the current message
>> until you call msg_apply_changes().
>>
>> Try adding and see if it works.
>>
>
> Indeed. This worked:
> remove_hf("Expires");
> append_hf("Expires: 200\r\n");
> msg_apply_changes();
> Thanks!
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Same Via Tag for INVITE and ACK on S/L loadbalancer

2020-02-10 Thread Yuriy Gorlichenko
ACK for successull response is a new transaction. It has to be different.
May be it is better to point provider to this?

On Mon, 10 Feb 2020, 14:26 Sebastian Damm,  wrote:

> Hi,
>
> I stumbled upon an interop problem with a carrier. We have the
> following scenario:
>
> Gateway --> Loadbalancer --> Carrier
>
> The loadbalancer generates a Via header for each request. But since it
> is stateless, the Via tag is generated for each request. As a
> consequence, the Via tag in the ACK differs from the one in the
> INVITE. And one carrier doesn't handle those ACKs if the Via tag
> differs.
>
> Is there a way to force the creation of a "deterministic" Via branch
> tag? For example, building it from a hash over call-id and from-tag or
> something like that?
>
> Thanks in advance
> Sebastian
>
> --
> Sebastian Damm
> Voice Engineer
> __
> sipgate GmbH
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Binary Websocket messages

2020-02-06 Thread Yuriy Gorlichenko
No. Wireshark or sngrep is fine for that. You need trace only from kamailio
to verify that it sends proper SIP

On Thu, 6 Feb 2020, 15:03 Andre Pires dos Santos, <
santos.andrepi...@gmail.com> wrote:

> Yuriy, really sorry for the dumb question, but to make it faster, is there
> a log I can get from kamailio/rtpengine or is it better to use something
> like wireshark?
>
> On Thu, Feb 6, 2020 at 10:52 AM Yuriy Gorlichenko 
> wrote:
>
>> Can you try to get SIP dump from kamailio to WebSocket endpoint on the
>> kamailio machine?
>>
>> I believe kamailio have no binary sip draft implementation on a board.
>>
>>
>> On Thu, 6 Feb 2020, 14:22 Andre Pires dos Santos, <
>> santos.andrepi...@gmail.com> wrote:
>>
>>> Yuriy, we get the whole invite message binary.
>>>
>>> We got an example from chrome network console (I x'ed some info):
>>>
>>>
>>> : xxxe 5xxx 5xx5 2073 xx70 3a7x 75xx x835  INVITE sip:quah5
>>> 000x: 3xxx 7xx0 3370 3xxc 7x3x x375 3xxf xx3x  xav@3pxlvxcuxofx
>>> 0002: 2exx xe7x xxxc  3b7x 72xx xe73 70xf  .invalid;transpo
>>> 0003: 727x 3d77 7320 53xx 502f 322e 300d 0a52  rt=ws SIP/2.0..R
>>> 000x: x5x3 xf72 xx2d 52xf 757x x53a 203c 73xx  ecord-Route: >> 0005: 703a 353x 2e32 3332 2e32 3x38 2e32   p:xx.xxx.xxx.xxx
>>> 000x: 3a3x 3x33 3b7x 72xx xe73 70xf 727x 3d77  :xx3;transport=w
>>> 0007: 733b 7232 3dxf xe3b xc72 3dxf xe3b   s;r2=on;lr=on;di
>>> 0008: xx3d 3xxx 352e x533 xx32 3bxe xx7x 3d7x  d=xa5.e3a2;nat=y
>>> 000x: x573 3e0d 0a52 x5x3 xf72 xx2d 52xf 757x  es>..Record-Rout
>>> 000a: x53a 203c 73xx 703a 353x 2e32 3332 2e32  e: >> 000b: 3x38 2e32  3b72 323d xfxe 3bxc 723d  xx.xxx;r2=on;lr=
>>> 000c: xfxe 3bxx  3d3x xx35 2ex5 33xx 323b  on;did=xa5.e3a2;
>>> 000d: xexx 7x3d 7xx5 733e 0d0a xxxc xcxf 773a  nat=yes>..Allow:
>>> 000e: 20xx xe5x xx5x x52c x25x x52c 52x5 x7xx   INVITE,BYE,REGI
>>> 000f: 535x x552 2cxx x3xb 2cxf 505x xxxf xe53  STER,ACK,OPTIONS
>>> 00x0: 2cx3 xxxe x3x5 xc2c xxxe xxxf 2c50 52xx  ,CANCEL,INFO,PRA
>>> 00xx: x3xb 2c53 55x2 53x3 52xx x2x5 2cxe xf5x  CK,SUBSCRIBE,NOT
>>> 00x2:  5x2c 52x5 xxx5 522c 5550  5xx5  IFY,REFER,UPDATE
>>> 00x3: 0d0a x3xx xcxc 2dxx xx3a 20x3 7x35 xd7x  ..Call-ID: Cv5my
>>> 00xx: 755a xx3x 3xx5 xcxx xbxx xxx0 3230 3x2e  uZFxxELDkaD@xxx.
>>> 00x5: 3230 2e3x 382e 3230 320d 0ax3 xfxe 7xxx  xx.xx.xxx..Conta
>>> 00xx: x37x 3a20 3c73 xx70 3a35 3530 3830 3038  ct: >> 00x7: 3837 3x35 3x35 x032 303x 2e32 302e 3x38  87x...@xxx.xx.xx
>>> 00x8: 2e32 3032 3a35 303x 303e 0d0a x3xf xe7x  .xxx:50x0>..Cont
>>> 00xx: x5xe 7x2d 5x7x 70x5 3a20 xx70 70xc xxx3  ent-Type: applic
>>> 00xa: xx7x xxxf xe2f 73xx 700d 0ax3 53x5 7x3a  ation/sdp..CSeq:
>>> 00xb: 203x  383x 20xx xe5x xx5x x50d 0axx   x338x INVITE..F
>>> 00xc: 72xf xd3a 203c 73xx 703a 3535 3038 3030  rom: >> 00xd: 3838 373x 353x 35x0 3230 3x2e 3230 2e3x  x87x...@xxx.xx.x
>>> 00xe: 382e 3230 323a 3530 3x30 3e3b 7xxx x73d  x.xxx:50x0>;tag=
>>> 00xf: 302d 3xxx xx3x 0d0a xdxx 782d xxxf 7277  0-xDAx..Max-Forw
>>> 0020: xx72 xx73 3a20 3x3x 0d0a 53x5 7373 xxxf  ards: xx..Sessio
>>> 002x: xe2d  3a20 x33x 33x3 3x38 3x38 3032  n-ID: cx3cx8x802
>>> 0022: 3x3x 33x3 3x3x 373x 3x3x 3x33 x2x5 35x5  xx3cxx7e
>>> 0023: x2x2 3735 3x3x 0d0a 5375 7070 xf72 7xx5  bb75xx..Supporte
>>> 002x: xx3a 203x 3030 72x5 xc2c 7xxx xdx5 722c  d: x00rel,timer,
>>> 0025: 72x5 70xc xxx3 x573 2cx8 xx73 7xxx xexx  replaces,histinf
>>> 002x: xf0d 0a5x xf3a 203c 73xx 703a 3x30 3x30  o..To: >> 0027: 3030 3x3x 3035 3xx0 xxxe 737x xxxe x3x5  05x@
>>> 0028: 3x30 3x2e xx7x x5xe xxx5 73xx xd70 xcx5  xxx.
>>> 002x: 732e xex5 7x2e x272 3a35 303x 303e 0d0a  x.xxx.xx:50x0>..
>>> 002a: 5xxx xx3a 2053 xx50 2f32 2e30 2f57 5353  Via: SIP/2.0/WSS
>>> 002b: 2035 3x2e 3233 322e 323x 382e 3233 333a   xx.xxx.xxx.xxx:
>>> 002c: 3x3x 333b x272 xxxe x3x8 3d7a 3xx8 x73x  xx3;branch=zxhGx
>>> 002d: x2xb 3030 35x3 2e35 3832 383x 38x2 xx37  bK005c.xxba7
>>> 002e: x3x3 xx30 383x 3x32 3xx3 x33x 3x37 xxx3  ccd087dc
>>> 002f: 32x5 3xx3  x52e 300d 0a5x  3a20  2excdae.0..Via:
>>> 0030: 53xx 502f 322e 302f 55xx 5020 3230 3x2e  SIP/2.0/UDP xxx.
>>> 003x: 3230 2e3x 382e 3230 323a 3530 3x30 3b72  xx.xx.xxx:50x0;r
>>> 0032: x5x3

Re: [SR-Users] Binary Websocket messages

2020-02-06 Thread Yuriy Gorlichenko
Also this message does not looks like it is binary SIP as it contains
headers. So it is encoding problem of the browser.
In that case if you will get SIP traces on the kamailio side you have to
see usual sip message from the kamailio to browser.

On Thu, 6 Feb 2020, 14:48 Yuriy Gorlichenko,  wrote:

> Can you try to get SIP dump from kamailio to WebSocket endpoint on the
> kamailio machine?
>
> I believe kamailio have no binary sip draft implementation on a board.
>
>
> On Thu, 6 Feb 2020, 14:22 Andre Pires dos Santos, <
> santos.andrepi...@gmail.com> wrote:
>
>> Yuriy, we get the whole invite message binary.
>>
>> We got an example from chrome network console (I x'ed some info):
>>
>>
>> : xxxe 5xxx 5xx5 2073 xx70 3a7x 75xx x835  INVITE sip:quah5
>> 000x: 3xxx 7xx0 3370 3xxc 7x3x x375 3xxf xx3x  xav@3pxlvxcuxofx
>> 0002: 2exx xe7x xxxc  3b7x 72xx xe73 70xf  .invalid;transpo
>> 0003: 727x 3d77 7320 53xx 502f 322e 300d 0a52  rt=ws SIP/2.0..R
>> 000x: x5x3 xf72 xx2d 52xf 757x x53a 203c 73xx  ecord-Route: > 0005: 703a 353x 2e32 3332 2e32 3x38 2e32   p:xx.xxx.xxx.xxx
>> 000x: 3a3x 3x33 3b7x 72xx xe73 70xf 727x 3d77  :xx3;transport=w
>> 0007: 733b 7232 3dxf xe3b xc72 3dxf xe3b   s;r2=on;lr=on;di
>> 0008: xx3d 3xxx 352e x533 xx32 3bxe xx7x 3d7x  d=xa5.e3a2;nat=y
>> 000x: x573 3e0d 0a52 x5x3 xf72 xx2d 52xf 757x  es>..Record-Rout
>> 000a: x53a 203c 73xx 703a 353x 2e32 3332 2e32  e: > 000b: 3x38 2e32  3b72 323d xfxe 3bxc 723d  xx.xxx;r2=on;lr=
>> 000c: xfxe 3bxx  3d3x xx35 2ex5 33xx 323b  on;did=xa5.e3a2;
>> 000d: xexx 7x3d 7xx5 733e 0d0a xxxc xcxf 773a  nat=yes>..Allow:
>> 000e: 20xx xe5x xx5x x52c x25x x52c 52x5 x7xx   INVITE,BYE,REGI
>> 000f: 535x x552 2cxx x3xb 2cxf 505x xxxf xe53  STER,ACK,OPTIONS
>> 00x0: 2cx3 xxxe x3x5 xc2c xxxe xxxf 2c50 52xx  ,CANCEL,INFO,PRA
>> 00xx: x3xb 2c53 55x2 53x3 52xx x2x5 2cxe xf5x  CK,SUBSCRIBE,NOT
>> 00x2:  5x2c 52x5 xxx5 522c 5550  5xx5  IFY,REFER,UPDATE
>> 00x3: 0d0a x3xx xcxc 2dxx xx3a 20x3 7x35 xd7x  ..Call-ID: Cv5my
>> 00xx: 755a xx3x 3xx5 xcxx xbxx xxx0 3230 3x2e  uZFxxELDkaD@xxx.
>> 00x5: 3230 2e3x 382e 3230 320d 0ax3 xfxe 7xxx  xx.xx.xxx..Conta
>> 00xx: x37x 3a20 3c73 xx70 3a35 3530 3830 3038  ct: > 00x7: 3837 3x35 3x35 x032 303x 2e32 302e 3x38  87x...@xxx.xx.xx
>> 00x8: 2e32 3032 3a35 303x 303e 0d0a x3xf xe7x  .xxx:50x0>..Cont
>> 00xx: x5xe 7x2d 5x7x 70x5 3a20 xx70 70xc xxx3  ent-Type: applic
>> 00xa: xx7x xxxf xe2f 73xx 700d 0ax3 53x5 7x3a  ation/sdp..CSeq:
>> 00xb: 203x  383x 20xx xe5x xx5x x50d 0axx   x338x INVITE..F
>> 00xc: 72xf xd3a 203c 73xx 703a 3535 3038 3030  rom: > 00xd: 3838 373x 353x 35x0 3230 3x2e 3230 2e3x  x87x...@xxx.xx.x
>> 00xe: 382e 3230 323a 3530 3x30 3e3b 7xxx x73d  x.xxx:50x0>;tag=
>> 00xf: 302d 3xxx xx3x 0d0a xdxx 782d xxxf 7277  0-xDAx..Max-Forw
>> 0020: xx72 xx73 3a20 3x3x 0d0a 53x5 7373 xxxf  ards: xx..Sessio
>> 002x: xe2d  3a20 x33x 33x3 3x38 3x38 3032  n-ID: cx3cx8x802
>> 0022: 3x3x 33x3 3x3x 373x 3x3x 3x33 x2x5 35x5  xx3cxx7e
>> 0023: x2x2 3735 3x3x 0d0a 5375 7070 xf72 7xx5  bb75xx..Supporte
>> 002x: xx3a 203x 3030 72x5 xc2c 7xxx xdx5 722c  d: x00rel,timer,
>> 0025: 72x5 70xc xxx3 x573 2cx8 xx73 7xxx xexx  replaces,histinf
>> 002x: xf0d 0a5x xf3a 203c 73xx 703a 3x30 3x30  o..To: > 0027: 3030 3x3x 3035 3xx0 xxxe 737x xxxe x3x5  05x@
>> 0028: 3x30 3x2e xx7x x5xe xxx5 73xx xd70 xcx5  xxx.
>> 002x: 732e xex5 7x2e x272 3a35 303x 303e 0d0a  x.xxx.xx:50x0>..
>> 002a: 5xxx xx3a 2053 xx50 2f32 2e30 2f57 5353  Via: SIP/2.0/WSS
>> 002b: 2035 3x2e 3233 322e 323x 382e 3233 333a   xx.xxx.xxx.xxx:
>> 002c: 3x3x 333b x272 xxxe x3x8 3d7a 3xx8 x73x  xx3;branch=zxhGx
>> 002d: x2xb 3030 35x3 2e35 3832 383x 38x2 xx37  bK005c.xxba7
>> 002e: x3x3 xx30 383x 3x32 3xx3 x33x 3x37 xxx3  ccd087dc
>> 002f: 32x5 3xx3  x52e 300d 0a5x  3a20  2excdae.0..Via:
>> 0030: 53xx 502f 322e 302f 55xx 5020 3230 3x2e  SIP/2.0/UDP xxx.
>> 003x: 3230 2e3x 382e 3230 323a 3530 3x30 3b72  xx.xx.xxx:50x0;r
>> 0032: x5x3 x5xx 7xx5 xx3d 3230 3x2e 3230 2e3x  eceived=xxx.xx.x
>> 0033: 382e 3230 323b 7270 xf72 7x3d 3530 3x30  x.xxx;rport=50x0
>> 003x: 3bx2 72xx xex3 x83d 7a3x x8x7 3xx2 xbx2  ;branch=zxhGxbKB
>> 0035: 37x3 3x30 xx37 320d 0a58 2dx3 xxxc xcx5  7C2..X-CALLE
>> 003x: 52xx xexx xf3a 2030 0d0a 582d x3xx xcxc  RINFO: 0..X-CALL
>> 0037:  3a20 3532 323x 3x37 3x30 380d 0a58  

Re: [SR-Users] Binary Websocket messages

2020-02-06 Thread Yuriy Gorlichenko
xxx  udFxwYXRoIjoiLyI
> 00x0: 73xx xe5x 7a5a 58xa  575x xxxf xa5x  sInVzZXJfaWQiOjY
> 00xx: 32xc x3xa 72xx 5735 xbxx xaxf xx5x 32x8  2LCxiY2h
> 00x2: 7xx2 323x xc58 325x 3xxx x75x 75x3 32xc  yb2xlX2VxdGVuc2l
> 00x3: 7xx2  73xx xexe 305x 58xa 30x3 3x3x  vbiIsInN0YXJ0cxx
> 00xx: 33xx 5852 xf58 32xe 73xx 575x 75xx x3xx  3aXRoX2NsaWVudCI
> 00x5: 3x5a xdxx 73x3 3255 73xx xdxe 73xx 575x  saWV
> 00xx: 75xx xx3x 75xx 573x xx5a 58xa 7axx xa70  udFxudWxiZXJzIjp
> 00x7: x2xx xa55 3xxd xax5 7xxe 5xxd 3xxd 7axb  bIjUxMjEyNTMxMzk
> 00x8: 7axf 53xa xxxc x3xa xf5x 5735 xexx 58x2  zOSJdLCJoYW5ndXB
> 00xx: xxx2 57xx xaxx x7xc 755a 5x3x x8x2 xexe  fbWFjaGluZVxhbnN
> 00xa: 335a 58xa xxx3 x7x8 7xx2 xd5x 7axx xa70  3ZXJfcGhvbmVzIjp
> 00xb: x258 5377 xx5x 58x2 70xx xaxf xxx2 57xx  bXxxibWF
> 00xc: 75xx 57xx 7358 32xx 75x3 33xx xcx3   udWFsX2Fuc3dlciI
> 00xd: 73xx xex7 7x5a x7xc x8x2 x75x 7xxc 57xc  sIngtZGlhbGVyLWl
> 00xe: xbxx xaxf xxxd 575a xbxe xa5x xxxd 5x55  kIjoiMWZkNjViMTU
> 00xf: 7xxf 575a xcxd x330 30xd  xdxc 57x5  tOWZlMC00MDFmLWE
> 0050: 77xd 5xx5 7xxe xa5x 785x xaxx xxxe 5xxx  wMTEtNjQxYjFiNTF
> 005x: xaxd 7axb 78xx xe30 3d0d 0a58 2dxx xx52  jMzkxIn0=..X-DIR
> 0052: x5x3 5xxx xfxe 3a20 xf55 5x0d 0a58 2dxf  ECTION: OUT..X-O
> 0053: 505x xxxf xexe xxxd x53a 2030 0d0a 582d  PTIONNAME: 0..X-
> 005x: 53xx 5057 x8xx 5350 x552 3a20 300d 0a58  SIPWHISPER: 0..X
> 0055: 2d5x 52xx xe53 xxx5 523a 2030 0d0a x3xf  -TRANSFER: 0..Co
> 005x: xe7x x5xe 7x2d xcx5 xex7 7xx8 3a20 3x38  ntent-Length: x8
> 0057: 3x0d 0a0d 0a7x 3d30 0d0a xf3d 2d20 3x32  xv=0..o=- x2
> 0058: 3x35 3x33 3x20 3020 xxxe 20xx 503x 2035  x5x3x 0 IN IPx x
> 005x: 3x2e 3233 322e 323x 382e 3233 330d 0a73  x.xxx.xxx.xxx..s
> 005a: 3d2d 0d0a x33d xxxe 20xx 503x 2035 3x2e  =-..c=IN IPx xx.
> 005b: 3233 322e 323x 382e 3233 330d 0a7x 3d30  xxx.xxx.xxx..t=0
> 005c: 2030 0d0a xd3d xx75  xf20 3x3x 3x37   0..m=audio xxx7
> 005d: 3820 525x 502f 53xx 5x50 xx20 3820 3020  8 RTP/SAVPF 8 0
> 005e: 3x38 2033 203x 3030 0d0a x33d xxxe 20xx  x8 3 x00..c=IN I
> 005f: 503x 2035 3x2e 3233 322e 323x 382e 3233  Px xx.xxx.xxx.xx
> 00x0: 330d 0axx 3dxd xx78 707x xxxd x53a 3230  3..a=maxptime:20
> 00xx: 0d0a xx3d xdxx xx3a ff0d 0axx 3d72 7x70  ..a=mid:...a=rtp
> 00x2: xdxx 703a 3820 50x3 xdxx 2f38 3030 300d  map:8 PCMA/8000.
> 00x3: 0axx 3d72 7x70 xdxx 703a 3020 50x3 xd55  .a=rtpmap:0 PCMU
> 00xx: 2f38 3030 300d 0axx 3d72 7x70 xdxx 703a  /8000..a=rtpmap:
> 00x5: 3x38 20x7 3732 3x2f 3830 3030 0d0a xx3d  x8 G72x/8000..a=
> 00xx: 727x 70xd xx70 3a33 20x7 53xd 2f38 3030  rtpmap:3 GSM/800
> 00x7: 300d 0axx 3d72 7x70 xdxx 703a 3x30 3020  0..a=rtpmap:x00
> 00x8: 7xx5 xcx5 70x8 xfxe x52d x57x x5xe 7x2f  telephone-event/
> 00xx: 3830 3030 0d0a xx3d xxxd 7x70 3a3x 3820  8000..a=fmtp:x8
> 00xa: xxxe xex5 78x2 3dxe xf0d 0axx 3dxx xd7x  annexb=no..a=fmt
> 00xb: 703a 3x30 3020 302d 3x35 0d0a xx3d 73x5  p:x00 0-x5..a=se
> 00xc: xexx 72x5 x37x 0d0a xx3d 727x x370 3a3x  ndrecv..a=rtcp:x
> 00xd: 3x3x 373x 0d0a xx3d 727x x370 2dxd 7578  xx7x..a=rtcp-mux
> 00xe: 0d0a xx3d 73x5 7x75 703a xxx3 7x70 xx73  ..a=setup:actpas
> 00xf: 730d 0axx 3dxx xxxe x7x5 7270 72xx xe7x  s..a=fingerprint
> 0070: 3a73 x8xx 2d3x 20x2 x33a 383x 3a37 353a  :sha-x BC:8x:75:
> 007x: 3x37 3a30 303a xx38 3a3x 3x3a  3a30  x7:00:F8:xx:33:0
> 0072: 383a xx3x 3a37 xx3a 3230 3a32 383a xx3x  8:Ax:xx:20:28:Fx
> 0073: 3a30 3x3a 37xx 3a32 xx3a 35x3 3ax2 3x3a  :0x:xx:xx:5C:Bx:
> 007x: 3x3x 0d0a xx3d 707x xxxd x53a 3230 0d0a  xx..a=ptime:20..
> 0075: xx3d xxx3 x52d 75xx 72xx x73a 5778 303x  a=ice-ufrag:Wx0x
> 007x: 3830 7278 0d0a xx3d xxx3 x52d 7077 xx3a  80rx..a=ice-pwd:
> 0077: 337x 375a 705x 3x5a 7xx8 xf3x xd7x xb3x  3t7ZphOxMtKx
> 0078: 357x 3258 5x38 377x xc70 0d0a xx3d x3xx  5q2XV87ylp..a=ca
> 007x: xexx  xx7x x53a xc3x xfxx xxxa xc32  ndidate:LxoiDjL2
> 007a: 353x 537x 55xx 3xx2 203x 2055 xx50 2032  5AxB x UDP 2
> 007b: 3x33 3037 303x 3x33 3x20 353x 2e32 3332  x3070xx3x xx.xxx
> 007c: 2e32 3x38 2e32  203x 3x3x 3738 207x  .xxx.xxx xxx78 t
> 007d: 7x70 20x8 xf73 7x0d 0axx 3dx3 xxxe   yp host..a=candi
> 007e:  7xx5 3axc 3xxf  xaxc 3235 3x53  date:Lxox5xS
> 007f: 7x55 xx3x x220 3220 55xx 5020 323x 3330  qUAxB 2 UDP 2x30
> 0080: 3730 3x3x 3330 2035 3x2e 3233 322e 323x  70xx30 xx.xxx.xx
> 008x: 382e 3233 3320 3x3x 3x37 3x20 7x7x 7020  x.xxx xxx7x typ
> 0082: x8xf 737x 0d0a   host..
>
> On Thu, Feb 6, 2020 at 10:00 AM Yuriy Gorlichenko 
> wrote:
>
>> Are you talking about SDP

Re: [SR-Users] Binary Websocket messages

2020-02-06 Thread Yuriy Gorlichenko
Are you talking about SDP part of the SIP invite?

On Thu, 6 Feb 2020, 13:44 Andre Pires dos Santos, <
santos.andrepi...@gmail.com> wrote:

> Hi Yuriy,
>
> yes, there is nothing between webrtc client SIP.js and kamailio/rtpengine.
> We have a sip server that sends a call to kamailio that forwards the call
> to webrtc client. Kamailio is running on plain linux debian EC2 AWS machine
> (no docker or anything else).
>
> Some calls we get from kamailio in UTF-8 invite messages and other calls
> we get binary invite messages.
>
> If logs or cfg helps, just let me know.
>
> Thanks
> Santos
>
>
>
> On Thu, Feb 6, 2020 at 9:29 AM Yuriy Gorlichenko 
> wrote:
>
>> SIP is a text protocol by default. Binary messages can be here only
>> keepalive messages and etc. So it should not go to application layer of the
>> client as it is a transport layer messages. Are you sure There is no other
>> software between kamailio and client that creates a bridge between client
>> and kamailio?
>>
>> On Thu, 6 Feb 2020, 12:37 Andre Pires dos Santos, <
>> santos.andrepi...@gmail.com> wrote:
>>
>>> Hello guys,
>>>
>>> we are new to kamailio so sorry basic or wrong points.
>>>
>>> We started using kamailio 5.3.2 and rtpengine as our sip to webrtc
>>> solution and SIP.js as webrtc client. We noticed that most of the times
>>> webrtc client receives UTF-8 messages. But sometimes webrtc client receives
>>> binary messages. When we get binary messages SIP.js cannot parse the
>>> message.
>>>
>>> I couldn't find how to force kamailio to send only UTF-8 messages. Is it
>>> possible?
>>>
>>> We have other issues but I think it will be better for the list to break
>>> other points in different messages.
>>>
>>> Thanks!
>>> Santos
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Binary Websocket messages

2020-02-06 Thread Yuriy Gorlichenko
SIP is a text protocol by default. Binary messages can be here only
keepalive messages and etc. So it should not go to application layer of the
client as it is a transport layer messages. Are you sure There is no other
software between kamailio and client that creates a bridge between client
and kamailio?

On Thu, 6 Feb 2020, 12:37 Andre Pires dos Santos, <
santos.andrepi...@gmail.com> wrote:

> Hello guys,
>
> we are new to kamailio so sorry basic or wrong points.
>
> We started using kamailio 5.3.2 and rtpengine as our sip to webrtc
> solution and SIP.js as webrtc client. We noticed that most of the times
> webrtc client receives UTF-8 messages. But sometimes webrtc client receives
> binary messages. When we get binary messages SIP.js cannot parse the
> message.
>
> I couldn't find how to force kamailio to send only UTF-8 messages. Is it
> possible?
>
> We have other issues but I think it will be better for the list to break
> other points in different messages.
>
> Thanks!
> Santos
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Best practice to figure out one way rtp delay

2020-02-06 Thread Yuriy Gorlichenko
Kamailio does not handle RTP.

But you can use heplify ( or homer)
That will alliw you to collect rtcp in your infrastructure and map it with
the SIP calls you have.

On Thu, 6 Feb 2020, 09:23 Karsten Horsmann,  wrote:

> Hi List,
>
> I have a new setup with two Kamailios installations. One serves siptrunks
> from the internet and one is for internal routing.
>
> So far so good. At the end I have an 3rd party b2bua that receives and
> sends calls via the both Kamailios.
>
> For testing purposes I setup an freeswitch with beep and then echo
> application to the caller.
>
> My call flow are like this
>
> Call 1 to kam1 sbc then internal kam2 and b2bua.
> B2bua make then new call no 2 vice versa to PSTN freeswitch with echo.
> After this b2bua bridges the calls together.
>
> This generates for the caller an beep and echo.
>
> The interesting thing is now, that Call 1 gets an hearable delay of 1
> second.
>
> But only in the rtp steam from me to the caller.
>
> The second calls seems equal of timing.
>
> Since is a really new complete setup of hardware and stuff, the question
> of its working before is answered with an no.
>
>
> Now my question to you guys.
>
> How can I get an measurable method to finding the delaying parts (could be
> network, servers, applications etc).
>
> Only capturing on one place don't did the trick for me.
>
> Thanks for your hints
>
> Cheers
> Karsten
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] modifying via header from public IP to private IP

2020-01-30 Thread Yuriy Gorlichenko
Kamailio as sip proxy according rfc adds via by its own based on set up you
making in cfg file. You doing something wrong, explanations above have to
work.

On Fri, 31 Jan 2020, 07:42 vinod mn,  wrote:

> Anyone let me know is it possible to modify the public-IP in via to
> private-IP.
>
>
> On Thu, Jan 30, 2020 at 4:41 PM vinod mn  wrote:
>
>> Thank's david
>>
>> in my kamailio configuration I am using *listen=udp:192.168.131.69:5060
>>  advertise 221.20.20.12:5060
>> * (as mentioned by you)
>> and when the kamailio sends an invite to sip-gateway I am seeing this
>> sip-gateway ip is  *192.168.132.67 *   and this gateway don't have any
>> public-ip assigned ..
>>
>> Via: *SIP/2.0/UDP 221.20.20.12:5060 ;*
>> branch=z9hG4bKaa6a.14c65f5675077ae7b0df70b02516979b.0
>> Via: SIP/2.0/UDP 192.168.113.112 :50386;received= 192.168.113.112
>> ;branch=z9hG4bK-d87543-550b984016109617-1--d87543-;rport=50386
>>
>> I want  private ip instead of public ip in the first via
>>
>> --
>> Thanks and regards
>> Vinod.M.N
>>
>
>
> --
> Thanks and regards
> Vinod.M.N
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Re-write contact header

2020-01-29 Thread Yuriy Gorlichenko
You always can realize all those things by your own by saving information
in additional params in contact and ruri or locally in the db you are using
with kamailio or in the hash.
It's required to write more config aka codebut still a way.

On Wed, 29 Jan 2020, 13:06 egemen ulus,  wrote:

> Definitely you're right but remote site can't solve their problem, that's
> why I am trying to solve that.
>
> Btw, I ve achieved to hide the IP address of contact header thanks to
> topoh. But once kamailio got ack, it doesn't know where to send, that means
> it can't decode the key. (it is my opinion)
>
> When I searched it, I saw that I should use topos & redis to store. But no
> module on Kamailio 4.3.x. it might be released on 5.x and above..
>
> Is there any recommendation for decoding properly?
>
> Get Outlook for Android <https://aka.ms/ghei36>
>
> ----------
> *From:* sr-users  on behalf of Yuriy
> Gorlichenko 
> *Sent:* Wednesday, January 29, 2020 12:25:03 PM
> *To:* Kamailio (SER) - Users Mailing List 
> *Subject:* Re: [SR-Users] Re-write contact header
>
> It is wrong if your remote party ignores record-route. If it does not
> support work with RR/Route headers it at least should interrupt transaction
> on the first reply that contains RR.
>
> However There are a couple of ways to make kamailio work as SBC:
> - topos module
> - Rewrite contact header manually ( by removing old and inserting new one)
>
> NAT helper functions will not help you as they are check source address of
> the message and fix contact based on this part. So it will not Rewrite
> Contact address on SBC address. It will Rewrite contact if it does not
> match with the source address of the message.
>
> On Wed, 29 Jan 2020, 09:52 egemen ulus,  wrote:
>
> Hi everyone,
>
> I have asterisk farm and kamailio which located front of asterisks farm as
> a proxy.
>
> When someone send a invite from outside to my kamailio (without record
> route), i forward it to my Asterisk farm. Then My one of Asterisk reply it
> as 200 ok. Then my kamailio forward this 200 ok to remote side with record
> route. But in my 200 ok message, contact header contains my Asterisk IP
> address. That is why remote side tries to send ACK to Asterisk.
>
> How to rewrite my contact header as my kamailio (SBC) address ?
>
> Actually I tried fixed nated contact and advertise ip but I couldn't make
> it worked. I am really new on that. Kamailio cfg file is attached.
>
> Please help!
>
> Egemen
>
> Get Outlook for Android <https://aka.ms/ghei36>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Re-write contact header

2020-01-29 Thread Yuriy Gorlichenko
It is wrong if your remote party ignores record-route. If it does not
support work with RR/Route headers it at least should interrupt transaction
on the first reply that contains RR.

However There are a couple of ways to make kamailio work as SBC:
- topos module
- Rewrite contact header manually ( by removing old and inserting new one)

NAT helper functions will not help you as they are check source address of
the message and fix contact based on this part. So it will not Rewrite
Contact address on SBC address. It will Rewrite contact if it does not
match with the source address of the message.

On Wed, 29 Jan 2020, 09:52 egemen ulus,  wrote:

> Hi everyone,
>
> I have asterisk farm and kamailio which located front of asterisks farm as
> a proxy.
>
> When someone send a invite from outside to my kamailio (without record
> route), i forward it to my Asterisk farm. Then My one of Asterisk reply it
> as 200 ok. Then my kamailio forward this 200 ok to remote side with record
> route. But in my 200 ok message, contact header contains my Asterisk IP
> address. That is why remote side tries to send ACK to Asterisk.
>
> How to rewrite my contact header as my kamailio (SBC) address ?
>
> Actually I tried fixed nated contact and advertise ip but I couldn't make
> it worked. I am really new on that. Kamailio cfg file is attached.
>
> Please help!
>
> Egemen
>
> Get Outlook for Android 
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] rtpengine relay ip and port in avp

2020-01-23 Thread Yuriy Gorlichenko
Look here
https://www.kamailio.org/docs/modules/5.3.x/modules/rtpengine.html#rtpengine.p.write_sdp_pv

Then you will be able to get it with string operations.

On Thu, 23 Jan 2020, 14:25 Pafel,  wrote:

> My bad, I am using rtpengine module but not rtpproxy.
>
> Regards,
> Pavel
>
> На ср, 22.01.2020 г. в 18:41 Pafel  написа:
>
>> Hello,
>> I am using kamailio 5.3, rtproxy module and sipwise rtpengine. Is there
>> any way I can get the rewritten / relay address and port by the
>> rtpproxy/rtpengine. In avp or some other variable?
>> Regards,
>> Pavel Siderov
>>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Parallel forking and rtpengine handling

2020-01-22 Thread Yuriy Gorlichenko
It is. In this case manage = delete

On Wed, 22 Jan 2020, 19:16 George Diamantopoulos, 
wrote:

>
>
> On Wed, 22 Jan 2020 at 18:28, Richard Fuchs  wrote:
>
>> On 22/01/2020 11.06, Sebastian Damm wrote:
>> > Hi,
>> >
>> > our scenario is the following: We have two clients registered to our
>> > Kamailio server, one with a TLS capable phone, one via websocket. Now,
>> > when a call comes in, the call is forked and is sent out to both
>> > clients. rtpengine handling is done in the branch route, so there are
>> > two offers, and we use the "via-branch" parameter.
>> >
>> > Now, when one branch answers the call, what happens to the other
>> > branch? I there a way to delete the other branch? How and in which
>> > route? Or does Kamailio do this automatically?
>>
>> You do it the same way as you handle an answer: You issue a delete with
>> the via-branch option.
>>
> Doesn't this happen automatically when one uses rtpengine_manage() in the
> failure_route?
>
>>
>> Cheers
>>
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] [sr-dev] Merry Christmas and Happy Holidays!

2019-12-25 Thread Yuriy Gorlichenko
I wanna say thank you Dainel and all kamailio community for this amazing
product from Russian VoIP community.
2019 was amazing as we have been start to make yearly  (I hope) kamailio
Russian conference at Moscow. I wish you all Merry Christmas with all the
best and hope to see you all soon at Berlin in may.

ср, 25 дек. 2019 г. в 02:23, Fred Posner :

> Thank you to all who make Kamailio possible and looking forward to an
> amazing 2020.
>
> -- Fred
> direct/sms +1 (336) 439-3733
>
>
> On Dec 24, 2019, at 6:05 PM, Julien Chavanton 
> wrote:
>
> 
> I also want to share my good thoughts from the Pacific Northwest.
>
> Happy holidays to everyone in this very productive and positive community !
> I am glad that we exist !
>
> Special thanks to  Daniel and Henning for their huge comitment to this
> kamailio.
>
> On Tue, Dec 24, 2019, 11:01 Daniel-Constantin Mierla 
> wrote:
>
>> Another year getting to its end, the season holidays are ahead,
>> therefore it is no better time than now to express my thanks and
>> greetings to all the friends, developers, supporting companies and
>> community members that made 2019 an outstanding year for Kamailio project.
>>
>> Enjoy the holidays! Merry Christmas!
>>
>> Daniel
>>
>> * Santa is flying Kamailio! *
>>
>> --
>> Daniel-Constantin Mierla -- www.asipto.com
>> www.twitter.com/miconda -- www.linkedin.com/in/miconda
>> Kamailio World Conference - April 27-29, 2020, in Berlin --
>> www.kamailioworld.com
>>
>>
>> ___
>> Kamailio (SER) - Development Mailing List
>> sr-...@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
>>
> ___
> Kamailio (SER) - Development Mailing List
> sr-...@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] How to reduce re-INVITE time in Kamailio

2019-12-17 Thread Yuriy Gorlichenko
It is not kamailio manage thing. It is end to end Negotiation. In other
words it should be placed by UAc to another UAc.
Not by sip-proxy

On Tue, 17 Dec 2019, 19:52 Anuran Barman,  wrote:

> Thanks for the reply. Sharing doc links of Session timer settings related
> to Kamailio specifically will be greatly appreciated.
>
> On Wed, 18 Dec 2019 at 12:18 AM, Yuriy Gorlichenko 
> wrote:
>
>> Session-Expires header ( Just remembered right name) will help you
>> See rfc 4028
>> https://tools.ietf.org/html/rfc4028#page-6
>>
>> On Tue, 17 Dec 2019, 19:44 Yuriy Gorlichenko, 
>> wrote:
>>
>>> Hi. It is no a kamailio question but sip question itself. You can manage
>>> how often te invite will be by using session-timers. It will help you to
>>> setup time range between reInvite ir whatever message you will use as
>>> keepalive
>>>
>>> On Tue, 17 Dec 2019, 19:34 Anuran Barman, 
>>> wrote:
>>>
>>>> Hi, I am using Kamailio for my SIP Phone app. My main SIP client is the
>>>> iOS app. Till now everything is working fine regarding the calling. But the
>>>> problem is when the app is killed I am not able to pick up incoming call.
>>>> The thing is, when app is killed I am sending PushKit VOIP message to my
>>>> ios app to wake it up. App is waking up. But by the time app is waking up,
>>>> the original INVITE message got missed up. So according to SIP protocol it
>>>> will re-INVITE after some time. Currently if I keep my app open for 10-15
>>>> secs after it wakes up, I am able to get the re-INVITE and everything works
>>>> fine just as it was supposed to. But waiting 10-15 sec on the app is not
>>>> practical in any sense.
>>>>
>>>> So my question is there any way I can reduce the re-INVITE time to like
>>>> 5/6 seconds so that as soon as the app open it will wait for 5/6 seconds
>>>> (practical upto some extent) and it will get the call ? Or what kamailio is
>>>> using as the interval time is a SIP standard and can not be changed? If
>>>> possible to do so, how can I do that? Please help.
>>>> ___
>>>> Kamailio (SER) - Users Mailing List
>>>> sr-users@lists.kamailio.org
>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] How to reduce re-INVITE time in Kamailio

2019-12-17 Thread Yuriy Gorlichenko
Session-Expires header ( Just remembered right name) will help you
See rfc 4028
https://tools.ietf.org/html/rfc4028#page-6

On Tue, 17 Dec 2019, 19:44 Yuriy Gorlichenko,  wrote:

> Hi. It is no a kamailio question but sip question itself. You can manage
> how often te invite will be by using session-timers. It will help you to
> setup time range between reInvite ir whatever message you will use as
> keepalive
>
> On Tue, 17 Dec 2019, 19:34 Anuran Barman,  wrote:
>
>> Hi, I am using Kamailio for my SIP Phone app. My main SIP client is the
>> iOS app. Till now everything is working fine regarding the calling. But the
>> problem is when the app is killed I am not able to pick up incoming call.
>> The thing is, when app is killed I am sending PushKit VOIP message to my
>> ios app to wake it up. App is waking up. But by the time app is waking up,
>> the original INVITE message got missed up. So according to SIP protocol it
>> will re-INVITE after some time. Currently if I keep my app open for 10-15
>> secs after it wakes up, I am able to get the re-INVITE and everything works
>> fine just as it was supposed to. But waiting 10-15 sec on the app is not
>> practical in any sense.
>>
>> So my question is there any way I can reduce the re-INVITE time to like
>> 5/6 seconds so that as soon as the app open it will wait for 5/6 seconds
>> (practical upto some extent) and it will get the call ? Or what kamailio is
>> using as the interval time is a SIP standard and can not be changed? If
>> possible to do so, how can I do that? Please help.
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] How to reduce re-INVITE time in Kamailio

2019-12-17 Thread Yuriy Gorlichenko
Hi. It is no a kamailio question but sip question itself. You can manage
how often te invite will be by using session-timers. It will help you to
setup time range between reInvite ir whatever message you will use as
keepalive

On Tue, 17 Dec 2019, 19:34 Anuran Barman,  wrote:

> Hi, I am using Kamailio for my SIP Phone app. My main SIP client is the
> iOS app. Till now everything is working fine regarding the calling. But the
> problem is when the app is killed I am not able to pick up incoming call.
> The thing is, when app is killed I am sending PushKit VOIP message to my
> ios app to wake it up. App is waking up. But by the time app is waking up,
> the original INVITE message got missed up. So according to SIP protocol it
> will re-INVITE after some time. Currently if I keep my app open for 10-15
> secs after it wakes up, I am able to get the re-INVITE and everything works
> fine just as it was supposed to. But waiting 10-15 sec on the app is not
> practical in any sense.
>
> So my question is there any way I can reduce the re-INVITE time to like
> 5/6 seconds so that as soon as the app open it will wait for 5/6 seconds
> (practical upto some extent) and it will get the call ? Or what kamailio is
> using as the interval time is a SIP standard and can not be changed? If
> possible to do so, how can I do that? Please help.
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Re-use TCP connections on different transactions

2019-10-31 Thread Yuriy Gorlichenko
You have to use
tcp_accept_aliases=yes
But this is not enough as this param will be triggered by function
force_tcp_alias() you need to use in the route for request ( for example
record_route or subroutes)
It will add param paramname= (I Don't remember specific name)
to Via header that will be used for all dialog requests belongs one being
affected


On Fri, 1 Nov 2019, 00:52 Joel Serrano,  wrote:

> Hello,
>
> I'm setting up a Kamailio instance behind a TCP load balancer (with proxy
> protocol and NAT routing: meaning Kam stays in the flow all the time).
>
> I've managed to get working almost everything we need for our service,
> except for one thing, and that is for Kam to use existing connections for
> subsequent transactions:
>
> Following this example:
>
>
> [image: image.png]
>
>
> EXT & INT represent the external and internal interface of a LB between
> the UAC and Kamailio, using TLS on both legs and proxy protocol.
>
> Transaction 1: INVITE, 100, 180, 183, 200 OK
>
> UAC 1.1.1.1: -> 2.2.2.2:443 (EXT) 3.3.3.3: (INT) -> 7.7.7.7:5060
> (Kamailio)
>
> Transaction 2: ACK
>
> UAC 1.1.1.1:1112 -> 2.2.2.2:443 (EXT) 4.4.4.4: (INT) -> 7.7.7.7:5060
> (Kamailio)
>
> Transaction 3: BYE
>
> Kam 7.7.7.7:5060 -> 3.3.3.3: (INT) 2.2.2.2:443 (EXT) -> 1.1.1.1:
> UAC
>
>
>
> My problem is with Transaction 3. In this case the BYE is originated by
> the callee, and Kam has to send it to the caller. As the TCP load balancer
> is between Kam and the UAC, Kam has to send it to the LB so then the LB can
> forward it back to the UAC. This works well for msgs that belong to the
> same transaction (INVITE, 100, 180, 183, 200 OK) but it fails when they
> don't belong to the same transaction.
>
> Thanks to the newly added $tcp(c_si) and $tcp(c_sp) pseudovars, I can save
> the internal IP:Port of the LB, so I can send stuff later to it, my problem
> is that Kam doesn't seem to allow this?
>
> On the original INVITE, I use the following to save where I have to reach
> the UAC:
>
> add_contact_alias("$tcp(c_si)", "$tcp(c_sp)", "tls");
>
> Then, handle_ruri_alias() will take care of setting $du to the correct
> (internal LB) IP:Port so I can reach the UAC, this works.
>
> My problem is that Kamailio doesn't identify that there is a valid
> existing TLS connection still up (from the INVITE), and tries to create a
> new one (and this obviously doesn't gives all sorts of problems).
>
> So when I run handle_ruri_alias(), and $du is set to 3.3.3.3: (from
> the example above), instead of using the existing connection, Kamailio
> tries to create a new one.
>
> I have a log statement right before with the result of tcp_conid_state(1)
> (the connid is 1 for this connection) and the $rc is 1 (Connection is OK),
> but when I tell Kamailio it has to use it I get this in the logs:
>
> DEBUG: {1 11726467 BYE gqR1qqNK8B}  [core\/tcp_main.c:2060]:
> tcp_send(): no open tcp connection found, opening new one"}
>
> And then the problems begin...
>
>
> I have tried playing around with:
>
> tcp_reuse_port
> tcp_connection_match
>
> But no luck..!
>
> I also thought it could be a problem of the connection being created on
> one worker, and a different worker handling BYE transaction, so tested with
> children=1 and tcp_children=1, but still same problem.
>
> A more detailed log:
>
> In blue my log statement checking for the status of conid "1", in red Kam
> not being able to find it, although it exists (as validated
> by tcp_conid_state(), and even in netstat I can see the connection
> established). In this log, 35.191.0.66:60271 would be the equivalent of
> 3.3.3.3: and 104.175.176.242:28157 would be 1.1.1.1: from the
> example above.
>
> ...
> "message":" DEBUG: {1 11727734 BYE 5-LX4GdI9X} 
> [core\/tcp_main.c:1657]: _tcpconn_find(): found connection by id: 1"}
> "message":" NOTICE: {1 11727734 BYE 5-LX4GdI9X} 

Re: [SR-Users] catching tls errors

2019-10-16 Thread Yuriy Gorlichenko
Not sure if it availible for 4.x Version but for 5.x There is a tcp
connection closed event route
https://kamailio.org/docs/modules/4.4.x/modules/tcpops.html#tcpops.f.tcp_enable_closed_event
You can try to play around it to get ip that distorbs you.

Probably these will be a lot of attempts during small period of time from
the same ip.

On Wed, 16 Oct 2019, 08:55 Juha Heinanen,  wrote:

> Yuriy Gorlichenko writes:
>
> > Looks no, because connection must be established for handling it in the
> > config file. This error fired by ssl library during Negotiation process.
> >
> > But you can try tcpdump, at least you will see Who tries to established
> > connection
>
> Yes, I could do that, but I would rather get the IP address to syslog so
> that I could fail2ban it.
>
> -- Juha
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] catching tls errors

2019-10-16 Thread Yuriy Gorlichenko
Looks no, because connection must be established for handling it in the
config file. This error fired by ssl library during Negotiation process.

But you can try tcpdump, at least you will see Who tries to established
connection

On Tue, 15 Oct 2019, 15:51 Juha Heinanen,  wrote:

> Sometimes I see in syslog errors like this:
>
> Oct 15 16:44:57 salmon /usr/bin/sip-proxy[2064]: ERROR: tls
> [tls_util.h:42]: tls_err_ret(): TLS accept:error:1417C086:SSL
> routines:tls_process_client_certificate:certificate verify failed
>
> Is it possible somehow to catch the error in config file, for example,
> to figure out from which IP address the connection attempt came from?
>
> -- Juha
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] app_lua: invalid Lua environment attributes or parameters

2019-09-18 Thread Yuriy Gorlichenko
Will repeat reply here as sent it only to Daniel first

Yep. You understand right.

Here need to add some context then :-)

All my scripts "main.lua" ( that passed via *modparam* *load) *with cfg
engine lua starts as

*function initPath() *
*local myPath = debug.getinfo(1).source:match("@?(.*/)")*
*if not string.match(package.path, myPath) then*
*package.path = myPath .. '?.lua;' .. package.path*
*end*
*KSR.log("debug","package path loaded: ".. **package.path) *
*end*

That I run as first step inside of all global functions like
*ksr_request_route() *and etc

This gives me possibility to load modules which lays at the subdirs near my
"*main.lua*" file that is kinda entry point

I can run it as global function too before others global function ofcourse,
but without *KSR.log()*

For .*cfg *files Where I use lua_run()  as extension I have the same
structure of lua modules and files and also run this function on the
main.lua for the same purpose *But  *at the main flow, not inside function
that Im calling via *lua_run() *

So accidently I started to run it at the main flow  but forgot to remove
*KSR.log()* and, actually, I expected to see
Lua error like "KSR not defined" or etc. But this gave me different error
that at the start of the topic and that confused me :-)

If need more clrification: I will be able to do it later on. Just let me
know.

On Wed, 18 Sep 2019, 08:44 Daniel-Constantin Mierla, 
wrote:

>
> On 16.09.19 21:08, Yuriy Gorlichenko wrote:
>
> I found issue:
> Called  KSR.log earlier than it was initiated.
> Moved part of code previously used in cfgengine "lua" to lua_run().
>
>
> Just to clarify: the issue was exposed because you moved some code that
> was used previously with cfgengine lua to a lua_run() usage? The KSR should
> be initialized quite early, that's why I am trying to figure out if there
> are cases when Lua code can be executed (due to some modparams or event
> routes) and the environment is not set, in order to find some solution for
> such cases. So if you can provide more details about how was used and not
> working, it may get fixes if it is a viable use case.
>
> Cheers,
> Daniel
>
>
>
> пн, 16 сент. 2019 г. в 15:25, Yuriy Gorlichenko :
>
>> Sorry Just a mistake. Offcourse it is path to kamailio.cfg file which
>> contains path to main.lua as modparam. Sorry for confusing
>>
>> On Mon, 16 Sep 2019, 10:45 Daniel-Constantin Mierla, 
>> wrote:
>>
>>> Hello,
>>>
>>> is it "kamailio -f /etc/kamailio/extended/main.lua" or just a typing
>>> mistake, because the config path provided with -f should still be to the
>>> kamailio.cfg where you set global parameters, load modules and set their
>>> parameters?
>>>
>>> Cheers,
>>> Daniel
>>>
>>> On Mon, Sep 16, 2019 at 7:23 AM Yuriy Gorlichenko 
>>> wrote:
>>>
>>>> Hi! Im using kamailio 5.1.8 with app_lua and getting this message
>>>> during startup of kamailio. Looks like I forgot to add something at the
>>>> module setup, but cant figure out what is wrong. My setup of app_lua is:
>>>>
>>>> modparam("app_lua", "load", "/etc/kamailio/extended/main.lua")
>>>> modparam("app_lua","reload",1)
>>>> modparam("app_lua","register","textops")
>>>>
>>>> app_lua [app_lua_sr.c:1599]: sr_kemi_lua_exec_func_ex(): invalid Lua
>>>> environment attributes or parameters
>>>>
>>>> starting kamailio service with kamailio -f
>>>> /etc/kamailio/extended/main.lua
>>>>
>>>> Also here is little bit confusing me that in case of use "KSR"
>>>> everywhere I'm getting message about "sr"...
>>>>
>>>> Thx in advice
>>>> ___
>>>> Kamailio (SER) - Users Mailing List
>>>> sr-users@lists.kamailio.org
>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>>
>>>
>>> --
>>> Daniel-Constantin Mierla - http://www.asipto.com
>>> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- 
> https://asipto.com/u/kat
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] app_lua: invalid Lua environment attributes or parameters

2019-09-16 Thread Yuriy Gorlichenko
I found issue:
Called  KSR.log earlier than it was initiated.
Moved part of code previously used in cfgengine "lua" to lua_run().

пн, 16 сент. 2019 г. в 15:25, Yuriy Gorlichenko :

> Sorry Just a mistake. Offcourse it is path to kamailio.cfg file which
> contains path to main.lua as modparam. Sorry for confusing
>
> On Mon, 16 Sep 2019, 10:45 Daniel-Constantin Mierla, 
> wrote:
>
>> Hello,
>>
>> is it "kamailio -f /etc/kamailio/extended/main.lua" or just a typing
>> mistake, because the config path provided with -f should still be to the
>> kamailio.cfg where you set global parameters, load modules and set their
>> parameters?
>>
>> Cheers,
>> Daniel
>>
>> On Mon, Sep 16, 2019 at 7:23 AM Yuriy Gorlichenko 
>> wrote:
>>
>>> Hi! Im using kamailio 5.1.8 with app_lua and getting this message during
>>> startup of kamailio. Looks like I forgot to add something at the module
>>> setup, but cant figure out what is wrong. My setup of app_lua is:
>>>
>>> modparam("app_lua", "load", "/etc/kamailio/extended/main.lua")
>>> modparam("app_lua","reload",1)
>>> modparam("app_lua","register","textops")
>>>
>>> app_lua [app_lua_sr.c:1599]: sr_kemi_lua_exec_func_ex(): invalid Lua
>>> environment attributes or parameters
>>>
>>> starting kamailio service with kamailio -f
>>> /etc/kamailio/extended/main.lua
>>>
>>> Also here is little bit confusing me that in case of use "KSR"
>>> everywhere I'm getting message about "sr"...
>>>
>>> Thx in advice
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>
>>
>> --
>> Daniel-Constantin Mierla - http://www.asipto.com
>> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] app_lua: invalid Lua environment attributes or parameters

2019-09-16 Thread Yuriy Gorlichenko
Sorry Just a mistake. Offcourse it is path to kamailio.cfg file which
contains path to main.lua as modparam. Sorry for confusing

On Mon, 16 Sep 2019, 10:45 Daniel-Constantin Mierla, 
wrote:

> Hello,
>
> is it "kamailio -f /etc/kamailio/extended/main.lua" or just a typing
> mistake, because the config path provided with -f should still be to the
> kamailio.cfg where you set global parameters, load modules and set their
> parameters?
>
> Cheers,
> Daniel
>
> On Mon, Sep 16, 2019 at 7:23 AM Yuriy Gorlichenko 
> wrote:
>
>> Hi! Im using kamailio 5.1.8 with app_lua and getting this message during
>> startup of kamailio. Looks like I forgot to add something at the module
>> setup, but cant figure out what is wrong. My setup of app_lua is:
>>
>> modparam("app_lua", "load", "/etc/kamailio/extended/main.lua")
>> modparam("app_lua","reload",1)
>> modparam("app_lua","register","textops")
>>
>> app_lua [app_lua_sr.c:1599]: sr_kemi_lua_exec_func_ex(): invalid Lua
>> environment attributes or parameters
>>
>> starting kamailio service with kamailio -f /etc/kamailio/extended/main.lua
>>
>> Also here is little bit confusing me that in case of use "KSR" everywhere
>> I'm getting message about "sr"...
>>
>> Thx in advice
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
> --
> Daniel-Constantin Mierla - http://www.asipto.com
> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] app_lua: invalid Lua environment attributes or parameters

2019-09-15 Thread Yuriy Gorlichenko
Hi! Im using kamailio 5.1.8 with app_lua and getting this message during
startup of kamailio. Looks like I forgot to add something at the module
setup, but cant figure out what is wrong. My setup of app_lua is:

modparam("app_lua", "load", "/etc/kamailio/extended/main.lua")
modparam("app_lua","reload",1)
modparam("app_lua","register","textops")

app_lua [app_lua_sr.c:1599]: sr_kemi_lua_exec_func_ex(): invalid Lua
environment attributes or parameters

starting kamailio service with kamailio -f /etc/kamailio/extended/main.lua

Also here is little bit confusing me that in case of use "KSR" everywhere
I'm getting message about "sr"...

Thx in advice
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] About STIR/SHAKEN - Caller Identity

2019-08-22 Thread Yuriy Gorlichenko
Hello, Daniel.
You disscussed it with Oleg Belousov at Kamailio World 2019. ( I added him
in cc as he Just subscribed on list and did not saw this thread)

I was a part of his team Who realized this.
Yes, we've implemented STIR/SHAKEN platform for mobile operator, using Lua,
which interrogates with php-fpm scripts via http/json queries.
Apart from signing SIP requests and validation of identity headers we had
to deploy additional business requirements,
including integration with CVT (Call Validation Treatment) entity, special
handling of certain SIP headers, blacklisting, etc. Above approach gave us
bit more flexibility.

We can deploy C module, if required, can share our expertize as well.

On Fri, 16 Aug 2019, 16:38 Daniel-Constantin Mierla, 
wrote:

> Hello,
>
> at couple of events I participated during the past few months, I was
> asked about support of STIR/SHAKEN (caller identity
> authentication/verification), which is a hot topic these days at least
> in USA, aiming to combat "fraudulent" robo-calling. Therefore I thought
> of share some details with everyone in the community about the state in
> Kamailio, writing to both devs and users, the information being relevant
> for everyone.
>
> We already have the (related) module named auth_identity, available
> since 2008 (iirc):
>
>   -
> https://www.kamailio.org/docs/modules/stable/modules/auth_identity.html
>
> But it implements the previous iteration of the specs for caller
> identity, respectively RFC 4474:
>
>   - https://tools.ietf.org/html/rfc4474
>
> However, that RFC is obsoleted by 8224 (the latest core specs for
> STIR/SHAKEN):
>
>   - https://tools.ietf.org/html/rfc8224
>
> Then, there are also RFCs 8225 and 8226 to add to the core specs.
>
> Should anyone be interested to implement STIR/SHAKEN specs in a modules,
> I would suggest to start from auth_identity -- might not be much work to
> update it to become conform with latest specs (a new module can be
> created, of course, even when starting from auth_identity).
>
> However, these specs are about signing the SIP request (the INVITE) with
> special PKI certificate. It can be done easily with embedded scripts
> such as Lua or Python (inline execution in native kamailio.cfg or using
> kemi scripts). At Kamailio World 2019, one of the participants I
> discussed with told me they already implemented using Lua.
>
> That's it for a starting point, if anyone wants to discuss more, just
> reply to sr-users and add your comments or ask the questions.
>
> If someone wants to go ahead and work on a C module, announce yourself
> to avoid duplicate work of others, and use sr-dev if you need assistance
> on module development.
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierla -- www.asipto.com
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] How can I put updated sdp body to message in kemi

2019-02-26 Thread Yuriy Gorlichenko
Sorry. Searched in a wrong module. Textops offcourse...
Question closed

On Tue, 26 Feb 2019, 12:10 Yuriy Gorlichenko,  wrote:

> Hi. On the original config to set body with New data I used
> set_body() function, exported from sdpops module.
> But for kamailio 5.1 I can't find something same in case of using kemi
> Is There is some additional way to do this?
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] How can I put updated sdp body to message in kemi

2019-02-26 Thread Yuriy Gorlichenko
Hi. On the original config to set body with New data I used
set_body() function, exported from sdpops module.
But for kamailio 5.1 I can't find something same in case of using kemi
Is There is some additional way to do this?
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio modules that can be used in Lua

2019-02-08 Thread Yuriy Gorlichenko
Possibly you looking into the old Version. Kamailio since 5.0 has kemi.
Since 5.1 it support 99%of modules

On Fri, 8 Feb 2019, 19:37 Leonid Fainshtein, 
wrote:

> Hello,
> I am checking a possibility to replace the traditional cfg script with a
> Lua script.
> In the app_lua module documentation there is a relatively short list of
> modules that can be registered to Lua. The modules nathelper, rtpproxy,
> topoh and many others don't appear in the list. Does it mean that it is not
> possible to use that modules in Lua?
>
> Best regards,
> Leonid Fainshtein
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] rtpengine in stateless kamailio

2019-01-02 Thread Yuriy Gorlichenko
Yep that works
with size of 1 it stores minimal data and not grows more than a cuple of
bytes
Thx a lot

P.S. Anyway this is a tricky (hack) and suppose in the future will be cool
to add function to disable hash at all. I understand that this is not
ususal case but anyway it makes sence to be

ср, 2 янв. 2019 г. в 18:02, Richard Fuchs :

> On 02/01/2019 09.32, Yuriy Gorlichenko wrote:
> > Thx for the reply
> > Yes
> > Internal hash table diffenentelly stores info
> > But even it case of putting timeout to 0 it still grows in synthetic
> > tests. So looks like it will grows alsways because of deletes entries
> > but creates new and so on and so on...
> > So means it decrases "leak" but not fully
> >
> > Is there some hidden function maybe to drop hast table o some ticky to
> > do this? (we are using oru ow algorinthm that garanties to use same
> > node in case of transaction)
>
>
> You should be able to set the timeout to zero and the size of the hash
> table to one (variable `hash_table_size`). That should make the code
> purge out all entries on every operation, keeping the number of entries
> minimal.
>
> Cheers
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] rtpengine in stateless kamailio

2019-01-02 Thread Yuriy Gorlichenko
Hi Daniel! thx for the reply too!
Richard was correct about hash table (I tried a couple of experiments)
So it i not a Leak in bug point of view but behavior that gives growing
hash of rtpengine module

If I looking at the kamcmd rtpengine.get_hash_total with watch every second
- I see it growing
Also if I disabling rtpengine_<> calling -I see shmem is not growing at all

So for now question only how to reset/not use/drop hash table for the
rtpengine modue

ср, 2 янв. 2019 г. в 17:32, Daniel-Constantin Mierla :

> Hello,
>
> to see the source of the leak in shared memory, the best is to generate
> usage summary.
>
> First set memlog lower than debug parameter, you can do in the
> kamailio.cfg or via rpc:
>
> kamcmd cfg.set_now_int core memlog 1
>
> The above sets memlog to 1, so choose a value lower than what you have for
> debug.
>
> The generate the summary via rpc:
>
> kamcmd corex.shm_summary
>
> Look in syslog for printed messages related to use of shared memory.
>
> Cheers,
> Daniel
>
>
> On Wed, Jan 2, 2019 at 2:45 PM Richard Fuchs  wrote:
>
>> On 02/01/2019 07.45, Yuriy Gorlichenko wrote:
>> > Hi!
>> > Happy new year to all!!!
>> >
>> > Look like I am first in this year wit hthe questions in this list :-).
>> >
>> > I'm using stateless kamailio and RTPengnine to build some kind of the
>> > stateless cluster
>> > I found that kamailio keeps some data  in the SHMEM in case of using
>> > RTPengine module even if it is not a rtpengine_manage function but
>> > offer/answer/delete
>> >
>> > In this case if INVITE (offer) handled by 1-st kamailio in my cluster,
>> > and BYE/CANCEL handled by second kamailio in the cluster - 1-st
>> > kamailio (which has been used for offer) will hase kinda internal
>> > "memory leak" (in SHMEM it never decrased)
>> >
>> > At the rtpengine module source I found some transation dependencies
>> > for the rtpengine_manage function but did not find for the
>> > offer/answer/delete
>> > I supposed these 3 functions just sending requests to the rtpnegine
>> > with keys and not storing anything
>> >
>> > So my question - is it possible to use RTPengine module in stateless
>> > way to avoid internal "memory leak" because in my scenario I have big
>> > chance never receive  BYE/CANCEL on the machine that started handle
>> > particular call
>>
>>
>> This is probably the module-internal hash table that is used to make
>> sure that signalling relating to the same call is always sent to the
>> same rtpengine instance. This hash table does have a configurable
>> timeout value (`hash_table_tout`, defaults to 1 hour), which makes it
>> possible to still use it in a way you've described. However, from the
>> code it's my understanding that timed out hash table entries are only
>> deleted when they're encountered during processing, so it's not entirely
>> deterministic that old entries are always deleted after they've timed
>> out. The RPC command `rtpengine.get_hash_total` can be used to inspect
>> the current size of the hash table.
>>
>> Cheers
>>
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
> --
> Daniel-Constantin Mierla - http://www.asipto.com
> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] rtpengine in stateless kamailio

2019-01-02 Thread Yuriy Gorlichenko
Thx for the reply
Yes
Internal hash table diffenentelly stores info
But even it case of putting timeout to 0 it still grows in synthetic tests.
So looks like it will grows alsways because of deletes entries but creates
new and so on and so on...
So means it decrases "leak" but not fully

Is there some hidden function maybe to drop hast table o some ticky to do
this? (we are using oru ow algorinthm that garanties to use same node in
case of transaction)

ср, 2 янв. 2019 г. в 16:45, Richard Fuchs :

> On 02/01/2019 07.45, Yuriy Gorlichenko wrote:
> > Hi!
> > Happy new year to all!!!
> >
> > Look like I am first in this year wit hthe questions in this list :-).
> >
> > I'm using stateless kamailio and RTPengnine to build some kind of the
> > stateless cluster
> > I found that kamailio keeps some data  in the SHMEM in case of using
> > RTPengine module even if it is not a rtpengine_manage function but
> > offer/answer/delete
> >
> > In this case if INVITE (offer) handled by 1-st kamailio in my cluster,
> > and BYE/CANCEL handled by second kamailio in the cluster - 1-st
> > kamailio (which has been used for offer) will hase kinda internal
> > "memory leak" (in SHMEM it never decrased)
> >
> > At the rtpengine module source I found some transation dependencies
> > for the rtpengine_manage function but did not find for the
> > offer/answer/delete
> > I supposed these 3 functions just sending requests to the rtpnegine
> > with keys and not storing anything
> >
> > So my question - is it possible to use RTPengine module in stateless
> > way to avoid internal "memory leak" because in my scenario I have big
> > chance never receive  BYE/CANCEL on the machine that started handle
> > particular call
>
>
> This is probably the module-internal hash table that is used to make
> sure that signalling relating to the same call is always sent to the
> same rtpengine instance. This hash table does have a configurable
> timeout value (`hash_table_tout`, defaults to 1 hour), which makes it
> possible to still use it in a way you've described. However, from the
> code it's my understanding that timed out hash table entries are only
> deleted when they're encountered during processing, so it's not entirely
> deterministic that old entries are always deleted after they've timed
> out. The RPC command `rtpengine.get_hash_total` can be used to inspect
> the current size of the hash table.
>
> Cheers
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] rtpengine in stateless kamailio

2019-01-02 Thread Yuriy Gorlichenko
Hi!
Happy new year to all!!!

Look like I am first in this year wit hthe questions in this list :-).

I'm using stateless kamailio and RTPengnine to build some kind of the
stateless cluster
I found that kamailio keeps some data  in the SHMEM in case of using
RTPengine module even if it is not a rtpengine_manage function but
offer/answer/delete

In this case if INVITE (offer) handled by 1-st kamailio in my cluster, and
BYE/CANCEL handled by second kamailio in the cluster - 1-st kamailio (which
has been used for offer) will hase kinda internal "memory leak" (in SHMEM
it never decrased)

At the rtpengine module source I found some transation dependencies for the
rtpengine_manage function but did not find for the offer/answer/delete
I supposed these 3 functions just sending requests to the rtpnegine with
keys and not storing anything

So my question - is it possible to use RTPengine module in stateless way to
avoid internal "memory leak" because in my scenario I have big chance never
receive  BYE/CANCEL on the machine that started handle particular call
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Forward() not handles Route headers

2018-11-29 Thread Yuriy Gorlichenko
Sorry for disturbing. Found forgotten loose_route functions in my config

On Thu, 29 Nov 2018, 15:45 Yuriy Gorlichenko,  wrote:

> We are building some stateless solution and found that in case of using
> forward() kamailio sends traffic only via URI or $du variable. It never
> removes itself from route headers. Is this is the truth? Or I need to add
> some other module to handle it? (rr already added)
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Forward() not handles Route headers

2018-11-29 Thread Yuriy Gorlichenko
We are building some stateless solution and found that in case of using
forward() kamailio sends traffic only via URI or $du variable. It never
removes itself from route headers. Is this is the truth? Or I need to add
some other module to handle it? (rr already added)
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] issue with rewrite to domain in failure route

2018-09-17 Thread Yuriy Gorlichenko
hmm
Suppose you are correct
Makes sence
Yes I using on ly in the branch for the failure
Thx for tip

пн, 17 сент. 2018 г. в 15:58, Federico Cabiddu :

> Hi,
> I didn't understand from your mail if you are calling uac_replace_to()  in
> a branch route also for the first request or only when you hit the failure
> route.
> Just in case, you need to call it in a branch route for the initial
> request too so to have a "clean" message when you run the failure route,
> otherwise the effect will be the one you observed, kind of garbage in the
> header.
>
> Best regards,
>
> Federico
>
> On Mon, Sep 17, 2018 at 2:32 PM Yuriy Gorlichenko 
> wrote:
>
>> all is default
>> Maybe I need to set up something there?
>> I jsut did not found anything about it at the docs
>>
>> пн, 17 сент. 2018 г. в 14:42, Sergiu Pojoga :
>>
>>> Ok, what are your UAC parameters?
>>>
>>> On Mon, Sep 17, 2018 at 7:34 AM Yuriy Gorlichenko 
>>> wrote:
>>>
>>>> No. Tried from branch route.
>>>>
>>>> пн, 17 сент. 2018 г., 14:25 Sergiu Pojoga :
>>>>
>>>>> From which route are you calling uac_replace_to(), failure_route?
>>>>>
>>>>> "This function can be used from REQUEST_ROUTE and from BRANCH_ROUTE"
>>>>>
>>>>> On Mon, Sep 17, 2018 at 6:05 AM Yuriy Gorlichenko 
>>>>> wrote:
>>>>>
>>>>>> I tried uac_replace_to()
>>>>>> But no luck
>>>>>>
>>>>>> пн, 17 сент. 2018 г. в 12:28, Alex Balashov <
>>>>>> abalas...@evaristesys.com>:
>>>>>>
>>>>>>> That is not a safe way to change the To header, since proxies aren't
>>>>>>> supposed to modify the To or From headers.
>>>>>>>
>>>>>>> The proper approach conceals the fact that modifications have taken
>>>>>>> place from the caller:
>>>>>>>
>>>>>>>
>>>>>>> https://kamailio.org/docs/modules/5.1.x/modules/uac.html#uac.f.uac_replace_to
>>>>>>>
>>>>>>> --
>>>>>>> Sent from mobile. Apologies for brevity and errors.
>>>>>>>
>>>>>>> -Original Message-
>>>>>>> From: Mojtaba 
>>>>>>> To: "Kamailio (SER) - Users Mailing List" <
>>>>>>> sr-users@lists.kamailio.org>
>>>>>>> Sent: Mon, 17 Sep 2018 5:23 AM
>>>>>>> Subject: Re: [SR-Users] issue with rewrite to domain in failure route
>>>>>>>
>>>>>>> The $td is read-only variable, and yoou could not change it's value.
>>>>>>> If you want to change domain in To header, You should use testops
>>>>>>> module in kamialio and replace domain in To header. for example:
>>>>>>>
>>>>>>> subst('/^To:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/t:\1$avp(sip_address)\2/ig')
>>>>>>> With Regards.Mojtaba
>>>>>>>
>>>>>>> On Mon, Sep 17, 2018 at 1:19 PM Yuriy Gorlichenko <
>>>>>>> ovoshl...@gmail.com> wrote:
>>>>>>> >
>>>>>>> > Hi
>>>>>>> > I'm building some system with failover trunk
>>>>>>> > but my providers requires to set their doamin in domain part of To
>>>>>>> Header
>>>>>>> >
>>>>>>> > so when I rewrite it at the my failure_route
>>>>>>> >
>>>>>>> > $td = FAILOVER_PROVIDER
>>>>>>> > my To filed looks like
>>>>>>> > To: 
>>>>>>> > what i tried:
>>>>>>> > Move this change to BRANCH_ROUTE:
>>>>>>> > here tried as
>>>>>>> > $td =  as
>>>>>>> > uac_replace_to('',"newToFieldValue)
>>>>>>> >
>>>>>>> > Move to the my custom route with both variants
>>>>>>> > But result is the same
>>>>>>> > kamailio 5.1
>>>>>>> >
>>>>>>> > version: kamailio 5.1.5 (x86_64/linux) d06080
>>>>>>> > flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS,
>>>>>>> USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMA

Re: [SR-Users] issue with rewrite to domain in failure route

2018-09-17 Thread Yuriy Gorlichenko
all is default
Maybe I need to set up something there?
I jsut did not found anything about it at the docs

пн, 17 сент. 2018 г. в 14:42, Sergiu Pojoga :

> Ok, what are your UAC parameters?
>
> On Mon, Sep 17, 2018 at 7:34 AM Yuriy Gorlichenko 
> wrote:
>
>> No. Tried from branch route.
>>
>> пн, 17 сент. 2018 г., 14:25 Sergiu Pojoga :
>>
>>> From which route are you calling uac_replace_to(), failure_route?
>>>
>>> "This function can be used from REQUEST_ROUTE and from BRANCH_ROUTE"
>>>
>>> On Mon, Sep 17, 2018 at 6:05 AM Yuriy Gorlichenko 
>>> wrote:
>>>
>>>> I tried uac_replace_to()
>>>> But no luck
>>>>
>>>> пн, 17 сент. 2018 г. в 12:28, Alex Balashov >>> >:
>>>>
>>>>> That is not a safe way to change the To header, since proxies aren't
>>>>> supposed to modify the To or From headers.
>>>>>
>>>>> The proper approach conceals the fact that modifications have taken
>>>>> place from the caller:
>>>>>
>>>>>
>>>>> https://kamailio.org/docs/modules/5.1.x/modules/uac.html#uac.f.uac_replace_to
>>>>>
>>>>> --
>>>>> Sent from mobile. Apologies for brevity and errors.
>>>>>
>>>>> -Original Message-
>>>>> From: Mojtaba 
>>>>> To: "Kamailio (SER) - Users Mailing List" >>>> >
>>>>> Sent: Mon, 17 Sep 2018 5:23 AM
>>>>> Subject: Re: [SR-Users] issue with rewrite to domain in failure route
>>>>>
>>>>> The $td is read-only variable, and yoou could not change it's value.
>>>>> If you want to change domain in To header, You should use testops
>>>>> module in kamialio and replace domain in To header. for example:
>>>>>
>>>>> subst('/^To:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/t:\1$avp(sip_address)\2/ig')
>>>>> With Regards.Mojtaba
>>>>>
>>>>> On Mon, Sep 17, 2018 at 1:19 PM Yuriy Gorlichenko 
>>>>> wrote:
>>>>> >
>>>>> > Hi
>>>>> > I'm building some system with failover trunk
>>>>> > but my providers requires to set their doamin in domain part of To
>>>>> Header
>>>>> >
>>>>> > so when I rewrite it at the my failure_route
>>>>> >
>>>>> > $td = FAILOVER_PROVIDER
>>>>> > my To filed looks like
>>>>> > To: 
>>>>> > what i tried:
>>>>> > Move this change to BRANCH_ROUTE:
>>>>> > here tried as
>>>>> > $td =  as
>>>>> > uac_replace_to('',"newToFieldValue)
>>>>> >
>>>>> > Move to the my custom route with both variants
>>>>> > But result is the same
>>>>> > kamailio 5.1
>>>>> >
>>>>> > version: kamailio 5.1.5 (x86_64/linux) d06080
>>>>> > flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS,
>>>>> USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP,
>>>>> PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
>>>>> FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
>>>>> USE_DST_BLACKLIST, HAVE_RESOLV_RES
>>>>> > ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE
>>>>> 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
>>>>> > poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
>>>>> > id: d06080
>>>>> > compiled on 00:43:08 Aug 23 2018 with gcc 6.3.0
>>>>> > ___
>>>>> > Kamailio (SER) - Users Mailing List
>>>>> > sr-users@lists.kamailio.org
>>>>> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> --Mojtaba Esfandiari.S
>>>>>
>>>>> ___
>>>>> Kamailio (SER) - Users Mailing List
>>>>> sr-users@lists.kamailio.org
>>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>>
>>>>> ___
>>>>> Kamailio (SER) - Users Mailing List
>>>>> sr-users@lists.kamailio.org
>>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>>
>>>> ___
>>>> Kamailio (SER) - Users Mailing List
>>>> sr-users@lists.kamailio.org
>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] issue with rewrite to domain in failure route

2018-09-17 Thread Yuriy Gorlichenko
No. Tried from branch route.

пн, 17 сент. 2018 г., 14:25 Sergiu Pojoga :

> From which route are you calling uac_replace_to(), failure_route?
>
> "This function can be used from REQUEST_ROUTE and from BRANCH_ROUTE"
>
> On Mon, Sep 17, 2018 at 6:05 AM Yuriy Gorlichenko 
> wrote:
>
>> I tried uac_replace_to()
>> But no luck
>>
>> пн, 17 сент. 2018 г. в 12:28, Alex Balashov :
>>
>>> That is not a safe way to change the To header, since proxies aren't
>>> supposed to modify the To or From headers.
>>>
>>> The proper approach conceals the fact that modifications have taken
>>> place from the caller:
>>>
>>>
>>> https://kamailio.org/docs/modules/5.1.x/modules/uac.html#uac.f.uac_replace_to
>>>
>>> --
>>> Sent from mobile. Apologies for brevity and errors.
>>>
>>> -Original Message-
>>> From: Mojtaba 
>>> To: "Kamailio (SER) - Users Mailing List" 
>>> Sent: Mon, 17 Sep 2018 5:23 AM
>>> Subject: Re: [SR-Users] issue with rewrite to domain in failure route
>>>
>>> The $td is read-only variable, and yoou could not change it's value.
>>> If you want to change domain in To header, You should use testops
>>> module in kamialio and replace domain in To header. for example:
>>> subst('/^To:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/t:\1$avp(sip_address)\2/ig')
>>> With Regards.Mojtaba
>>>
>>> On Mon, Sep 17, 2018 at 1:19 PM Yuriy Gorlichenko 
>>> wrote:
>>> >
>>> > Hi
>>> > I'm building some system with failover trunk
>>> > but my providers requires to set their doamin in domain part of To
>>> Header
>>> >
>>> > so when I rewrite it at the my failure_route
>>> >
>>> > $td = FAILOVER_PROVIDER
>>> > my To filed looks like
>>> > To: 
>>> > what i tried:
>>> > Move this change to BRANCH_ROUTE:
>>> > here tried as
>>> > $td =  as
>>> > uac_replace_to('',"newToFieldValue)
>>> >
>>> > Move to the my custom route with both variants
>>> > But result is the same
>>> > kamailio 5.1
>>> >
>>> > version: kamailio 5.1.5 (x86_64/linux) d06080
>>> > flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS,
>>> USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP,
>>> PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
>>> FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
>>> USE_DST_BLACKLIST, HAVE_RESOLV_RES
>>> > ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE
>>> 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
>>> > poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
>>> > id: d06080
>>> > compiled on 00:43:08 Aug 23 2018 with gcc 6.3.0
>>> > ___
>>> > Kamailio (SER) - Users Mailing List
>>> > sr-users@lists.kamailio.org
>>> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>>
>>> --
>>> --Mojtaba Esfandiari.S
>>>
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] issue with rewrite to domain in failure route

2018-09-17 Thread Yuriy Gorlichenko
I tried uac_replace_to()
But no luck

пн, 17 сент. 2018 г. в 12:28, Alex Balashov :

> That is not a safe way to change the To header, since proxies aren't
> supposed to modify the To or From headers.
>
> The proper approach conceals the fact that modifications have taken place
> from the caller:
>
>
> https://kamailio.org/docs/modules/5.1.x/modules/uac.html#uac.f.uac_replace_to
>
> --
> Sent from mobile. Apologies for brevity and errors.
>
> -Original Message-
> From: Mojtaba 
> To: "Kamailio (SER) - Users Mailing List" 
> Sent: Mon, 17 Sep 2018 5:23 AM
> Subject: Re: [SR-Users] issue with rewrite to domain in failure route
>
> The $td is read-only variable, and yoou could not change it's value.
> If you want to change domain in To header, You should use testops
> module in kamialio and replace domain in To header. for example:
> subst('/^To:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/t:\1$avp(sip_address)\2/ig')
> With Regards.Mojtaba
>
> On Mon, Sep 17, 2018 at 1:19 PM Yuriy Gorlichenko 
> wrote:
> >
> > Hi
> > I'm building some system with failover trunk
> > but my providers requires to set their doamin in domain part of To Header
> >
> > so when I rewrite it at the my failure_route
> >
> > $td = FAILOVER_PROVIDER
> > my To filed looks like
> > To: 
> > what i tried:
> > Move this change to BRANCH_ROUTE:
> > here tried as
> > $td =  as
> > uac_replace_to('',"newToFieldValue)
> >
> > Move to the my custom route with both variants
> > But result is the same
> > kamailio 5.1
> >
> > version: kamailio 5.1.5 (x86_64/linux) d06080
> > flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
> DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
> Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
> FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
> USE_DST_BLACKLIST, HAVE_RESOLV_RES
> > ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024,
> BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
> > poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
> > id: d06080
> > compiled on 00:43:08 Aug 23 2018 with gcc 6.3.0
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
> --
> --Mojtaba Esfandiari.S
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] issue with rewrite to domain in failure route

2018-09-17 Thread Yuriy Gorlichenko
But I rewrites succesfully with request_route Flow.
Im rewriting it with out any issues

пн, 17 сент. 2018 г., 12:23 Mojtaba :

> The $td is read-only variable, and yoou could not change it's value.
> If you want to change domain in To header, You should use testops
> module in kamialio and replace domain in To header. for example:
> subst('/^To:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/t:\1$avp(sip_address)\2/ig')
> With Regards.Mojtaba
>
> On Mon, Sep 17, 2018 at 1:19 PM Yuriy Gorlichenko 
> wrote:
> >
> > Hi
> > I'm building some system with failover trunk
> > but my providers requires to set their doamin in domain part of To Header
> >
> > so when I rewrite it at the my failure_route
> >
> > $td = FAILOVER_PROVIDER
> > my To filed looks like
> > To: 
> > what i tried:
> > Move this change to BRANCH_ROUTE:
> > here tried as
> > $td =  as
> > uac_replace_to('',"newToFieldValue)
> >
> > Move to the my custom route with both variants
> > But result is the same
> > kamailio 5.1
> >
> > version: kamailio 5.1.5 (x86_64/linux) d06080
> > flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
> DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
> Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
> FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
> USE_DST_BLACKLIST, HAVE_RESOLV_RES
> > ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024,
> BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
> > poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
> > id: d06080
> > compiled on 00:43:08 Aug 23 2018 with gcc 6.3.0
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
> --
> --Mojtaba Esfandiari.S
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] issue with rewrite to domain in failure route

2018-09-17 Thread Yuriy Gorlichenko
Hi
I'm building some system with failover trunk
but my providers requires to set their doamin in domain part of To Header

so when I rewrite it at the my failure_route

$td = FAILOVER_PROVIDER
my To filed looks like
To: 
what i tried:
Move this change to BRANCH_ROUTE:
here tried as
$td =  as
uac_replace_to('',"newToFieldValue)

Move to the my custom route with both variants
But result is the same
kamailio 5.1

version: kamailio 5.1.5 (x86_64/linux) d06080
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024,
BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: d06080
compiled on 00:43:08 Aug 23 2018 with gcc 6.3.0
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Remove branch from branch list

2018-09-11 Thread Yuriy Gorlichenko
Oh... Missed. Thx!

вт, 11 сент. 2018 г., 16:22 Daniel-Constantin Mierla :

> Hello,
>
> from:
>
>
> https://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#branch_name_-_branch_attributes
> "Assigning $null to uri attribute will drop the branch, ..."
>
> Cheers,
> Daniel
>
> On 11.09.18 15:16, Yuriy Gorlichenko wrote:
>
> Hi I'm trying to manipulate with branches at the $branch variable. 8
> actually need to remove unneeded branch if not passed some checks.
> For now I Just rewriting uri and dst_uri with some face address but it
> looks little bit dirty way.
> Is here any an other more clear way to do this?
>
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Kamailio World Conference -- www.kamailioworld.com
> Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- www.asipto.com
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Remove branch from branch list

2018-09-11 Thread Yuriy Gorlichenko
Hi I'm trying to manipulate with branches at the $branch variable. 8
actually need to remove unneeded branch if not passed some checks.
For now I Just rewriting uri and dst_uri with some face address but it
looks little bit dirty way.
Is here any an other more clear way to do this?
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] ACK Cseq incrases after 404 on uac_auth()

2018-07-17 Thread Yuriy Gorlichenko
Yep that works thx!

2018-07-17 9:14 GMT+03:00 Daniel-Constantin Mierla :

> Hello,
>
> one more thing, do:
>
> $dlg_var(cseq_diff) = $null;
>
> when you reset the internal flag for uac auth.
>
> Cheers,
> Daniel
>
> On 16.07.18 21:13, Yuriy Gorlichenko wrote:
>
> Hi
> thx for answer
> But still the same
> I tried to use thids flag in case if answer not 401 or 407 in failure
> route but ACK still incrased by kamailio.
> route[HANDLE_FAILURE] {
>
> if (t_check_status("401|407")) {
>
> uac_auth();
> t_on_failure("HANDLE_FAILURE");
> t_relay();
> exit;
>
> }
> else {
>
> if (t_check_status("40[02-689]|4[1-9][0-9]|5[0-9][0-9]") ||
> (t_branch_timeout() && !t_branch_replied())) {
>
> msg_iflag_reset("UAC_AUTH");
> 
> t_relay();
> exit;
> }
> }
>
>
> 2018-07-16 14:42 GMT+03:00 Daniel-Constantin Mierla :
>
>> Hello,
>>
>> when you re-route to a new destination, can you try resetting the
>> internal flag with:
>>
>> msg_iflag_reset("UAC_AUTH");
>>
>> Cheers,
>> Daniel
>>
>> On 16.07.18 10:31, Yuriy Gorlichenko wrote:
>>
>> Hi. I found some additional scenario when kamailio works incorrect with
>> ACK Cseq after succesfull auth with uac_auth but unsuccesfull call:
>>
>> 1.Caller via kamailio as proxy (Cseq 1)
>> 2.Kamailio resends call to provider with Auth method (Cseq 1)
>> 3. Provider answers 401/407 (Cseq 1)
>> 4. Kamailio inrases Cseq and sends invite with credentians (dialog
>> track_cseq_updates = 1, uac_auth()) (Cseq 2)
>> 5. Provider says - 404. not found (Cseq 2)
>> 6. Kamailio resends INVITE to another server (lets say VM). It contans
>> not tracked yet Cseq (Cseq 1)
>> 7. VM server says 200 (Cseq 1)
>> 8. Kamailio resends 200 to the caller (Сseq 1)
>> 9. Caller says ACK (Cseq 1)
>> 10. Kamailio incrases CSeq of ACK and resends t VM server (Сseq 2)
>>
>> So in this case kamialio tries to track Sceq because thining that this
>> ACK belongs to the dialog that was made to the auth server
>>
>> So as I see here is a misunderstanding on the dialog module
>> Any suggestions how to avoid it or exclude resent INVITE from the dialog
>> module tracking?
>>
>>
>>
>> ___
>> Kamailio (SER) - Users Mailing 
>> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>> --
>> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
>> www.linkedin.com/in/miconda
>> Kamailio World Conference -- www.kamailioworld.com
>>
>>
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Kamailio World Conference -- www.kamailioworld.com
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] ACK Cseq incrases after 404 on uac_auth()

2018-07-16 Thread Yuriy Gorlichenko
Hi
thx for answer
But still the same
I tried to use thids flag in case if answer not 401 or 407 in failure route
but ACK still incrased by kamailio.
route[HANDLE_FAILURE] {

if (t_check_status("401|407")) {

uac_auth();
t_on_failure("HANDLE_FAILURE");
t_relay();
exit;

}
else {

if (t_check_status("40[02-689]|4[1-9][0-9]|5[0-9][0-9]") ||
(t_branch_timeout() && !t_branch_replied())) {

msg_iflag_reset("UAC_AUTH");

t_relay();
exit;
}
}


2018-07-16 14:42 GMT+03:00 Daniel-Constantin Mierla :

> Hello,
>
> when you re-route to a new destination, can you try resetting the internal
> flag with:
>
> msg_iflag_reset("UAC_AUTH");
>
> Cheers,
> Daniel
>
> On 16.07.18 10:31, Yuriy Gorlichenko wrote:
>
> Hi. I found some additional scenario when kamailio works incorrect with
> ACK Cseq after succesfull auth with uac_auth but unsuccesfull call:
>
> 1.Caller via kamailio as proxy (Cseq 1)
> 2.Kamailio resends call to provider with Auth method (Cseq 1)
> 3. Provider answers 401/407 (Cseq 1)
> 4. Kamailio inrases Cseq and sends invite with credentians (dialog
> track_cseq_updates = 1, uac_auth()) (Cseq 2)
> 5. Provider says - 404. not found (Cseq 2)
> 6. Kamailio resends INVITE to another server (lets say VM). It contans not
> tracked yet Cseq (Cseq 1)
> 7. VM server says 200 (Cseq 1)
> 8. Kamailio resends 200 to the caller (Сseq 1)
> 9. Caller says ACK (Cseq 1)
> 10. Kamailio incrases CSeq of ACK and resends t VM server (Сseq 2)
>
> So in this case kamialio tries to track Sceq because thining that this ACK
> belongs to the dialog that was made to the auth server
>
> So as I see here is a misunderstanding on the dialog module
> Any suggestions how to avoid it or exclude resent INVITE from the dialog
> module tracking?
>
>
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Kamailio World Conference -- www.kamailioworld.com
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] ACK Cseq incrases after 404 on uac_auth()

2018-07-16 Thread Yuriy Gorlichenko
Hi. I found some additional scenario when kamailio works incorrect with ACK
Cseq after succesfull auth with uac_auth but unsuccesfull call:

1.Caller via kamailio as proxy (Cseq 1)
2.Kamailio resends call to provider with Auth method (Cseq 1)
3. Provider answers 401/407 (Cseq 1)
4. Kamailio inrases Cseq and sends invite with credentians (dialog
track_cseq_updates = 1, uac_auth()) (Cseq 2)
5. Provider says - 404. not found (Cseq 2)
6. Kamailio resends INVITE to another server (lets say VM). It contans not
tracked yet Cseq (Cseq 1)
7. VM server says 200 (Cseq 1)
8. Kamailio resends 200 to the caller (Сseq 1)
9. Caller says ACK (Cseq 1)
10. Kamailio incrases CSeq of ACK and resends t VM server (Сseq 2)

So in this case kamialio tries to track Sceq because thining that this ACK
belongs to the dialog that was made to the auth server

So as I see here is a misunderstanding on the dialog module
Any suggestions how to avoid it or exclude resent INVITE from the dialog
module tracking?
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Should I ignore Route header in ACK?

2018-07-02 Thread Yuriy Gorlichenko
Thx Alex
Finally I clarified question for myself
UAC not ignores Route in case of direct connection to provider
It sends to needed ip:port on the transport:network layers

So provider wrong in case that avaits ACK at the different port than Route.

THx all .For now all clear.


2018-07-02 11:24 GMT+03:00 Yuriy Gorlichenko :

> Jut in update
> In kamailio case all goes well
> Kamailio sets to UAC Record-Route in the 200 reply and then UAC sends ACK
> via Route sent...
>
> I totally confised...
> In both examples from my provider 200 contains Route set but in case of
> kamailio UAC uses route and in case of provider it uses Contact...
>
> both Route heanders contains "lr"
>
> Provider based Route header jsut contains only *sip:ip:port;lr *when my
> testing kamaili regitrar contains
> *sip:ip:port;lr,ftag=fromtaghere*
>
>
>
> 2018-07-02 10:45 GMT+03:00 Yuriy Gorlichenko :
>
>> Anyway thank you so much for your responses
>> I really appreciate your time and your help here
>>
>> 2018-07-02 10:42 GMT+03:00 Yuriy Gorlichenko :
>>
>>> Yep this clear for me from the start.
>>>
>>> For me for now not clear question  abot direct connect for now.
>>>
>>> 2018-07-02 10:00 GMT+03:00 Alex Balashov :
>>>
>>>> On Mon, Jul 02, 2018 at 09:59:12AM +0300, Yuriy Gorlichenko wrote:
>>>>
>>>> > That was my point also...
>>>> > But they sent me lint to rfc3261 12.1.2 and that confused me
>>>> >
>>>> > So just for resume:
>>>> >
>>>> > So am I right if I say that in case If provider receives INVITE with
>>>> > Record-Route from my side (myProxy)
>>>> > Provider should care about it's own Record-Route and it should have
>>>> uri
>>>> > where myProxy should sent ACK to instead of using Contact in thi case
>>>> >
>>>> > In case direct conntect UAC -> Provider I still need to use Contact
>>>> field
>>>> > as URI to send ACK to that explained on the 12.1.2 of rfc3261?
>>>>
>>>> If the provider sent you a Record-Route of their own in addition to any
>>>> that you have placed there, your UAC must still follow it when
>>>> contacting them for in-dialog requests.
>>>>
>>>> --
>>>> Alex Balashov | Principal | Evariste Systems LLC
>>>>
>>>> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
>>>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>>>>
>>>> ___
>>>> Kamailio (SER) - Users Mailing List
>>>> sr-users@lists.kamailio.org
>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>>
>>>
>>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Should I ignore Route header in ACK?

2018-07-02 Thread Yuriy Gorlichenko
Jut in update
In kamailio case all goes well
Kamailio sets to UAC Record-Route in the 200 reply and then UAC sends ACK
via Route sent...

I totally confised...
In both examples from my provider 200 contains Route set but in case of
kamailio UAC uses route and in case of provider it uses Contact...

both Route heanders contains "lr"

Provider based Route header jsut contains only *sip:ip:port;lr *when my
testing kamaili regitrar contains
*sip:ip:port;lr,ftag=fromtaghere*



2018-07-02 10:45 GMT+03:00 Yuriy Gorlichenko :

> Anyway thank you so much for your responses
> I really appreciate your time and your help here
>
> 2018-07-02 10:42 GMT+03:00 Yuriy Gorlichenko :
>
>> Yep this clear for me from the start.
>>
>> For me for now not clear question  abot direct connect for now.
>>
>> 2018-07-02 10:00 GMT+03:00 Alex Balashov :
>>
>>> On Mon, Jul 02, 2018 at 09:59:12AM +0300, Yuriy Gorlichenko wrote:
>>>
>>> > That was my point also...
>>> > But they sent me lint to rfc3261 12.1.2 and that confused me
>>> >
>>> > So just for resume:
>>> >
>>> > So am I right if I say that in case If provider receives INVITE with
>>> > Record-Route from my side (myProxy)
>>> > Provider should care about it's own Record-Route and it should have uri
>>> > where myProxy should sent ACK to instead of using Contact in thi case
>>> >
>>> > In case direct conntect UAC -> Provider I still need to use Contact
>>> field
>>> > as URI to send ACK to that explained on the 12.1.2 of rfc3261?
>>>
>>> If the provider sent you a Record-Route of their own in addition to any
>>> that you have placed there, your UAC must still follow it when
>>> contacting them for in-dialog requests.
>>>
>>> --
>>> Alex Balashov | Principal | Evariste Systems LLC
>>>
>>> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
>>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>>>
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>
>>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Should I ignore Route header in ACK?

2018-07-02 Thread Yuriy Gorlichenko
Anyway thank you so much for your responses
I really appreciate your time and your help here

2018-07-02 10:42 GMT+03:00 Yuriy Gorlichenko :

> Yep this clear for me from the start.
>
> For me for now not clear question  abot direct connect for now.
>
> 2018-07-02 10:00 GMT+03:00 Alex Balashov :
>
>> On Mon, Jul 02, 2018 at 09:59:12AM +0300, Yuriy Gorlichenko wrote:
>>
>> > That was my point also...
>> > But they sent me lint to rfc3261 12.1.2 and that confused me
>> >
>> > So just for resume:
>> >
>> > So am I right if I say that in case If provider receives INVITE with
>> > Record-Route from my side (myProxy)
>> > Provider should care about it's own Record-Route and it should have uri
>> > where myProxy should sent ACK to instead of using Contact in thi case
>> >
>> > In case direct conntect UAC -> Provider I still need to use Contact
>> field
>> > as URI to send ACK to that explained on the 12.1.2 of rfc3261?
>>
>> If the provider sent you a Record-Route of their own in addition to any
>> that you have placed there, your UAC must still follow it when
>> contacting them for in-dialog requests.
>>
>> --
>> Alex Balashov | Principal | Evariste Systems LLC
>>
>> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Should I ignore Route header in ACK?

2018-07-02 Thread Yuriy Gorlichenko
Yep this clear for me from the start.

For me for now not clear question  abot direct connect for now.

2018-07-02 10:00 GMT+03:00 Alex Balashov :

> On Mon, Jul 02, 2018 at 09:59:12AM +0300, Yuriy Gorlichenko wrote:
>
> > That was my point also...
> > But they sent me lint to rfc3261 12.1.2 and that confused me
> >
> > So just for resume:
> >
> > So am I right if I say that in case If provider receives INVITE with
> > Record-Route from my side (myProxy)
> > Provider should care about it's own Record-Route and it should have uri
> > where myProxy should sent ACK to instead of using Contact in thi case
> >
> > In case direct conntect UAC -> Provider I still need to use Contact field
> > as URI to send ACK to that explained on the 12.1.2 of rfc3261?
>
> If the provider sent you a Record-Route of their own in addition to any
> that you have placed there, your UAC must still follow it when
> contacting them for in-dialog requests.
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Should I ignore Route header in ACK?

2018-07-02 Thread Yuriy Gorlichenko
That was my point also...
But they sent me lint to rfc3261 12.1.2 and that confused me

So just for resume:

So am I right if I say that in case If provider receives INVITE with
Record-Route from my side (myProxy)
Provider should care about it's own Record-Route and it should have uri
where myProxy should sent ACK to instead of using Contact in thi case

In case direct conntect UAC -> Provider I still need to use Contact field
as URI to send ACK to that explained on the 12.1.2 of rfc3261?



2018-07-02 9:46 GMT+03:00 Alex Balashov :

> On Mon, Jul 02, 2018 at 09:31:02AM +0300, Yuriy Gorlichenko wrote:
>
> > But here provider says me - you should use Contact field to reach target
> > even from myProxy.
>
> Not if they added another Record-Route hop of theirs.
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Should I ignore Route header in ACK?

2018-07-02 Thread Yuriy Gorlichenko
* which contains last interface i sent INVITE to  - means that uri in the
Route hasinterface and it just same with interface I sent invite to. I
understand hat it is not a dependency.
* (Ignoring Route header that actually also exists in the Contact field) -
means aslo existsi in the resquest. Not in the contact field offcource

2018-07-02 9:31 GMT+03:00 Yuriy Gorlichenko :

> Sorry for noize from my side
> I just cant fully understand dependency:
>
> I understand that actually route header shoud not be ingnored because it
> is shows way for the in-dialog packet
> That is fine.
>
> Just regarding behaivor of the FreeSwitch and other UACs
>
> For now I have a next picture
>
> When my provider sends me 200 - it contains as Record-Route: 1.1.1.1:5060
> which contains last interface i sent INVITE to
> Also it contains Contact: 1.1.1.1:5061
>
> So when UAC receives this call without my proxy between provider and UAC
> it sends ACK to Contact URI (Ignoring Route header that actually also
> exists in the Contact field) sent at the 200 according rfc3261 -12.1.2
> (that I shared above)
>
> But when it sends via my proxy:
>
> UAC receives ACK with 2 Route headers (that is right) and sends it to the
> topmost Route (myProxy) then my proxy as normal proxy resends it to the
> provider using second Route (that topmost for now after myProxy removes
> itself from Route set)
>
> But here provider says me - you should use Contact field to reach target
> even from myProxy.
>
> So in this case - At the behaivor of UAC -> Provider  it looks matched
> 12.1.2 but I still cant understand why in this case it ignores Route header
> at the ACK that actually exists
>
>
>
> 2018-07-02 9:02 GMT+03:00 Alex Balashov :
>
>> On Mon, Jul 02, 2018 at 09:00:02AM +0300, Yuriy Gorlichenko wrote:
>>
>> > yep I understand that.
>> > I just see that in fact ACK soudl ignore Route header if it... Single?
>>
>> What? No.
>>
>> There are two kinds of ACKs: hop-by-hop ACKs, which acknowledge negative
>> final replies on every branch, and end-to-end ACKs, which are handled
>> according to the rules for in-dialog requests. An ACK for a 2xx reply to
>> an INVITE is going to be an in-dialog request, and under no
>> circumstances should any Route headers be ignored unless they refer to
>> the very proxy through which they are traversing. In that case, they
>> should be stripped off before continuing with the next-hop Route. This
>> is the standard loose-routing procedure labouriously articulated in the
>> RFC, and implemented by loose_route().
>>
>> --
>> Alex Balashov | Principal | Evariste Systems LLC
>>
>> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Should I ignore Route header in ACK?

2018-07-02 Thread Yuriy Gorlichenko
Sorry for noize from my side
I just cant fully understand dependency:

I understand that actually route header shoud not be ingnored because it is
shows way for the in-dialog packet
That is fine.

Just regarding behaivor of the FreeSwitch and other UACs

For now I have a next picture

When my provider sends me 200 - it contains as Record-Route: 1.1.1.1:5060
which contains last interface i sent INVITE to
Also it contains Contact: 1.1.1.1:5061

So when UAC receives this call without my proxy between provider and UAC it
sends ACK to Contact URI (Ignoring Route header that actually also exists
in the Contact field) sent at the 200 according rfc3261 -12.1.2 (that I
shared above)

But when it sends via my proxy:

UAC receives ACK with 2 Route headers (that is right) and sends it to the
topmost Route (myProxy) then my proxy as normal proxy resends it to the
provider using second Route (that topmost for now after myProxy removes
itself from Route set)

But here provider says me - you should use Contact field to reach target
even from myProxy.

So in this case - At the behaivor of UAC -> Provider  it looks matched
12.1.2 but I still cant understand why in this case it ignores Route header
at the ACK that actually exists



2018-07-02 9:02 GMT+03:00 Alex Balashov :

> On Mon, Jul 02, 2018 at 09:00:02AM +0300, Yuriy Gorlichenko wrote:
>
> > yep I understand that.
> > I just see that in fact ACK soudl ignore Route header if it... Single?
>
> What? No.
>
> There are two kinds of ACKs: hop-by-hop ACKs, which acknowledge negative
> final replies on every branch, and end-to-end ACKs, which are handled
> according to the rules for in-dialog requests. An ACK for a 2xx reply to
> an INVITE is going to be an in-dialog request, and under no
> circumstances should any Route headers be ignored unless they refer to
> the very proxy through which they are traversing. In that case, they
> should be stripped off before continuing with the next-hop Route. This
> is the standard loose-routing procedure labouriously articulated in the
> RFC, and implemented by loose_route().
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Should I ignore Route header in ACK?

2018-07-02 Thread Yuriy Gorlichenko
yep I understand that.
I just see that in fact ACK soudl ignore Route header if it... Single?


2018-07-02 1:45 GMT+03:00 Alex Balashov :

> The "remote target" in this case refers to the request URI,
> cosmetically.
>
> On Mon, Jul 02, 2018 at 12:10:26AM +0300, Yuriy Gorlichenko wrote:
>
> > Actually no one...
> > I just confused
> >
> > So looks like here is an exception from rules for the Route header
> handling
> > in case of UAC behaivor...
> > It was posted only for to be sure that I have right interpretation of
> this
> > particular case:
> >
> > Because of me these 2 descriptions are very opposite
> >
> > This route
> > >set, even if empty, overrides any pre-existing route set for future
> > >requests in this dialog.  The remote target MUST be set to the URI
> > >from the Contact header field of the response.
> >
> >
> > 2018-07-02 0:05 GMT+03:00 Alex Balashov :
> >
> > > On Mon, Jul 02, 2018 at 12:03:24AM +0300, Yuriy Gorlichenko wrote:
> > >
> > > > Just in continue of the discussion
> > > > forund in the RFC3261 12.1.2  (UAC behaivor) this:
> > > >
> > > >The route set MUST be set to the list of URIs in the Record-Route
> > > >header field from the response, taken in reverse order and
> preserving
> > > >all URI parameters.  If no Record-Route header field is present in
> > > >the response, the route set MUST be set to the empty set.  This
> route
> > > >set, even if empty, overrides any pre-existing route set for
> future
> > > >requests in this dialog.  The remote target MUST be set to the URI
> > > >from the Contact header field of the response.
> > >
> > > Indeed. What is your intended thesis?
> > >
> > > --
> > > Alex Balashov | Principal | Evariste Systems LLC
> > >
> > > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> > > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> > >
> > > ___
> > > Kamailio (SER) - Users Mailing List
> > > sr-users@lists.kamailio.org
> > > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> > >
>
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Should I ignore Route header in ACK?

2018-07-01 Thread Yuriy Gorlichenko
Actually no one...
I just confused

So looks like here is an exception from rules for the Route header handling
in case of UAC behaivor...
It was posted only for to be sure that I have right interpretation of this
particular case:

Because of me these 2 descriptions are very opposite

This route
>set, even if empty, overrides any pre-existing route set for future
>requests in this dialog.  The remote target MUST be set to the URI
>from the Contact header field of the response.


2018-07-02 0:05 GMT+03:00 Alex Balashov :

> On Mon, Jul 02, 2018 at 12:03:24AM +0300, Yuriy Gorlichenko wrote:
>
> > Just in continue of the discussion
> > forund in the RFC3261 12.1.2  (UAC behaivor) this:
> >
> >The route set MUST be set to the list of URIs in the Record-Route
> >header field from the response, taken in reverse order and preserving
> >all URI parameters.  If no Record-Route header field is present in
> >the response, the route set MUST be set to the empty set.  This route
> >set, even if empty, overrides any pre-existing route set for future
> >requests in this dialog.  The remote target MUST be set to the URI
> >from the Contact header field of the response.
>
> Indeed. What is your intended thesis?
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Should I ignore Route header in ACK?

2018-07-01 Thread Yuriy Gorlichenko
Just in continue of the discussion
forund in the RFC3261 12.1.2  (UAC behaivor) this:

   The route set MUST be set to the list of URIs in the Record-Route
   header field from the response, taken in reverse order and preserving
   all URI parameters.  If no Record-Route header field is present in
   the response, the route set MUST be set to the empty set.  This route
   set, even if empty, overrides any pre-existing route set for future
   requests in this dialog.  The remote target MUST be set to the URI
   from the Contact header field of the response.



2018-07-01 11:48 GMT+03:00 Yuriy Gorlichenko :

> Hm... Nice guess
> I will try to check it
> Thank you so much for clarify these things Alex!
>
> 2018-07-01 11:35 GMT+03:00 Alex Balashov :
>
>> On Sun, Jul 01, 2018 at 11:27:36AM +0300, Yuriy Gorlichenko wrote:
>>
>> > So FS in this case ignores single route header and sends request to the
>> > Provider Contact
>>
>> If so, that's wrong.
>>
>> I suppose it's possible that it matches the next hop based on IP address
>> alone and not port, but that's radioactively incorrect.
>>
>> --
>> Alex Balashov | Principal | Evariste Systems LLC
>>
>> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Should I ignore Route header in ACK?

2018-07-01 Thread Yuriy Gorlichenko
Hm... Nice guess
I will try to check it
Thank you so much for clarify these things Alex!

2018-07-01 11:35 GMT+03:00 Alex Balashov :

> On Sun, Jul 01, 2018 at 11:27:36AM +0300, Yuriy Gorlichenko wrote:
>
> > So FS in this case ignores single route header and sends request to the
> > Provider Contact
>
> If so, that's wrong.
>
> I suppose it's possible that it matches the next hop based on IP address
> alone and not port, but that's radioactively incorrect.
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


  1   2   >