[SR-Users] Get destination IP from forwarded invite

CUMHUR KARAHAN cumhur.karahan at consultant.turkcell.com.tr
Fri Jan 17 13:22:32 CET 2020


Hi Joel,

Thank you for your response. 

In fact, I want to get Request-line URI's parameters of the outgoing INVITE that is leaving the first Kamailio box, briefly. Unfortunately "du - destination URL" or "sndto(name)" pseudo-variables indicate the next hope's information. And in this case, the next hope's information is not same as the ClientB's information.

As I tried to tell before, our setup is like that:

ClientA -> Kamailio1 -> Kamailio2 -> ClientB

I need the request line URI parameters of the invite message sent by Kamailio1 to Kamailio2. And these parameters contain ClientB's ip and port information such as 10.252.180.51:36945 as you can see below:

INVITE sip:905364167881 at 10.252.180.51:36945;transport=tls SIP/2.0
Record-Route: <sip:gearbox11.turkcell.tgc:5060;r2=on;lr;did=7f5.f572;nat=yes>
Record-Route: <sip:testsip05.tvoip.turkcell.com.tr:443;transport=tls;r2=on;lr;did=7f5.f572;nat=yes>
Via: SIP/2.0/UDP gearbox11.turkcell.tgc:5060;branch=z9hG4bK67ad.4e8e863f2475ab8d3053af0593548557.1;i=f
Via: SIP/2.0/TLS 100.64.13.139:56993;received=212.252.34.165;branch=z9hG4bK.1SYkXD1Me;rport=32980
From: <sip:905368601286 at testsip.tvoip.turkcell.com.tr>;tag=WbINy0ypx
To: sip:905364167881 at testsip.tvoip.turkcell.com.tr
CSeq: 21 INVITE
Call-ID: 1wF-vjzGIX
...

And, your question: no, we don't use the dispatcher mechanism. We just check the DB to find out Kamailio server which the number registered into and send the messages to this server basically. 

Thanks for all...


-----Original Message-----
From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of sr-users-request at lists.kamailio.org
Sent: 17 Ocak 2020 Cuma 14:00
To: sr-users at lists.kamailio.org
Subject: sr-users Digest, Vol 176, Issue 17

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

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

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

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


Today's Topics:

   1. Get destination IP from forwarded invite (CUMHUR KARAHAN)
   2. Re: Kamalio + RTP Engine + SIP Client behind NAT (Richard Fuchs)
   3. Re: Get destination IP from forwarded invite (Joel Serrano)
   4. Re: Kamalio + RTP Engine + SIP Client behind NAT
      (Nuno Miguel Reis)
   5. Re: Kamailio/RTC dinner at Fosdem 2020 (Federico Santulli)
   6. Re: http_client interface (Daniel-Constantin Mierla)
   7. Re: Kamailio stop to process incoming SIP traffic via TCP.
      (adeykunov)
   8. Question about xhttp module kamailio 5.2.x (Jimmy Rodley)
   9. Trouble with 302 Redirect (Jim Leahy)
  10. Re: Kamalio + RTP Engine + SIP Client behind NAT (Richard Fuchs)
  11. Re: http_client interface (Fred Posner)
  12. Re: Trouble with 302 Redirect (Alex Balashov)
  13. UCaaS Platform (Dario Vargas)
  14. Re: [commercial announcement] (Henning Westerholt)


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

Message: 1
Date: Thu, 16 Jan 2020 11:45:15 +0000
From: CUMHUR KARAHAN <cumhur.karahan at consultant.turkcell.com.tr>
To: "sr-users at lists.kamailio.org" <sr-users at lists.kamailio.org>
Subject: [SR-Users] Get destination IP from forwarded invite
Message-ID:
	<319901a90d17413292ad249eb56df2ec at consultant.turkcell.com.tr>
Content-Type: text/plain; charset="utf-8"


Hi all,

I'm a newbie for Kamailio and working on a feature needs end-users' destination IP in the first transferred/forwarded invite message.

Basically, our system/call flow is like:
ClientA -> Kamailio1 -> Kamailio2 -> ClientB

Invite from the clientA:

tls:212.252.34.165:32980
tls:172.21.193.100:5061
INVITE sip:905364167881 at testsip.tvoip.turkcell.com.tr:443 SIP/2.0
Via: SIP/2.0/TLS 100.64.13.139:56993;branch=z9hG4bK.GoiTxA4Ee;rport
From: <sip:905368601286 at testsip.tvoip.turkcell.com.tr>;tag=WbINy0ypx
To: sip:905364167881 at testsip.tvoip.turkcell.com.tr
CSeq: 20 INVITE
...

