AMI Originate Issue

Home » Asterisk Users » AMI Originate Issue
Asterisk Users 1 Comment

Hi, I’m getting an issue while executing AMI Originate. I’m getting “extension does not exists” on Originate’s Response, and on the other hand Asterisk CLI say “fwrite() returned error: Broken pipe”
Please suggest me what is wrong.

Muhammad Faheem

### my originate code block …
———————————————————————————————

One thought on - AMI Originate Issue

  • I don’t use that particular AMI library so there may be other issues at work here. However, some things do jump out:

    1) You’re originating a Local channel to 11223344, but you haven’t specified the context. While that *should* hit [default], it’s usually a good idea to specify both extension and context, i.e., Local/11223344@default

    2) Local channels are always created in pairs. You’ve directed that the other half of the Local channel pair enter the dialplan in the [users]
    context at extension 100, priority 1. Does that exist in your dialplan?
    If not, that would probably be the cause of your problem.

    3) The broken pipe is most likely from the call to ‘disconnect’ in your AMI library. I would suspect that is terminating the TCP connection while Asterisk is attempting to write an Event, causing the fwrite call to fail. Either you or the library should probably be logging off using the “Logoff” action prior to breaking the connection.

    Note that you can always simulate what will occur when AMI performs an Originate action by using the ‘channel originate’ CLI command.

    Matt