- Code: Select all
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 -
- Code: Select all
[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?