Re: [OpenSIPS-Users] How to test if a message is from myself

2011-02-07 Thread Dave Singer
Thanks Stefano, Though, X-src-ip would be a header added by a trusted back 2 back server (which I would fist verify before trusting the header). So it wouldn't ever be the same as $si. Thanks Bogdan, I thought of a workaround. :-) (a little messy though) if ( $avp(s:dr_gw_attrs) =~

Re: [OpenSIPS-Users] How to test if a message is from myself

2011-02-03 Thread Bogdan-Andrei Iancu
Hi Dave, Unfortunately does not work with variables. Regards, Bogdan Dave Singer wrote: Wow I missed that one. Thanks. Does that work for PVs so I can test other IPs like one from another header, say X-src-ip:192.168.0.5. Last I tried I couldn't get it to work. Not sure if that was 1.6.2 or

Re: [OpenSIPS-Users] How to test if a message is from myself

2011-02-03 Thread Stefano Pisani
Hi Dave you could try if ($si == $hdr(X-src-ip)){...} Il 03/02/2011 12:59, Bogdan-Andrei Iancu ha scritto: Hi Dave, Unfortunately does not work with variables. Regards, Bogdan Dave Singer wrote: Wow I missed that one. Thanks. Does that work for PVs so I can test other IPs like one from

Re: [OpenSIPS-Users] How to test if a message is from myself

2011-02-02 Thread Bogdan-Andrei Iancu
Hi Dave, do : if (src_ip==myself) {} Regards, Bogdan Dave Singer wrote: Is there any way to check if the source IP/port is one that opensips is listening on or one ? something like if (sip:$si:$sp == myself) { ...bla; bla;} Thanks Dave ___ Users

Re: [OpenSIPS-Users] How to test if a message is from myself

2011-02-02 Thread Dave Singer
Wow I missed that one. Thanks. Does that work for PVs so I can test other IPs like one from another header, say X-src-ip:192.168.0.5. Last I tried I couldn't get it to work. Not sure if that was 1.6.2 or 1.6.3. I'm using 1.6.4 now. :) Thanks Again Dave On Wed, Feb 2, 2011 at 4:37 AM,

[OpenSIPS-Users] How to test if a message is from myself

2011-01-31 Thread Dave Singer
Is there any way to check if the source IP/port is one that opensips is listening on or one ? something like if (sip:$si:$sp == myself) { ...bla; bla;} Thanks Dave ___ Users mailing list Users@lists.opensips.org