Needed Ip (Client B's IP 10.252.180.51 for this case) is in the INVITE row of the forwarded message.

Invite to the Kamailio2 :

udp:172.21.193.100:5060
udp:172.21.193.98:5060
INVITE sip:905364167881 at 10.252.180.51:36945;transport=tls SIP/2.0
Record-Route: <sip:gearbox11.turkcell.tgc:5060;r2=on;lr;did=7f5.f572;nat=yes>
Record-Route: <sip:testsip05.tvoip.turkcell.com.tr:443;transport=tls;r2=on;lr;did=7f5.f572;nat=yes>
Via: SIP/2.0/UDP gearbox11.turkcell.tgc:5060;branch=z9hG4bK67ad.4e8e863f2475ab8d3053af0593548557.1;i=f
Via: SIP/2.0/TLS 100.64.13.139:56993;received=212.252.34.165;branch=z9hG4bK.1SYkXD1Me;rport=32980
From: <sip:905368601286 at testsip.tvoip.turkcell.com.tr>;tag=WbINy0ypx
To: sip:905364167881 at testsip.tvoip.turkcell.com.tr
CSeq: 21 INVITE
...

When the first invite message receives, the dialog variables or sel(msg...) parsed values belong to this first received message, as far as I understand during the tests. However I need the forwarded invite message's variables. Even after t_relay in RELAY route, it looks the message I have is the first one. So, I cannot reach this later IP in the forwarded invite message. As far as I understand, bear with me here please, this IP manipulation executes in t_relay function and in the C side of Kamailio. So, I cannot find a way to do that in the our native scripts.

Is there any way to get it without diving C code's abyss? Do you have any idea about it? I would appreciate it, if I can get any help or any clue.

Thanks for all...

S. Cumhur Karahan



[http://s.turkcell.com.tr/SiteAssets/Genel/mail-imza.jpg] <https://ddei3-0-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=http%3a%2f%2fturkcell.li%2fncfYh&umid=39581E1E-9C53-E505-96A6-E057F22BD18D&auth=cbd2d006abdb2241308511f72807fe0bc6594b4a-bbcefdc4443d64fef548126bd3c5f932d722a0a4>

Bu elektronik posta ve onunla iletilen butun dosyalar sadece gondericisi tarafindan almasi amaclanan yetkili gercek ya da tuzel kisinin kullanimi icindir. Eger soz konusu yetkili alici degilseniz bu elektronik postanin icerigini aciklamaniz, kopyalamaniz, yonlendirmeniz ve kullanmaniz kesinlikle yasaktir ve bu elektronik postayi derhal silmeniz gerekmektedir.

TURKCELL bu mesajin icerdigi bilgilerin do?rulu?u veya eksiksiz oldugu konusunda herhangi bir garanti vermemektedir. Bu nedenle bu bilgilerin ne sekilde olursa olsun iceriginden, iletilmesinden, alinmasindan ve saklanmasindan sorumlu degildir. Bu mesajdaki gorusler yalnizca gonderen kisiye aittir ve TURKCELLin goruslerini yansitmayabilir

Bu e-posta bilinen butun bilgisayar viruslerine karsi taranmistir.

________________________________

This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient you are hereby notified that any dissemination, forwarding, copying or use of any of the information is strictly prohibited, and the e-mail should immediately be deleted.

TURKCELL makes no warranty as to the accuracy or completeness of any information contained in this message and hereby excludes any liability of any kind for the information contained therein or for the information transmission, reception, storage or use of such in any way whatsoever. The opinions expressed in this message belong to sender alone and may not necessarily reflect the opinions of TURKCELL.

This e-mail has been scanned for all known computer viruses.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200116/37a3c32b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 92 bytes
Desc: image001.gif
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200116/37a3c32b/attachment-0001.gif>

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

Message: 2
Date: Thu, 16 Jan 2020 08:23:21 -0500
From: Richard Fuchs <rfuchs at sipwise.com>
To: sr-users at lists.kamailio.org
Subject: Re: [SR-Users] Kamalio + RTP Engine + SIP Client behind NAT
Message-ID: <4686712f-d865-c6c9-11ac-649966b867b1 at sipwise.com>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

On 15/01/2020 13.39, Nuno Miguel Reis wrote:
> Hi guys.
>
> I'm replacing a environment where I was using kamailio + freeswitch by 
> another where I'm adding rtpengine to the mix.
> One of the issues I'm having now is when I have a SIP Client behind NAT:
>
> When I send the INVITE from the SIP Client, the SDP is using the 
> private LAN IP address + the advertised media port, let's admit it's
> 10.10.10.10:5000 <http://10.10.10.10:5000> when the call establishes 
> with a public server running kamailio + rtpengine, the actual RTP 
> arrives from the home router public IP on a natted port, let's admit 
> it's 100.100.100.100:65100 
> <https://ddei3-0-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=htt
> p%3a%2f%2f100.100.100.100%3a65100&umid=39581E1E-9C53-E505-96A6-E057F22
> BD18D&auth=cbd2d006abdb2241308511f72807fe0bc6594b4a-193c6dfa2da7d1ac0c
> 93d1a002e73781a0a22d9e>, event though, RTPENGINE assumes that RTP 
> stream is coming from
> 100.100.100.100 
> <https://ddei3-0-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=htt
> p%3a%2f%2f100.100.100.100&umid=39581E1E-9C53-E505-96A6-E057F22BD18D&au
> th=cbd2d006abdb2241308511f72807fe0bc6594b4a-9e365df6d282d7bf1e79e91e70
> 73c5a94aed6d82>:5000.I'm using the '--sip-source' with RTPENGINE to 
> make it use the received ip address instead of the private IP coming in the SDP but I'm not finding anything to make RTPENGINE adapt an start sending the RTP FLOW to the port where he starts receiving the RTP flow from, discarding the SDP media port information.

Rtpengine does this automatically, unless the `asymmetric` flag is used. 
You should see a log message about a `confirmed peer address` as soon as the first RTP is received on a port.

Cheers

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

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

Message: 3
Date: Thu, 16 Jan 2020 07:23:28 -0800
From: Joel Serrano <joel at textplus.com>
To: "Kamailio (SER) - Users Mailing List"
	<sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] Get destination IP from forwarded invite
Message-ID:
	<CAMtXxQmmRb-ieA9T+0ofxAxiOd23w_0nHos=nZOy9-JNRahnfA at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hello,

If I understand correctly your email, you want the IP/Host of the destination of the outgoing INVITE that is leaving a Kamailio box?

First of all, how are you forwarding the request? Are you using dispatcher module?

Here are a couple of options:

1-
https://www.kamailio.org/wiki/cookbooks/5.3.x/pseudovariables#du_-_destination_uri
(although
this depends on your config, it might not be set)

2- https://www.kamailio.org/wiki/cookbooks/5.3.x/core#onsend_route + https://www.kamailio.org/wiki/cookbooks/5.3.x/pseudovariables#sndto_name


If you can describe a little more how you are doing things we might be able to give you more information.

Joel.


On Thu, Jan 16, 2020 at 3:53 AM CUMHUR KARAHAN < cumhur.karahan at consultant.turkcell.com.tr> wrote:

> Hi all,
>
>
>
> I’m a newbie for Kamailio and working on a feature needs end-users’
> destination IP in the first transferred/forwarded invite message.
>
>
>
> Basically, our system/call flow is like:
>
> ClientA -> Kamailio1 -> Kamailio2 -> ClientB
>
>
>
> Invite from the clientA:
>
>
>
> *tls:212.252.34.165:32980 
> <https://ddei3-0-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=htt
> p%3a%2f%2f212.252.34.165%3a32980&umid=39581E1E-9C53-E505-96A6-E057F22B
> D18D&auth=cbd2d006abdb2241308511f72807fe0bc6594b4a-d4b503e38b32fd4dee8
> 59434f30f8c5f3e832496>*
>
> *tls:172.21.193.100:5061 <http://172.21.193.100:5061>*
>
> *INVITE sip:905364167881 at testsip.tvoip.turkcell.com.tr:443
> <http://sip:905364167881@testsip.tvoip.turkcell.com.tr:443> SIP/2.0*
>
> *Via: SIP/2.0/TLS 100.64.13.139:56993;branch=z9hG4bK.GoiTxA4Ee;rport*
>
> *From: <sip:905368601286 at testsip.tvoip.turkcell.com.tr
> <sip%3A905368601286 at testsip.tvoip.turkcell.com.tr>>;tag=WbINy0ypx*
>
> *To: sip:905364167881 at testsip.tvoip.turkcell.com.tr
> <sip%3A905364167881 at testsip.tvoip.turkcell.com.tr>*
>
> *CSeq: 20 INVITE*
>
> *…*
>
>
>
> Needed Ip (Client B’s IP 10.252.180.51 for this case) is in the INVITE 
> row of the forwarded message.
>
>
>
> Invite to the Kamailio2 :
>
>
>
> *udp:172.21.193.100:5060 <http://172.21.193.100:5060>*
>
> *udp:172.21.193.98:5060 <http://172.21.193.98:5060>*
>
> *INVITE sip:905364167881@**10.252.180.51**:36945;transport=tls 
> SIP/2.0*
>
> *Record-Route:
> <sip:gearbox11.turkcell.tgc:5060;r2=on;lr;did=7f5.f572;nat=yes>*
>
> *Record-Route:
> <sip:testsip05.tvoip.turkcell.com.tr:443;transport=tls;r2=on;lr;did=7f
> 5.f572;nat=yes>*
>
> *Via: SIP/2.0/UDP
> gearbox11.turkcell.tgc:5060;branch=z9hG4bK67ad.4e8e863f2475ab8d3053af0
> 593548557.1;i=f*
>
> *Via: SIP/2.0/TLS
> 100.64.13.139:56993;received=212.252.34.165;branch=z9hG4bK.1SYkXD1Me;r
> port=32980*
>
> *From: <sip:905368601286 at testsip.tvoip.turkcell.com.tr
> <sip%3A905368601286 at testsip.tvoip.turkcell.com.tr>>;tag=WbINy0ypx*
>
> *To: sip:905364167881 at testsip.tvoip.turkcell.com.tr
> <sip%3A905364167881 at testsip.tvoip.turkcell.com.tr>*
>
> *CSeq: 21 INVITE*
>
> *…*
>
>
>
> When the first invite message receives, the dialog variables or 
> sel(msg…) parsed values belong to this first received message, as far 
> as I understand during the tests. However I need the forwarded invite message’s variables.
> Even after t_relay in RELAY route, it looks the message I have is the 
> first one. So, I cannot reach this later IP in the forwarded invite 
> message. As far as I understand, bear with me here please, this IP 
> manipulation executes in t_relay function and in the C side of 
> Kamailio. So, I cannot find a way to do that in the our native scripts.
>
>
>
> Is there any way to get it without diving C code’s abyss? Do you have 
> any idea about it? I would appreciate it, if I can get any help or any clue.
>
>
>
> Thanks for all...
>
>
>
> S. Cumhur Karahan
>
>
>
>
> <https://ddei3-0-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=htt
> p%3a%2f%2fturkcell.li%2fncfYh&umid=39581E1E-9C53-E505-96A6-E057F22BD18
> D&auth=cbd2d006abdb2241308511f72807fe0bc6594b4a-bbcefdc4443d64fef54812
> 6bd3c5f932d722a0a4>
>
> Bu elektronik posta ve onunla iletilen butun dosyalar sadece 
> gondericisi tarafindan almasi amaclanan yetkili gercek ya da tuzel 
> kisinin kullanimi icindir. Eger soz konusu yetkili alici degilseniz bu 
> elektronik postanin icerigini aciklamaniz, kopyalamaniz, 
> yonlendirmeniz ve kullanmaniz kesinlikle yasaktir ve bu elektronik postayi derhal silmeniz gerekmektedir.
>
> TURKCELL bu mesajin icerdigi bilgilerin doğruluğu veya eksiksiz oldugu 
> konusunda herhangi bir garanti vermemektedir. Bu nedenle bu bilgilerin 
> ne sekilde olursa olsun iceriginden, iletilmesinden, alinmasindan ve 
> saklanmasindan sorumlu degildir. Bu mesajdaki gorusler yalnizca 
> gonderen kisiye aittir ve TURKCELLin goruslerini yansitmayabilir
>
> Bu e-posta bilinen butun bilgisayar viruslerine karsi taranmistir.
> ------------------------------
>
> This e-mail and any files transmitted with it are confidential and 
> intended solely for the use of the individual or entity to whom they 
> are addressed. If you are not the intended recipient you are hereby 
> notified that any dissemination, forwarding, copying or use of any of 
> the information is strictly prohibited, and the e-mail should 
> immediately be deleted.
>
> TURKCELL makes no warranty as to the accuracy or completeness of any 
> information contained in this message and hereby excludes any 
> liability of any kind for the information contained therein or for the 
> information transmission, reception, storage or use of such in any way 
> whatsoever. The opinions expressed in this message belong to sender 
> alone and may not necessarily reflect the opinions of TURKCELL.
>
> This e-mail has been scanned for all known computer viruses.
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200116/682b8d5d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 92 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200116/682b8d5d/attachment-0001.gif>

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

Message: 4
Date: Thu, 16 Jan 2020 17:29:53 +0000
From: Nuno Miguel Reis <nmreis at student.dei.uc.pt>
To: "Kamailio (SER) - Users Mailing List"
	<sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] Kamalio + RTP Engine + SIP Client behind NAT
