void sofia_glue_get_addr(msg_t *msg, char *buf, size_t buflen, int *port)
{
su_addrinfo_t *addrinfo = msg_addrinfo(msg);
if (buf) {
get_addr(buf, buflen, addrinfo->ai_addr, addrinfo->ai_addrlen);
}
if (port) {
*port = get_port(addrinfo->ai_addr); }
}
Thats what we use on a msg_t to extract this info.
Mike
On Mar 27, 2013, at 12:46 PM, Jerry Richards <[email protected]> wrote:
> Okay, I think the check would involve this: During registration, save the
> TCP/IP source address of the 200 OK reply to the REGISTER request. Then
> compare the TCP/IP source address of any subsequent inbound INVITE to the
> saved address and if it does not match, then reject the INVITE.
>
> What I don't know is how to obtain the actual TCP/IP source address within
> sofia-sip (I only know how to access the content of the message, not the
> TCP/IP header information).
>
> Thanks,
> Jerry
>
> From: Michael Jerris [mailto:[email protected]]
> Sent: Wednesday, March 27, 2013 9:30 AM
> To: Jerry Richards
> Cc: '[email protected]'
> Subject: Re: [Sofia-sip-devel] Does Sofia Have Option To Reject SIP Messages
> Not Coming From Proxy It Is Registered To?
>
> you would need some combination of looking at the actual network address the
> packet came from, and the contents of the sip message to make your decision I
> expect. Do you know how to access all of that information? If not, which
> specific pieces do you need help with?
>
> Mike
>
> On Mar 27, 2013, at 12:20 PM, Jerry Richards <[email protected]>
> wrote:
>
>
> Thanks, Mike. Do you know what those few lines would be? How can sofia-sip
> know the INVITE is not spoofed from another entity?
>
> Jerry
>
> From: Michael Jerris [mailto:[email protected]]
> Sent: Tuesday, March 26, 2013 3:32 PM
> To: Jerry Richards
> Cc: '[email protected]'
> Subject: Re: [Sofia-sip-devel] Does Sofia Have Option To Reject SIP Messages
> Not Coming From Proxy It Is Registered To?
>
> Not explicitly, but its just a few lines of code in i_invite to make it do
> that.
>
> Mike
>
> On Mar 26, 2013, at 6:03 PM, Jerry Richards <[email protected]>
> wrote:
>
>
>
> Hello,
>
> As a phone endpoint (i.e. user agent), does sofia-sip have an option tag to
> reject any SIP requests/messages not coming from the SIP proxy to which it is
> registered?
>
> Best Regards,
> Jerry
>
------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Sofia-sip-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel