the first thing to keep in mind- EXTENSIONS ARE NOT CHANNELS.
Asterisk considers an extension (something you dial) and a channel (somewhere to send the call) as two VERY different things. THis makes things complicated, but adds MUCH flexibility. You are correct, extensions are virtual. Channels are real. You call from one to the other by making extensions for them, ie
exten => 1234,1,Dial(SIP/1234,20) ; rings sip acct 1234 for 20sec
exten => 1234,1,VoiceMail(1234@context) ; voicemail for 1234@context
second- extensions.conf is your friend. This is where 99% of this will happen. I will make the following assumptions: You have correctly configured the X100 card as zap channel 1, which is in the context [x100-in] (zapata.conf). You have correctly set up your SIP service provider, which is defined in sip.conf under the [voipbuster] heading. You also have a dial-out context, from which one can make outgoing calls.
last- the way extensions.conf works is with contexts. Every call/channel is ‘in’ a context, and a user on that call/channel can punch in any extension in the context they are in, and any contexts include =>'d in it.
So on to extensions.conf
for the [x100-in] context, you would probably want some kind of IVR to greet callers. You use extension s for this (start). If they push a button to react to the IVR, then they are dialing an ‘extension’ and must be handled accordingly. Remember, extensions can exist for them to dial that the audio files don’t tell them about.
exten => s,1,Background(someaudiofile)
exten => s,2,Background(someotheraudiofile)
exten => 1,1,Dial(SIP/1234) ; they push 1
exten => 2,1,Dial(SIP/1235) ; they push 2
exten => 9999,1,VMAuthenticate(1234@context) ; if they push 9999, it prompts them for the password. They must enter mailbox 1234’s VM password to continue.
exten => 9999,2,DISA(no-password,dial-out) ; if they put in a password, it gives DISA (direct inward system access), AKA a dialtone. They are now in the dial-out context and can dial any extension in or included to the dial-out context. If dial-out allows a call to be made through voipbuster, they can now do it.
Then you could put something like
[dial-out]
exten => _011.,1,Dial(SIP/voipbuster/${EXTEN}) ; _ starting means it is a pattern which can match things. . at the end means ‘anything else’. So this will take any number that starts with 011, and send it to voipbuster.
exten => _1NXXNXXXXXX,1,Dial(SIP/voipbuster/${EXTEN}) ; dial any american style number through voipbuster (you may want to change that pattern to match Israel numbers)
The result of all this-
you can dial your x100 line, and when the thing picks up and starts playing messages, dial 9999. It will ask you for a password, put in your voicemail password for mailbox 1234. when you do this you will get a dialtone (which is being sent from *). You can then dial anything in dial-out, and as my example has it any number starting with 011 goes out through voipbuster, as does any 11 digit american style number. If you change that to your number style, then you can make long distance calls thru your cell and voipbuster to save money over dialing direct from your cell
Hope that helps!