Message-ID:
	<CAGTw3V7Y8pHD+a8psPL7Tah=HTgrmvVRPhPBKB9VCuoujX_Nnw at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi again.

Thanks for all the help and suggestions. I realized the issue happens if using kernel forwarding only. If I change rtpengine to start at userspace without the kernel module enabled everything works fine as expected.
Do you have any hints on why this could be happening with the kernel module?

I'm running rtpengine like this:

usersapece: $ rtpengine -f -L 7 --interface=100.100.100.100 --listen-ng=
127.0.0.1:2223 --tos=184 --sip-source

kernel: $ rtpengine -f -L 7 --table=0 --interface=100.100.100.100
--listen-ng=127.0.0.1:2223 --tos=184 --no-fallback --sip-source


when using kernel module, I'm also setting this rules on chain INPUT under
iptables:

-A INPUT -p udp -m udp --dport 5000:16383 -j RTPENGINE --id 0 -A INPUT -p udp -m udp --dport 16384:32768 -j RTPENGINE --id 0 -A INPUT -p udp -m udp --dport 49152:65535 -j RTPENGINE --id 0


Looking forward to hear from you guys.

Regards,

--
Nuno Miguel Reis
Departamento de Engenharia Informática
Faculdade de Ciências e Tecnologia
Universidade de Coimbra


