Trunk IAX sequential

Hi i have this problem.
I have 4/5 office in diversity location, any office have one server asterisk.
All office have a TRUNK IAX with server gateway ASTERISK.
The gateway have trunk SIP with the WORLD.
It is a possible have the trunk IAX in sequential occupation?

There are new news or ideas for my problem?

I don’t understand “sequential occupation”,

Asterisk has no difficulty with tandem trunks.

Asterisk does not use table driven routing, so routing policies can be complex.

I have first office with asterisk server and 4/5 offices with asterisk client.
I want the first call to 1 first client, second call to second client, third call to third client ecc ecc ecc
In this mode i have the load balance to call incoming to server

All Asterisk’s are both client and server. It is a client when initiating a call, and as server when terminating a call. With SIP, the roles can reverse mid call.

Use the Queue application with the rrmemory strategy.

I update and say my problem.
This is my files


maxlen = 0
timeout = 15
retry = 5

member => IAX2/gateway01:XXXX@${EXTEN}
member => IAX2/gateway03:XXXX@${EXTEN}
member => IAX2/gateway10:XXXX@${EXTEN}


exten => _39.,1,Queue(rotation)

I try with VM (virtual machine).
The call arrived on the GATEWAY but dont go to HOST

If i change the file queues.conf with other configuration, the arrived to HOST but dont find the context

member => IAX2/host01
member => IAX2/host03
member => IAX2/host10

How possible resolve the problem?

user@… and …/user are alternative syntaxes for the same thing; you can’t use both of them.

I don’t believe that dialplan variables are expanded by the Queue application (they would have to be processed at load time, when ${EXTEN} was not defined, anyway.

Indeed in regards to ${EXTEN}. It also has no meaning within the context of a queue member.

But i write

member => IAX2/host01
member => IAX2/host03
member => IAX2/host10

The call arrived to host but i have
Call rejected by No such context/extension
Call rejected by No such context/extension

You are not dialing a specific extension, so it is most likely defaulting to “s” (if I remember my chan_iax2 right). If that does not exist then you would see the exact rejection you see.

I dont understand if is a possible o there is impossible
When a call comes on GATEWAY the CALL go to HOST (01 o 02 o 03 o 04 o 05) with CALLERID
Now i work with one HOST with lswitch

You need to specify an extension in the IAX2/host01, IAX2/host03, etc. Example:


Would dial extension 1000 on host01.


The file extensions.conf is

exten => 1001,1,Dial(IAX2/gateway:XXXXXX@

But the EXTEN for the number?
In the HOST01 i have
Executing [1011@tohost01:1]

I’m not sure what your problem is currently then…

I have the GATEWAY with the trunk SIP connect with 5 HOST with IAX
The call arrived to SIP with the number 1111111111 and the queues select with rrmemory.
I try with the PLAY the voice and is work, rrmemory select all diversity.
When i change the PLAY with the TELEPHONE dont arrived the CALL with number.

I still don’t understand. You have to explicitly put a number to dial in the IAX2 dial string, or if you are using a Local channel as a queue member then it in there. You can’t use ${EXTEN} for queue members (if you are still trying to do that).

i want passing the number from GTEAWY to HOST

If you put a dialed number in the IAX2 dial string, it will go to the other side as the extension called.

What is the variable to use?

As a queue member there is no variable. You have to explicitly put an extension.

From the dialplan using Dial() ${EXTEN} will contain the current extension.