Dial external number using an extension

First of all I’m sorry if i’m posting in the wrong topic, I’m new and don’t know exactly the structure of topics here.
Second, i’m also sorry if my question is already solved but i did search and found nothing. is either i’m using the wrong terms or really nobody discussed the problem that I’m facing. So here it is:
I have a wellgate pstn gateway(really dumb one) wich provides 2 fxo’s. thing is that the gateway is registering in asterisk as extension, so i have to dial that extension(2 extensions, one for each fxo) to get dialtone and then dial the number.
I would like to NOT having to dial that extension, wait for the dialtone and dial the number but rather us that extension like a trunk sort of. That is, somehow include it in a dial pattern so i can skip the ‘waiting for dialtone’ phase.
Any link to some documentation or procedure to achieve that will be greatly appreciated.
Thank you very much.

You can only register with Asterisk as a device.

Normally when dialling through a SIP gateway you would use SIP/@

Where <…> has the BNF meaning.

If it doesn’t work that way, you will need to consult the suppliers of the gateway.

PS Don’t pre-apologise. If you have doubts about being in t he right place explain why you are here and what searches you have done already.

[quote=“david55”]You can only register with Asterisk as a device.

Normally when dialling through a SIP gateway you would use SIP/@

Where <…> has the BNF meaning.

If it doesn’t work that way, you will need to consult the suppliers of the gateway.

PS Don’t pre-apologise. If you have doubts about being in t he right place explain why you are here and what searches you have done already.[/quote]

Thanks for the answer. If i understend correctly i have a pstn gateway not a sip gateway. In it’s own configuration i can configure the asterisk’s ip in proxy address then the user and password as predefined(by me) in asterisk. the gateway registers within asterisk and it’s available as a normal extension. internally it does some mapping between that voip part and the fxo it has. I cannot define a sip trunk in asterisk and have it log on in the gateway because it does not have such an option. it’s the other way around, the gateway needs to register, it initiates registration to asterisk.
So, in asterisk I defined sip extension 111 and gave the gateway the login info. it registered. now when i dial 111 from another extension there is a short ring then i get the dialtone from the pstn line connected on the gateway fxo and i can start dialing the actual external number(i think is DTMF at this stage). What I want is to be able to define a route so when it is hitted to dial that 111 extension and pass the $OUTNUM$(external number to be dialed).
The google search did not came with any similar scenario probably because i can’t think of correct keywords. for example i searched for ‘asterisk dial using a internal extension’ did not yeld something similar to my condition, obviously my words were not chosed properly. What i managed to grasp is that a custom trunk may be used but i did not yet been able to find a dialstring that works. I obviously have little understanding of and dialplan concepts since up until now i had to do with analog pbx’s.
The gateway is a wellgate 3702B…i don’t think there’s anybody to talk to on their side.

up until now, i defined a custom trunk and set the custom dial string to
SIP/111,D(wwww$OUTNUM$)
it dials the 111 extension, i can hear the dialtone but the number itself is not passed on. I will keep working on that syntax.
this is in the output of asterisk, so something is clearly passed but probably not correct

Executing [s@macro-dialout-trunk:27] Dial(“SIP/101-00000070”, “SIP/111,D(wwww0788303121),300,”) in new stack
0788303121 is a example number that i dialed

Thanks to david55 i got the basic concept and some ideas as to how to approach the search for an answer. So the solution is like this:
I created a custom trunk with the Custom Dial String: SIP/,15,D(ww$OUTNUM$) and attached it to a route.
It works as i wanted.
Here is the post where i found the rest of the solution
viewtopic.php?f=1&t=8173&start=0
also my frontend is elastix and i used only the gui for the configuration.