Dialed number in Queue

Hi,
I have 2 gateways which incoming calls go to them.
I want to use them in Round-Robin mode and I set a Queue
But I don’t know how top pass Dialed Extension to this Queue.
I set :

exten => _9891.,1,Ringing
exten => _9891.,n,Queue(sample)

AND

[sample]
member=>SIP/${EXTEN}@sip-user
member=>H323/${EXTEN}@h323-user

But I see they send String “${EXTEN}” as dialed number.

you must add this line in your queue.conf after context

strategy = roundrobin

and change ${EXTEN} to your information in sip.conf or … and remove @sip-user and @h323-user

for exampel :

queue.conf

[sample]
strategy = roundrobin
member=>SIP/132
member=>SIP/Jane

sip.conf

[132]
type=friend
username=132
host=dynamic
nat=yes
secret=yoursecret
context=yourcontext
disallow=all
allow=all
callerid=For test (132)

[Jane]
type=friend
username=jane
host=dynamic
nat=yes
secret=yoursecret
context=yourcontext
disallow=all
allow=all
callerid=For test (jane)

Thanks for your reply.
In my system peers are gateways which must dialout .
For example a call come to my system “1818xxxxxx” and must go to gateway1 or gateway2 to dialout “1818xxxxxx” so I must have the dialed number.
I think in given solution dialed extension wont pass.

for this usage if you want to dial to external number you can use iax adapter and register from it in server and send incoming call to that

Hi
Thanks again
I need round-robin not static routes.

you can call to iax adapter with queue

member=>IAX2/youriax