AMI : Originate command and SIP issue


I am an Asterisk Newbie.
I am trying to originate a Call to an internal extension 1007 no as below,


but after submitting the command I can see a Warning in Asterisk CLI as channel.c:5681 __ast_request_and_dial: Unable to request channel SIP/1006 and command returns

Response: Error
Message: Originate failed

My sip.conf



also please note the below sip show peers command output
Name/username Host Dyn Forcerport Comedia ACL Port Status Description
1006 (Unspecified) D Yes Yes 0 Unmonitored
1007 (Unspecified) D Yes Yes 0 Unmonitored
2 sip peers [Monitored: 0 online, 2 offline Unmonitored: 0 online, 2 offline]

Please advice me how to resolve the issue?

The device needs to register, so that Asterisk knows its IP address, before you can call it. In fact none of your SIP peers are registered.

Note that the originate and AMI involvement are unnecessary complications to this scenario. Get it working with a simple device to device dial first.

I am newbie, so can you please provide the steps for registering the SIP peers

That is dependent on the device itself. You have to configure it, and each are configured differently.

register both users 1006 and 1007 in different systems using softphones.

check whether both are registered with your asterisk box.

Also verify in extensions.conf for below lines before dialing after registration is successful.

exten => 1006,1,Dial(SIP/1006)
exten => 1007,1,Dial(SIP/1007)

and have a module reload from your asterisk console.

I am not using any SoftPhone, I tried the AMI command originate using telnet, in this scenario how can I register a SIP without using SoftPhone

You can’t. SIP is a protocol for connecting VoIP devices, you need to connect SOMETHING such as a physical device or a softphone. Originating means to create an outgoing call to something and send it into Asterisk. You can’t create the outgoing call because there is nothing to call.