Passing through two SIP trunk

Hi all.

I have two sip trunk in the same asterisk. What I want, is to make a Passing between them.

If I dial 12xxx —> SIP TRUNK A —> SIP TRUNK B —> outgoing 12xxx

It’s can be done?

Sorry for my english!

I am not sure that I understand what you want. If you want the call to come in externally to Trunk A and then go out to Trunk B via the same number then just set that anything that comes in from Trunk A then just call it out on Trunk B.

yes, but how I do that? What you say is exactly what I want, but I don’t know how do that.

Just to be clear (because I am a bit on the tired side) you a have phone number that rings on A and then you want to send it out via B ?

Have a look at Disa:

My Dialplan would look something like this.

exten => s,1,Answer ;Answer the call
exten => s,2,Authenticate(1234) ; Make the user enter a password so that not just anyone can use it.
exten => s,3,DISA(no-password|outbound-b) ;Play the dialtone for the caller

Exten => _X.,1,Dial(SIP${EXTEN}@trunk_b) ; Make the call out through trunk b

You would set up trunk a to go to context inbound-a. In this context the call is answered, asks the caller for a password and the runs the disa command which plays a dial tone and waits for the user to enter a number. Disa then sends the call over to the context that I set in the options section of the disa command and sends out the call.

You will need to name the context and trunk as per your needs.