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 < [email protected]> 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 <http://212.252.34.165:32980>* > > *tls:172.21.193.100:5061 <http://172.21.193.100:5061>* > > *INVITE sip:[email protected]:443 > <http://sip:[email protected]:443> SIP/2.0* > > *Via: SIP/2.0/TLS 100.64.13.139:56993;branch=z9hG4bK.GoiTxA4Ee;rport* > > *From: <sip:[email protected] > <sip%[email protected]>>;tag=WbINy0ypx* > > *To: sip:[email protected] > <sip%[email protected]>* > > *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=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:[email protected] > <sip%[email protected]>>;tag=WbINy0ypx* > > *To: sip:[email protected] > <sip%[email protected]>* > > *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://turkcell.li/ncfYh> > > 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 > [email protected] > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >
_______________________________________________ Kamailio (SER) - Users Mailing List [email protected] https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
