Outbound call to local numbers when anyone call from softpho

I have a sip account which have a IP number/User name and the SIP host details. The number is able to connect to any of the Telephone/Mobile network. That means I can call to that number as a phone number. I have written in the sip.conf file -

register => 09678777240:Te$t240@203.76.96.85

[link]
type=friend
secret=Te$t240
username=09678777240
host=203.76.96.85
dtmfmode=rfc2833
canreinvite=no
disallow=all
allow=ulaw
allow=alaw
allow=gsm
insecure=port,invite
fromdomain=203.76.96.85
context=incoming


[1000]
type=friend
secret=123
dtmfmode=rfc2833
following line.
host=dynamic
canreinvite=no

And in the extensions.conf -

[incoming]
exten => _09678777240,1,Dial(SIP/1000,30,t,r)
exten => s,2,Hangup()

exten => 1000,1,Dial(SIP/1000)
exten => 1000,n,Hangup()

Now if anyone calls to the SIP IP phone 09678777240 from any local mobile or landline then I automatically get the call in my soft-phone where user with extension 1000 is registered. Now i need to do exactly the reverse method. That means if my soft-phone has registered extension (assume 1000) and i call to any local mobile or landline number then asterisk will use the DID number (09678777240) to deliver the call and the DID number will be charged. How can i write the dial plan?

You need to configure the dialplan with a pattern matching extension which directs it out the SIP connection. This is described in the Asterisk book[1].

[1] asteriskdocs.org/en/3rd_Edit … y_id291246