[asterisk-dev] Ast_channel question

Mark Michelson mmichelson at digium.com
Thu Jan 14 12:16:23 CST 2010


Salvatore Frandina wrote:
> Hi,
> 
> does ast_channel data structure contain a field about IP and port of 
> Asterisk server?
> 
> Thank
> 
> -- 

No.

However, in certain channel drivers, most notably VoIP channel drivers, you can 
sometimes find such information in the channel's tech_pvt structure. For 
instance, chan_sip's sip_pvt structure has a field called "ourip" that has the 
information you requested. Specifically, "ourip" will contain the source IP 
address and port being used when communicating over the corresponding channel.

Mark Michelson



More information about the asterisk-dev mailing list