[asterisk-dev] Log user IP.

Dmytro Mishchenko dioml at dreamtime.net
Fri Dec 15 08:11:01 MST 2006


Hello,

I would like to write application which logs IP and port of a client which 
makes a call through Asterisk over SIP, IAX, (may be other protocols too). 
I expect it to be used as a first application in dialplan. It should find 
client IP and port and may set channels variables or save them in CDR etc.

I've checked channel structure and SIP, IAX channels pvt structures.
IP address info available in pvt structures only of every channel.

What is the best and common way to extract it from there?

ast_channel_tech has a function: queryoption()
I don't see any implementation of that function. Can it be used for obtaining 
such info?

Thanks,
Dmitry.



More information about the asterisk-dev mailing list