Lost: SIP Softphone to Phone VIA SIP Trunk

I’m having trouble cracking the code on dialing out via SIP Softphones.

I’m testing with Ekiga, and it registers to my asterisk server just fine.

I’ve got inbound calls from my SIP trunk routed directly to a voicemail recording system, works fine.

I make a ton of outgoing calls via call files, just fine.

The problem I’m having is that I can’t figure out how to dial out via the SIP phone. The examples I’ve seen are pretty basic:

[tutorial]
exten => 1234,1,Dial(SIP/ivan)
exten => 4321,1,Dial(SIP/test)

What I would like is for any softphone extension to be processed as:

exten => _####,1,Dial(SIP/${SIPTRUNK}/${DIALEDNUMBER})

Where I hard-code the outbound SIP Trunk, but capture the dialed number, I’m just unsure how the dialed number gets processed.

${EXTEN}

There should be examples in extensions.conf.sample

I hate when it’s so easy I overlook it. Much thanks!

This seems to work fine.

195 [home]
196 exten => _XXXXXXXXXX,1,Dial(SIP/Packet8-00/1${EXTEN})