On Thu, Jan 16, 2020 at 1:23 PM Richard Fuchs <rfuchs at sipwise.com> wrote:

> On 15/01/2020 13.39, Nuno Miguel Reis wrote:
>
> Hi guys.
>
> I'm replacing a environment where I was using kamailio + freeswitch by 
> another where I'm adding rtpengine to the mix.
> One of the issues I'm having now is when I have a SIP Client behind NAT:
>
> When I send the INVITE from the SIP Client, the SDP is using the 
> private LAN IP address + the advertised media port, let's admit it's
> 10.10.10.10:5000 when the call establishes with a public server 
> running kamailio + rtpengine, the actual RTP arrives from the home 
> router public IP on a natted port, let's admit it's 
> 100.100.100.100:65100, event though, RTPENGINE assumes that RTP stream is coming from 100.100.100.100:5000.
> I'm using the '--sip-source' with RTPENGINE to make it use the 
> received ip address instead of the private IP coming in the SDP but 
> I'm not finding anything to make RTPENGINE adapt an start sending the 
> RTP FLOW to the port where he starts receiving the RTP flow from, 
> discarding the SDP media port information.
>
> Rtpengine does this automatically, unless the `asymmetric` flag is used.
> You should see a log message about a `confirmed peer address` as soon 
> as the first RTP is received on a port.
>
> Cheers
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200116/d61a6989/attachment-0001.html>

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

