Asterisk manager Example: Originate

Asterisk Manager Example: Originate


Originate - Place a call from a device to an extension.


If the device (SIP/12345) is a phone, it will ring and when picked up the user will be connected to the extension (Context, Exten, Priority) dialed. If you fail to specify timeout it defaults to 30 seconds.

SEND:
ACTION: Originate
Channel: SIP/12345
Exten: 1234
Priority: 1
Timeout: 60000
Context: default


RECEIVE:
Event: Newexten
Channel: OutgoingSpoolFailed
Context: default
Extension: failed
Priority: 1
Application: SetVar
AppData: extension=failed
Uniqueid: 1124981514.58775

Event: Hangup
Channel: OutgoingSpoolFailed
Uniqueid: 1124981514.58775
Cause: 0


Response: Error
Message: Originate failed



Or, hopefully:
Event: Newchannel
Channel: SIP/12345-ed8f
State: Down
CallerID:
Uniqueid: 1124982019.19157

Event: Newchannel
Channel: SIP/12345-ed8f
State: Ringing
CallerID:
Uniqueid: 1124982019.19157

Event: Newstate
Channel: SIP/12345-ed8f
State: Up
CallerID:
Uniqueid: 1124982019.19157

Event: Newexten
Channel: SIP/12345-ed8f
Context: default
Extension: 1234
Priority: 1
Application: SetVar
AppData: extension=1234
Uniqueid: 1124982019.19157


Response: Success
Message: Originate successfully queued



Back

Created by: flobi, Last modification: Sun 22 of Feb, 2009 (17:28 UTC) by imcdona


Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+

Page Changes | Comments

 

Featured -

Search: