I have a very basic test PBX set up with no external trunks and two chan_pjsip extensions configured (000 and 001) and am using the following sequence via AMI to originate a call to extension 001 from extension 000:
Action: login
Events: off
Username: (Obfuscated)
Secret: (Obfuscated)
This sequence works perfectly on the SNG7-PBX-64bit-1904 distro but when I try the same thing on a SNG7-PBX-64bit-1910 distro I get a response incorrectly claiming that the extension does not exist:
Response: Error
Message: Extension does not exist.
Both installations are configured identically and have the default modules enabled and the SIP devices can call each other (when registered with the appropriate instance of freepbx, of course)
I’ve tried adding an explicit context to the extension number (i.e. 001@default ) and also specifying the context as from-internal but nothing seems to persuade AMI that extension exists.
As a newcomer to Asterisk and VOIP in general It’s quite likely I’ve missed something blindingly obvious which hopefully someone can point out for me.
I had to run the command directly from the CLI for some reason but the result indicated that the default context isn’t used on FreePBX. (at least not on the 1910 distro - I suspect the 1904 distro will report otherwise when I check it later)
After turning on logging and initiating a call manually on the SIP phones I’ve been able to determine that I need to use the from-internal as my base context and for the channel context but not the extension.
I can’t imagine a world where extension ‘000’ and ‘001’ are going to work for you in the long term. There are just SO MANY things that are going to just never work right.
I always recommend that you use extension numbers that are three digits and start with 3, 5, 6, 7, 8 (so 3xx, for example) or four digit starting with anything but 0,1 or 9 (2xxx-8xxx).
Note this just experience speaking, so feel free to do whatever makes you happy, but I’ve never had a problem using my method.
You’re quite right, 000 and 001 aren’t a great choice for a practical system.
I my case there were only ever going to be two extensions on this test system and no trunks so I stuck with the extension numbers from the code sample I based my code on.