Message: 5
Date: Thu, 16 Jan 2020 20:45:04 +0100
From: Federico Santulli <kam.list at nhm.it>
To: miconda at gmail.com, "Kamailio (SER) - Users Mailing List"
	<sr-users at lists.kamailio.org>
Cc: "business at lists.kamailio.org" <business at lists.kamailio.org>
Subject: Re: [SR-Users] Kamailio/RTC dinner at Fosdem 2020
Message-ID: <54CDD921-48D2-47F0-935E-0B181F037774 at nhm.it>
Content-Type: text/plain;	charset=us-ascii

Hi Daniel,

We would like to join the dinner, 3 people from US.

Kind regards.

Federico Santulli

NHM - S.R.L.
Via Raffaello Sanzio, 88
81031 Aversa (CE)
Italy


> Il giorno 9 gen 2020, alle ore 09:52, Daniel-Constantin Mierla <miconda at gmail.com> ha scritto:
> 
> Hello,
> 
> Fosdem 2020 is approaching, there will be a talk from Henning about 
> Kamailio, many other friends and related projects are presenting in 
> the RTC Devroom (Giacomo Vacca and Federico Cabiddu, Wazo, Asterisk, 
> Homer, Janus, Jitsi, CGRateS, Linphone, ...):
> 
>   * https://fosdem.org/2020/schedule/track/real_time_communications/
> 
> I plan to be at the event and wondering if there are enough interested 
> participants for having the traditional Kamailio/RTC dinner. If yes, 
> Torrey will help to book a place to accommodate us (first choice could 
> be the same restaurant like the last year, if available).
> 
> Reply if you want to join the dinner and say how many other people are 
> joining you.
> 
> Cheers,
> Daniel
> 
> --
> Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- 
> www.linkedin.com/in/miconda Kamailio World Conference - April 27-29, 
> 2020, in Berlin -- 
> https://ddei3-0-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=www.
> kamailioworld.com&umid=39581E1E-9C53-E505-96A6-E057F22BD18D&auth=cbd2d
> 006abdb2241308511f72807fe0bc6594b4a-ac4b2b5016612d36d9bf3bf438b6b436b1
> f1ae8e
> 
> 
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users




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

Message: 6
Date: Thu, 16 Jan 2020 22:56:03 +0100
From: Daniel-Constantin Mierla <miconda at gmail.com>
To: "Kamailio (SER) - Users Mailing List"
	<sr-users at lists.kamailio.org>, Fred Posner <fred at palner.com>
Subject: Re: [SR-Users] http_client interface
Message-ID: <4ab3422e-c3d6-7d85-fb3e-53b09bfa6c1a at gmail.com>
Content-Type: text/plain; charset=utf-8

The libcurl seems to offer an option for that as well:

  - https://curl.haxx.se/libcurl/c/CURLOPT_INTERFACE.html

So it can be a small patch to the module and support it in the future.

If you look for a solution on current stable, maybe one of the embedded scripting languages can help, you can execute inline a small script in Lua/Python/Perl with app_lua_run() & equivalents. In the past I used the http client from lua to do more complex http api queries (e.g., with specific headers, ...).

Cheers,
Daniel

On 13.01.20 17:00, Fred Posner wrote:
> I'd never had a reason to before, but on a deployment I need http 
> messages to go out a specific interface. Curl has an --interface 
> option, but I don't see how to do the same with http_client. Unless 
> I'm missing something...
>
> Anyone ever do something like this?
>
--
Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio World Conference - April 27-29, 2020, in Berlin -- https://ddei3-0-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=www.kamailioworld.com&umid=39581E1E-9C53-E505-96A6-E057F22BD18D&auth=cbd2d006abdb2241308511f72807fe0bc6594b4a-ac4b2b5016612d36d9bf3bf438b6b436b1f1ae8e




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

Message: 7
Date: Thu, 16 Jan 2020 09:49:40 -0700 (MST)
From: adeykunov <adeykunov at intermedia.net>
To: sr-users at lists.sip-router.org
Subject: Re: [SR-Users] Kamailio stop to process incoming SIP traffic
	via TCP.
Message-ID: <1579193380553-0.post at n5.nabble.com>
Content-Type: text/plain; charset=us-ascii

Daniel,

