IAX and seperate outbound accounts

Hi,

I have three inbound numbers setup with my VoIP provider which are working fine, but when I make a outbound call only one is used as the CLI. With my provider and can have each number on its own account so that I can specify which CLI should be associated with each account. How do I configure Asterisk so that it will choose the correct outbound account. In my extensions.conf I have[voip-talk] exten => _0[1-9].,1,Dial(IAX2/XXXXXXX@voiptalk/44${EXTEN:1}) exten => _00.,1,Dial(IAX2/XXXXXXX@voiptalk/${EXTEN:2}) exten => _09XX,1,Dial(IAX2/XXXXXXX@voiptalk/${EXTEN})
and then in iax.conf I have[voiptalk] type=peer username=XXXXXXX secret=XXXXXXXX host=XXXX.XXXXX.XXXX disallow=all allow=g729 allow=gsm allow=ulawAny help greatfully appreciated.

All three numbers from your carrier sent over the same account ? If yes you need to speak to them. If not you will need to create the three accounts in iax.conf and use the one you want based on what CID that you want.

Yes, two of my numbers are on a SIP type of account and the other is on IAX. All numbers are routed to by Asterisk server. I have asked them to split my other two numbers onto their own IAX account. I will then setup seperate accounts in IAX.conf with the different username and secret, but my question really is how do I tell Asterisk in the dialplan to use each one. Is it something like[voip-talk] exten => 1000,_0[1-9].,1,Dial(IAX2/XXXXXX@voiptalk/44${EXTEN:1}) exten => 1000,_00.,1,Dial(IAX2/XXXXXX@voiptalk/${EXTEN:2}) exten => 1000,_09XX,1,Dial(IAX2/XXXXXX@voiptalk/${EXTEN}) exten => 2000,_0[1-9].,1,Dial(IAX2/ZZZZZZ@voiptalk/44${EXTEN:1}) exten => 2000,_00.,1,Dial(IAX2/ZZZZZZ@voiptalk/${EXTEN:2}) exten => 2000,_09XX,1,Dial(IAX2/ZZZZZZ@voiptalk/${EXTEN})

You can set like a prefix:

[voip-talk]
exten => _*10[1-9].,1,Dial(IAX2/XXXXXX@voiptalk/44${EXTEN:3})
exten => _*100.,1,Dial(IAX2/XXXXXX@voiptalk/${EXTEN:4})
exten => _*209XX,1,Dial(IAX2/XXXXXX@voiptalk/${EXTEN:2})
exten => _*20[1-9].,1,Dial(IAX2/ZZZZZZ@voiptalk/44${EXTEN:3})
exten => _*300.,1,Dial(IAX2/ZZZZZZ@voiptalk/${EXTEN:4})
exten => _*309XX,1,Dial(IAX2/ZZZZZZ@voiptalk/${EXTEN:2})

I put in *1, *2, and *3. I then have the system take it out later. You will also change voiptalk to what ever peer name you want to use for the outbound calls. Also IAX does have issues when you want to use two separate accounts in iax.conf from the same carrier.