Re: [Sofia-sip-devel] How to get the source IP address of an incoming message

2009-03-18 Thread Lin Huang
Michael, It worked. I really appreciate your help! Thanks again, Lin Huang From: Michael Jerris [mailto:m...@jerris.com] Sent: Tuesday, March 17, 2009 6:43 PM To: Lin Huang; sofia-sip-devel Subject: Re: [Sofia-sip-devel] How to get the source IP address of an incoming message

Re: [Sofia-sip-devel] How to get the source IP address of an incoming message

2009-03-17 Thread Michael Jerris
Something like this should do the trick from your event callback su_addrinfo_t *my_addrinfo = msg_addrinfo(nua_current_request(nua)); char network_ip[80] = {0}; int network_port = 0; if (my_addrinfo->ai_addr) { getnameinfo(my_addrinfo->ai_addr, my_addrinfo->ai_ad