How connect to AMI

Hi,

I would like to know how i can connect to asterisk manager interface AMI…i’m studiyng a source code and i found the following function. But i don’t understand where is the output.

// output to manager...
			manager_event(
				EVENT_FLAG_CALL,
				"ConferenceLeave",
				"ConferenceName: %s\r\n"
				"Member: %d\r\n"
				"Channel: %s\r\n"
				"CallerID: %s\r\n"
				"CallerIDName: %s\r\n"
				"Duration: %ld\r\n"
				"Count: %d\r\n",
				conf->name,
				member->id,
				member->channel_name,
				member->callerid,
				member->callername,
				tt, count
			) ;

Thank you

Can somebody help me?

Thank

Asterisk manage interface (AMI) can be reached at tcp port 5038, so just open a tcp socket connection to port 5038; the port and ip the manager listen to can be changed in manager.conf.

Cheers.

Marco Bruni
marcobruni.net