Got the same issue on 5.3.1 with openssl1.1, debian9.
After 3 working days of tests (about ~30-50 wss clients), suddenly we've got
a lot of connections stucked in CLOSE_WAIT state. Kamailio called
sig_alarm_abort() when we try to reboot.

Thanks,
Andrey





--
Sent from: http://sip-router.1086192.n5.nabble.com/Users-f3.html



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

Message: 8
Date: Thu, 16 Jan 2020 22:02:40 +0000 (UTC)
From: Jimmy Rodley <jimmyrodley at yahoo.com>
To: "sr-users at lists.kamailio.org" <sr-users at lists.kamailio.org>
Subject: [SR-Users] Question about xhttp module kamailio 5.2.x
Message-ID: <443353431.8467378.1579212160245 at mail.yahoo.com>
Content-Type: text/plain; charset="utf-8"

Hi,
I am on kamailio 5.2.4 and want to use the xhttp module for certain management operations.
The request involves some DB queries . The DB is remote and via ODBC and might have some delay.The documentation on the xhttp module states about latency http://kamailio.org/docs/modules/devel/modules/xhttp.html mentioning that the request is handled in an asynchronous manner. 
However, the JSONRPC-S module documentation says that this module implements the support for asynchronous RPC commands only for HTTP and HTTPS transports.

https://www.kamailio.org/docs/modules/devel/modules/jsonrpcs.html#idm1049416972

I am confused about the process under whose context the xttp request . Can there be a dedicated process to handle certain management requests which do some custom instructions like certain DB operations or initiate certain http requests ?
Thanks,Rupesh

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

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

Message: 9
Date: Thu, 16 Jan 2020 15:54:54 -0500
From: Jim Leahy <rickfromsunnyvale at gmail.com>
To: sr-users at lists.kamailio.org
Subject: [SR-Users] Trouble with 302 Redirect
Message-ID:
	<CAH3xi0-AEEj_bwLYd4OzSH96Cz8=qyrdsNWTjWnf5Sm1efrvhg at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi All,
   I'm having some issues trying to properly send a '302 Moved Temporarily'
reply to the calling UAC (UAC1) when the remote UAC (UAC2) returns a 486
status (Do Not Disturb). The goal is to redirect UAC1 to a voicemail server
when UAC2 is in DND.
Here are the pertinent parts of my config:

route {
        # drop some things right away
        route(DROP);

        # perform sanity check
        route(SANITYCHECK);

        # handle registrations
        if(is_method("REGISTER")) {
                route(REGISTRATION);
                exit;
        }

        # handle invites
        if(is_method("INVITE")) {
                route("INVITE");
                exit;
        }

        route(RELAY);
}

route[INVITE] {
        # add this proxy to the record-route so it stays in the loop
        record_route();

        # if we can find this user in the location DB...
        if(lookup("location")) {
                # relay the invite to the new dURI
                t_on_failure("FOURDIGITFAIL");
                t_on_reply("FOURDIGITREPLY");
                route(RELAY);
                # go back to the main route
                return;
        }

onreply_route[FOURDIGITREPLY] {
        if(t_check_status("4[0-9]{2}")) {
                t_reply("302", "Moved Temporarily");
        }
}

I'm having issues with the t_reply in the onreply_route. It successfully
sends the reply, but I can't seem to set the Contact header properly. I'm
trying to set it to the location of the user's mailbox on the voicemail
sever (ie sip:1000 at vmpbx.domain.com), but nothing I try works. I've tried:
     remove_hf("Contact");
     insert_hf("Contact: sip:1000 at vmpbx.domain.com");
     t_reply("302", "Moved Temporarily");

But as I understand it, that just changes the header in the reply from
UAC2, not the reply I'm sending to UAC1

Then I tried:
     append_to_reply("Contact: sip:1000 at vmpbx.domain.com" );
     t_reply("302", "Moved Temporarily");

But I can't use append_to_reply in an onreply block.
How can I change the Contact header in the reply that's sent? Am I just
going about this the wrong way? Any help would be appreciated. Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200116/66fc8ba2/attachment-0001.html>

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

Message: 10
Date: Thu, 16 Jan 2020 17:10:06 -0500
From: Richard Fuchs <rfuchs at sipwise.com>
To: sr-users at lists.kamailio.org
Subject: Re: [SR-Users] Kamalio + RTP Engine + SIP Client behind NAT
Message-ID: <0b704a3c-afc4-3ca0-8d8b-38e2d70bcae9 at sipwise.com>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

On 16/01/2020 12.29, Nuno Miguel Reis wrote:
> Hi again.
>
> Thanks for all the help and suggestions. I realized the issue happens 
> if using kernel forwarding only. If I change rtpengine to start at 
> userspace without the kernel module enabled everything works fine as 
> expected.
> Do you have any hints on why this could be happening with the kernel 
> module?
>
> I'm running rtpengine like this:
>
> usersapece: $ rtpengine -f -L 7 --interface=100.100.100.100 
> --listen-ng=127.0.0.1:2223 <http://127.0.0.1:2223> --tos=184 --sip-source
>
> kernel: $ rtpengine -f -L 7 --table=0 --interface=100.100.100.100 
> --listen-ng=127.0.0.1:2223 <http://127.0.0.1:2223> --tos=184 
> --no-fallback --sip-source
>
The kernel module receives its instructions from the userspace daemon, 
so there's no reason there should be a difference. Can you post 1) logs 
and 2) the flags you use for your offers/answers?

