Outbound call to local numbers when anyone call from softpho

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

Outbound call to local numbers when anyone call from softpho

Postby rahixccr » Sat Jan 02, 2016 9:46 am

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 -
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?
rahixccr
Newsterisk
 
Posts: 1
Joined: Sat Jan 02, 2016 9:43 am

Re: Outbound call to local numbers when anyone call from softpho

Postby jcolp » Mon Jan 04, 2016 7:29 am

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] http://www.asteriskdocs.org/en/3rd_Edit ... y_id291246
Joshua Colp
Digium, Inc. | Senior Software Developer
jcolp
Oldsterisk
 
Posts: 248
Joined: Tue May 19, 2015 6:59 am


Return to Asterisk Support

Who is online

Users browsing this forum: No registered users and 1 guest