Hi All!
Is it possible to know IP-address to which request will be forwarded ?
I see that t_relay() actually know it but how get these knowledge in script? any pseudo-variable available for it?
Hi Victor,
It all depends on the way u forward the request. If u will use rewritehost() then u have the value stored into $rd. If u will use the direct forward capability of t_relay() eg. t_relay("ip.add.res.s") then u should store the value into an avp before passing the request to t_relay() function. If u will use LCR to send out the call, then the value of the next host should be available in gw_uri_avp.
Hope this info helps.
Cheers, DanB
On 8/3/07, Victor Gamov vit@lipetsk.ru wrote:
Hi All!
Is it possible to know IP-address to which request will be forwarded ?
I see that t_relay() actually know it but how get these knowledge in script? any pseudo-variable available for it?
-- CU, Victor Gamov
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Dan-Cristian Bogos wrote:
Hi Victor,
It all depends on the way u forward the request. If u will use rewritehost() then u have the value stored into $rd. If u will use the direct forward capability of t_relay() eg. t_relay("ip.add.res.s") then u should store the value into an avp before passing the request to t_relay() function. If u will use LCR to send out the call, then the value of the next host should be available in gw_uri_avp.
Hope this info helps.
Thanks Dan!
But I'm looking for general way to know remote IP. I think that t_relay() (if I use it) actually know this IP but I can not find the way to get this info.
Victor Gamov schrieb:
Dan-Cristian Bogos wrote:
Hi Victor,
It all depends on the way u forward the request. If u will use rewritehost() then u have the value stored into $rd. If u will use the direct forward capability of t_relay() eg. t_relay("ip.add.res.s") then u should store the value into an avp before passing the request to t_relay() function. If u will use LCR to send out the call, then the value of the next host should be available in gw_uri_avp.
Hope this info helps.
Thanks Dan!
But I'm looking for general way to know remote IP. I think that t_relay() (if I use it) actually know this IP but I can not find the way to get this info.
If the destination is addressed by a domain name, then the remote IP is not known in advance - thus there is no chance to get the remote IP in config script.
regards klaus
Klaus Darilion wrote:
Victor Gamov schrieb:
Dan-Cristian Bogos wrote:
Hi Victor,
It all depends on the way u forward the request. If u will use rewritehost() then u have the value stored into $rd. If u will use the direct forward capability of t_relay() eg. t_relay("ip.add.res.s") then u should store the value into an avp before passing the request to t_relay() function. If u will use LCR to send out the call, then the value of the next host should be available in gw_uri_avp.
Hope this info helps.
Thanks Dan!
But I'm looking for general way to know remote IP. I think that t_relay() (if I use it) actually know this IP but I can not find the way to get this info.
If the destination is addressed by a domain name, then the remote IP is not known in advance - thus there is no chance to get the remote IP in config script.
You can just filter based on the remote IP via the blacklist.
Regards, bogdan
Bogdan-Andrei Iancu wrote:
Klaus Darilion wrote:
Victor Gamov schrieb:
Dan-Cristian Bogos wrote:
Hi Victor,
It all depends on the way u forward the request. If u will use rewritehost() then u have the value stored into $rd. If u will use the direct forward capability of t_relay() eg. t_relay("ip.add.res.s") then u should store the value into an avp before passing the request to t_relay() function. If u will use LCR to send out the call, then the value of the next host should be available in gw_uri_avp.
Hope this info helps.
Thanks Dan!
But I'm looking for general way to know remote IP. I think that t_relay() (if I use it) actually know this IP but I can not find the way to get this info.
If the destination is addressed by a domain name, then the remote IP is not known in advance - thus there is no chance to get the remote IP in config script.
You can just filter based on the remote IP via the blacklist.
My primary idea -- to save this info into statistic.
Is it possible export some PV from t_relay() (or something else who really know where is request send)
Hi Vistor,
That would not be a problem ,but what do you want to do with this info? and how to access it after t_relay?
regards, bogdan
Victor Gamov wrote:
Bogdan-Andrei Iancu wrote:
Klaus Darilion wrote:
Victor Gamov schrieb:
Dan-Cristian Bogos wrote:
Hi Victor,
It all depends on the way u forward the request. If u will use rewritehost() then u have the value stored into $rd. If u will use the direct forward capability of t_relay() eg. t_relay("ip.add.res.s") then u should store the value into an avp before passing the request to t_relay() function. If u will use LCR to send out the call, then the value of the next host should be available in gw_uri_avp.
Hope this info helps.
Thanks Dan!
But I'm looking for general way to know remote IP. I think that t_relay() (if I use it) actually know this IP but I can not find the way to get this info.
If the destination is addressed by a domain name, then the remote IP is not known in advance - thus there is no chance to get the remote IP in config script.
You can just filter based on the remote IP via the blacklist.
My primary idea -- to save this info into statistic.
Is it possible export some PV from t_relay() (or something else who really know where is request send)
Bogdan-Andrei Iancu wrote:
Hi Vistor,
That would not be a problem ,but what do you want to do with this info? and how to access it after t_relay?
Hi Bogdan!
This info (with some other like $td) may be saved into DB after t_relay() to be processed after by some statistic/analyze software.
Hi Victor,
first sorry for mistyping your name in the previous email.
What you are saying make sense - please open a feature request on the tracker to have this in mind.
Thanks and regards, Bogdan
Victor Gamov wrote:
Bogdan-Andrei Iancu wrote:
Hi Vistor,
That would not be a problem ,but what do you want to do with this info? and how to access it after t_relay?
Hi Bogdan!
This info (with some other like $td) may be saved into DB after t_relay() to be processed after by some statistic/analyze software.
Bogdan-Andrei Iancu wrote:
Hi Victor,
first sorry for mistyping your name in the previous email.
What you are saying make sense - please open a feature request on the tracker to have this in mind.
Done. See at http://sourceforge.net/tracker/index.php?func=detail&aid=1773214&gro...
Thanks!