Cheers

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

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

Message: 11
Date: Thu, 16 Jan 2020 17:11:23 -0500
From: Fred Posner <fred at palner.com>
To: "Kamailio (SER) - Users Mailing List"
	<sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] http_client interface
Message-ID: <9808e784-3d56-d100-4c46-b136cc09ef08 at palner.com>
Content-Type: text/plain; charset=utf-8

On 1/16/20 4:56 PM, Daniel-Constantin Mierla wrote:
> The libcurl seems to offer an option for that as well:
> 
>   - https://curl.haxx.se/libcurl/c/CURLOPT_INTERFACE.html
> 
> So it can be a small patch to the module and support it in the future.
> 
> If you look for a solution on current stable, maybe one of the embedded
> scripting languages can help, you can execute inline a small script in
> Lua/Python/Perl with app_lua_run() & equivalents. In the past I used the
> http client from lua to do more complex http api queries (e.g., with
> specific headers, ...).
> 
> Cheers,
> Daniel
> 

Thank you Daniel,

I implemented a work around (little proxy in go) but would love if the
option was added for the future.

Fred Posner
fred at qxork.com
https://ddei3-0-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fqxork.com&umid=39581E1E-9C53-E505-96A6-E057F22BD18D&auth=cbd2d006abdb2241308511f72807fe0bc6594b4a-a38bc2851524c5b967bfb1f129c9240c6587a15a
Direct/SMS: +1 (336) 439-3733

Need Fred? Call Fred. 336-HEY-FRED
Matrix: @fred:matrix.lod.com



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

Message: 12
Date: Thu, 16 Jan 2020 17:31:43 -0500
From: Alex Balashov <abalashov at evaristesys.com>
To: sr-users at lists.kamailio.org
Subject: Re: [SR-Users] Trouble with 302 Redirect
Message-ID: <20200116223143.GA857 at typhoon>
Content-Type: text/plain; charset=us-ascii

Try doing this in a failure_route[]; onreply_route[] isn't really meant
to transform replies, just to passively observe or drop them.

Also, you'll want to use append_to_reply():

   https://kamailio.org/docs/modules/5.3.x/modules/textops.html#textops.f.append_to_reply

Note that the conditions that give rise to the invocation of a
failure_route are broader and somewhat more abstract than any given SIP
reply -- e.g. transaction reply timeouts. So, you would want to
structure your failure_route like this:

   failure_route[REDIRECT_HANDLE] {
      if(t_is_canceled())
         exit;

      if(t_branch_timeout()) {
         # Handle the timeout case...
	 
	 exit;
      }

      # Use $T_rpl to access reply code ($rs) and reply reason if needed
      # ($rs), per:
      #
      # https://www.kamailio.org/wiki/cookbooks/5.3.x/pseudovariables#t_rpl_pv

      if($T_rpl($rs) == 486) {
         append_to_reply("Contact: <sip:...>\r\n");
         t_reply("302", "Moved Temporarily");
	 exit;
      }

      # Some other case.
   }

-- Alex

On Thu, Jan 16, 2020 at 03:54:54PM -0500, Jim Leahy wrote:

