Can't use Originate command to link 2 remote numbers

I’m trying to use the Originate command to initiate a call between 2 external numbers.

It works perfectly when the first number is a local extension but I can’t make it work with a remote number.

I’m using Asterisknow (Asterisk 1.4.9) with 2 local extensions and a remote SIP voip provider defined on trunk_2, basically nothing changed by hand in the default Asterisknow configuration.

Here is my command:

Action: Originate
Channel: SIP/04xxxxxx78@trunk_2
WaitTime: 30
Exten: 04xxxxxx66
Priority: 1
ActionID: 123456

It does call the first number 04xxx78 but then when I answer on that number it doesn’t call the second number but I hear a automatic answering machine local to asterisk.

If I do the following:

Action: Originate
Channel: SIP/50
WaitTime: 30
Exten: 04xxxxxx66
Priority: 1
ActionID: 123456

If works well but in that case 50 is a local extension. When I pick up 50, it will call 04xxxxxx66 as I wanted.

Thanks in advance for your help getting the first case to work.

Regards
Daniel

Try adding the context that can reach the outbound number. For Example:

Action: Originate
Channel: SIP/04xxxxxx78@trunk_2
Context: outbound_context
Exten: 04xxxxxx66
Priority: 1
Async: True

Thanks, that was the issue.

Daniel