Associate ext. to a trunk / multiple ext on DeskPhone

Hallo

I would like to have a little help, i have some SNOM870 desk phones.


My setup is

Trunks:
Trunk A that have inbound route with DID no. 12121212 that goes in to Queue A + have outbound route A with same number in outbound CID
Trunk B that have inbound route with DID no. 13131313 that goes in to Queue B + have outbound route B with same number in outbound CID

chan_sip extention:
Ext. 12011(account 1) are agent in Queue A
Ext. 12012(account 2) are agent in Queue B

In my EndPoint manager i have made a template that set Line 01 to account 1 and Line 02 to account 2.
and line03 to speedial *45 account 01 så ext 12011 log in/out to queue A and line04 to speeddial *45, account 2 so that log in/out in queue B for ext 12012

under the ext 12011 i have set Outbound CID to and on 12012 to

Both outbound dial pattern are set thise valus under “matching values”:
0045XXXXXXXXX
+NNXXXXXXXXX
XXXXXXXXX

Question:
How do I make my set up when i activate line 01 so it use trunk A and when i activete line 02 it use trunk B

Old setup
In my old set up have made a 1* and 2* prefix in outbound to tricker the diffrent outbounds. but when i want to make redails i cant get out as the number in the desk phone dosent have 1* or 2* in front of it.

I got the problem solved after i changed the ext. to PJSIP account. every thing works very fine