> Hi All,
>    I'm having some issues trying to properly send a '302 Moved Temporarily'
> reply to the calling UAC (UAC1) when the remote UAC (UAC2) returns a 486
> status (Do Not Disturb). The goal is to redirect UAC1 to a voicemail server
> when UAC2 is in DND.
> Here are the pertinent parts of my config:
> 
> route {
>         # drop some things right away
>         route(DROP);
> 
>         # perform sanity check
>         route(SANITYCHECK);
> 
>         # handle registrations
>         if(is_method("REGISTER")) {
>                 route(REGISTRATION);
>                 exit;
>         }
> 
>         # handle invites
>         if(is_method("INVITE")) {
>                 route("INVITE");
>                 exit;
>         }
> 
>         route(RELAY);
> }
> 
> route[INVITE] {
>         # add this proxy to the record-route so it stays in the loop
>         record_route();
> 
>         # if we can find this user in the location DB...
>         if(lookup("location")) {
>                 # relay the invite to the new dURI
>                 t_on_failure("FOURDIGITFAIL");
>                 t_on_reply("FOURDIGITREPLY");
>                 route(RELAY);
>                 # go back to the main route
>                 return;
>         }
> 
> onreply_route[FOURDIGITREPLY] {
>         if(t_check_status("4[0-9]{2}")) {
>                 t_reply("302", "Moved Temporarily");
>         }
> }
> 
> I'm having issues with the t_reply in the onreply_route. It successfully
> sends the reply, but I can't seem to set the Contact header properly. I'm
> trying to set it to the location of the user's mailbox on the voicemail
> sever (ie sip:1000 at vmpbx.domain.com), but nothing I try works. I've tried:
>      remove_hf("Contact");
>      insert_hf("Contact: sip:1000 at vmpbx.domain.com");
>      t_reply("302", "Moved Temporarily");
> 
> But as I understand it, that just changes the header in the reply from
> UAC2, not the reply I'm sending to UAC1
> 
> Then I tried:
>      append_to_reply("Contact: sip:1000 at vmpbx.domain.com" );
>      t_reply("302", "Moved Temporarily");
> 
> But I can't use append_to_reply in an onreply block.
> How can I change the Contact header in the reply that's sent? Am I just
> going about this the wrong way? Any help would be appreciated. Thanks

> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at 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: https://ddei3-0-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=http%3a%2f%2fwww.evaristesys.com%2f&umid=39581E1E-9C53-E505-96A6-E057F22BD18D&auth=cbd2d006abdb2241308511f72807fe0bc6594b4a-ab557c94242e133aecb84497292656f0d65f2e0e, https://ddei3-0-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=http%3a%2f%2fwww.csrpswitch.com%2f&umid=39581E1E-9C53-E505-96A6-E057F22BD18D&auth=cbd2d006abdb2241308511f72807fe0bc6594b4a-19a051a2187eac59a96885fd6635f5c3e5b9561d



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

Message: 13
Date: Fri, 17 Jan 2020 00:58:49 -0500
From: Dario Vargas <dariovargas.gcs at gmail.com>
To: sr-users at lists.kamailio.org
Subject: [SR-Users] UCaaS Platform
Message-ID:
	<CAHqy4U_jecJALyvoZM6p6oGB5VyC_kZN=Sj3_vqjEhkO-tmORw at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Take the LEAD in Unified Communications as a Service! We can help you get
started in the next Telco Disruptive Business.

White Label Hosted Cloud Platform as a Service (CPaaS) will enable you to
offer all of the below products under your own brand -

Hosted Contact Center (CCaaS)
Hosted Unified Communications (UCaaS)
Hosted PBX (Full Feature Set)
SIP Trunk
Ai Chat Bots
Caller Profile Solutions (Display your clients' corporate identity on cell
phones) to improve phone answer ratio.
Video Surveillance (VSaaS integrated with AWS)
Web Conferencing
Virtual FAX
Business SMS

Software developed in the USA to have all the routing features required to
connect with US and Canadian carriers for inbound and outbound (LRN, LNP,
TF, SMS, Push, Video etc).
Use our existing contracts and pricing for telco services or BYOC (bring
your own carrier model).
Alternately we can provide you with introductions to the carriers of choice
below to get started -

Nuwave.com - Number 1 in TF 8XX Inbound
Voipinvite.com - 1000s of MPS and CPS for SMS and Voice Broadcast
Voxbone.com - World Wide DiDs - Low Monthly minimum
Peerlessnetwork.com  - Outbound / Inbound Business calling
Centurylink.com / Level 3 - USA DiDs and outbound and inbound - minimum
volumes required
Verizon.com - Outbound and Inbound enterprise business calls - minimum
volumes required

Dario Vargas
info at dnl-switch.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200117/943422d8/attachment-0001.html>

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

Message: 14
Date: Fri, 17 Jan 2020 07:46:13 +0000
From: Henning Westerholt <hw at skalatan.de>
To: "Kamailio (SER) - Users Mailing List"
	<sr-users at lists.kamailio.org>, Dario Vargas
	<dariovargas.gcs at gmail.com>
Subject: Re: [SR-Users] [commercial announcement]
Message-ID: <2dcadf18-240a-1eb4-4a46-89d1d84c6007 at skalatan.de>
Content-Type: text/plain; charset="utf-8"

Hello Dario,

this type of content is not appropriate for the sr-users lists, please post it here.

Please use our dedicated business list for this kind of commercial announcements.

https://lists.kamailio.org/cgi-bin/mailman/listinfo/business

Regards,

Henning

Am 17.01.20 um 06:58 schrieb Dario Vargas:
commercial announcement


_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--
Henning Westerholt - https://ddei3-0-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fskalatan.de%2fblog%2f&umid=39581E1E-9C53-E505-96A6-E057F22BD18D&auth=cbd2d006abdb2241308511f72807fe0bc6594b4a-e3709a77a2e08cc7e9654b6f4a5353ca23af4429
Kamailio services - https://ddei3-0-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fgilawa.com&umid=39581E1E-9C53-E505-96A6-E057F22BD18D&auth=cbd2d006abdb2241308511f72807fe0bc6594b4a-a187531eefe27344ba655db8d03ef71a41ad9b49
Kamailio Merchandising - https://ddei3-0-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fskalatan.de%2fmerchandising%2f&umid=39581E1E-9C53-E505-96A6-E057F22BD18D&auth=cbd2d006abdb2241308511f72807fe0bc6594b4a-26d5e5e56523691d4156b2f08200b1019eb4c8f9
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200117/fa884666/attachment-0001.html>

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

Subject: Digest Footer

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


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

End of sr-users Digest, Vol 176, Issue 17
*****************************************


More information about the sr-users mailing list