I’ve been using pretty recent Asterisk versions, I’m pretty sure I was at Asterisk 16 LTS on FreePBX 14 and on the same version (initially) on FreePBX 15. Tried all available versions to fix this, didn’t help.
I’ve now studied the “manager set debug on” logs a bit more closely:
When I only set Context: from-internal the “Action: Originate” command comes with the correct context “from-internal”, but the Newchannel Event which follows is then in “Context: default”. Which it should not be!
As I understand this, “Events” come from the Asterisk/FreePBX system while the “Action:” comes from the client. So this is not something that TAPI for Asterisk is sending.
NOT WORKING EXAMPLE:
<— Examining AMI action: -->
Action: Originate
Channel: local/18
Context: from-internal
Exten: 08003301000
Priority: 1
Async: 1
CallerID: "PC (TAPI) "<>
ActionID: 30-srv0000024B71E10727
Variable: ORIGINATE_VAR_CALLER_ID=18
ACTUALLY WORKING EXAMPLE WITH CONTEXT SPECIFIED TWICE:
<— Examining AMI action: -->
Action: Originate
Channel: local/18@from-internal
Context: from-internal
Exten: 08003301000
Priority: 1
Async: 1
CallerID: "PC (TAPI) "<>
ActionID: 20-srv0000024B71E10727
Variable: ORIGINATE_VAR_CALLER_ID=18
When the TAPI driver sends the PBX an Action: Originate in context: from-internal and then the PBX responds with an event in context default, this looks A LOT like a bug in the PBX.