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

Stefano Pisani stefano.pisani at omnianet.it
Thu Feb 3 13:32:55 CET 2011


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 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, Bogdan-Andrei Iancu 
>> <bogdan at opensips.org> wrote:
>>> 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 mailing list
>>>> Users at lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>> -- 
>>> Bogdan-Andrei Iancu
>>> OpenSIPS Event - expo, conf, social, bootcamp
>>> 2 - 4 February 2011, ITExpo, Miami,  USA
>>> OpenSIPS solutions and "know-how"
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>



More information about the Users mailing list