tags:

views:

118

answers:

2

Hi,

I am using Asterisk 1.4 server and I have created a desktop client using the Asterisk.NET Library. I am able to log into the AMI (as a manager) using Asterisk.Net, but I cannot find a way to send the REGISTER command using the AMI, to share my client's location information with the server.

I want to know an AMI or a CLI command that can send a REGISTER request to the Asterisk Server.

Thanks

A: 

If you're trying to do a sip register you might want to use an actual sip client API.

What's your end goal in doing this?

kolobcreek
A: 

This is a fundamentally odd thing to be doing - a bit like looking for an API on a web server that lets you send an HTTP request to it. In many ways Asterisk is a voice analogue to a web server - the dialplan is a little like the Apache config directives that send incoming requests to different files, scripts, or services, AMI is rather like its command-line, AGI is similar conceptually to CGI (hint in the name!).

If you want to SIP-REGISTER something with your Asterisk server, just send a SIP REGISTER message with the right options to the Asterisk box's SIP interface. In AGI I suppose you could use the cURL() application to call localhost, but it would be a horrific hack and would probably break things.