[OpenSER-Devel] wrong source ip addr

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Apr 9 16:24:53 CEST 2008


Hi Francisco,

the addresses are correct (as they should be), but how you print them is 
not correct :) - note that ip_addr2a () returns a pointer to an internal 
static buffer, so if you want to call it several times for different 
IPs, you need to make a copy of the returned string, otherwise it will 
be re-written.

Regards,
Bogdan


Francisco Seratti wrote:
> Hello, im using the function
> ip_addr2a(&sip_msg->rcv.src_ip) to get the source ip
> address of the message. When the message is a REGISTER
> method, the source and destination addresses are the
> same (the IP of the endpoint) but when the method is
> INVITE the src and dst of the message are the ip
> address of the incoming interface on the openser box.
> All i need to know is the ip address of the origin of
> the message, maybe im searching in the wrong place.
>
> Thanks for your time pals,
>
> Francisco.
>
>
>       Tarjeta de crédito Yahoo! de Banco Supervielle.
> Solicitá tu nueva Tarjeta de crédito. De tu PC directo a tu casa. www.tuprimeratarjeta.com.ar 
>
> _______________________________________________
> Devel mailing list
> Devel at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/devel
>
>   




More information about the Devel mailing list