Control the context of the channel used in originate actions


I have an originate action below.

Action: Originate
Channel: SIP/9721231234
Context: default
Exten: internal
Priority: 1
Callerid: 3125551212
Timeout: 30000

How can I force the channel of the originate action to use the following context? Thanks.
exten => _972XXXXXXX, 1, dial(SIP/${EXTEN}, 30)


It doesn’t work that way. You don’t define the context of the channel, you just define where it’s going - to specific context and extension, or to an application.


If you must use a directory number, rather than a device address, you need to use the Local channel.