Control the context of the channel used in originate actions

Hi,

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.
[outbound]
exten => _972XXXXXXX, 1, dial(SIP/${EXTEN}@sip.provider.com, 30)

Hi,

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.

Cheers.

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