How to set up inbound and outbound

Questions and discussion related to the FreePBX GUI interface.

How to set up inbound and outbound

Postby Roakusfm » Wed Oct 19, 2011 4:22 pm

Hello friends,
I am Roakus and I am a new in Asterisk. I have sip/trunk account from mydivert.com and I have 4 extension, So how can I do if extension 1 is busy the the next call ring on extension 2 and till extension 4. And at the same time, I can use to make calls. I have this kind of sip device: Grandstream 2020, Fritxbox and 2 linksys PAP2.

I will be very happy if someone could help me. I am doing this set up for my Internet Radio
Roakusfm
Newsterisk
 
Posts: 21
Joined: Wed Oct 19, 2011 3:40 pm

Re: How to set up inbound and outbound

Postby eg » Thu Oct 20, 2011 5:09 am

Hello Roakus,
Try to use Follow me or Ring Group module, with Ring Strategy: ringallv2
: ring primary extension for initial ring time followed by all additional extensions until one answers

I hope it will help.
Jox.
eg
Oldsterisk
 
Posts: 51
Joined: Fri Mar 26, 2010 3:49 am

Re: How to set up inbound and outbound

Postby Roakusfm » Thu Oct 20, 2011 11:00 am

Hello eg,
How are you? Well, thanks for your help.


Hello Roakus,
Try to use Follow me or Ring Group module, with Ring Strategy: ringallv2
: ring primary extension for initial ring time followed by all additional extensions until one answers

I hope it will help.
Jox.


It was working fine but this is not the way I want. Because the one you show me, all of the extension was ringing.... But I want like: I will use only 1 phone number. For example, if you call me on this +3255555556, then extension 1 will ring, then i pick and we are talking and another person also call the same +3255555556, then it will ring on extension 2 and till extension 4. You got my point?
Thanks. Any help
Roakusfm
Newsterisk
 
Posts: 21
Joined: Wed Oct 19, 2011 3:40 pm

Re: How to set up inbound and outbound

Postby eg » Fri Oct 21, 2011 2:39 am

Hello Roakus,
I'm fine, thank you,

Have you tried this Ring Strategy
firstavailable: ring only the first available channel
firstnotonphone : ring only the first channel which is not offhook - ignore CW
It will search first available extension from first one by one , I think it's how you wished.

I hope this will be helpful,
Jox.
eg
Oldsterisk
 
Posts: 51
Joined: Fri Mar 26, 2010 3:49 am

Re: How to set up inbound and outbound

Postby Roakusfm » Fri Oct 21, 2011 2:17 pm

Eg, Thank you very much, We have done it. I try it so many time and even, I format the server and started everything new.. But finally, Is done but it has left one problem, extension to extension work fine but If I can my sip provider number, it ring but if i pick up, I can hear from the mobile and the mobile can not hear from me.

My ip trunk is online and its Registered. This is the information provider gave to me:

This configuration example assumes that your Asterisk server is on a private IP address behind NAT. If your Asterisk is behind NAT it must be setup to work behind NAT, i.e it should send it's private IP address in the contact field. This way the mydivert.com server knows that the respective peer is behind NAT and it can send back the packet properly.

With this configuration, Asterisk uses the address defined by externip for all calls to the peers configured with nat=yes. The addition of qualify=yes causes Asterisk to test the connection frequently so that the NAT translations are not removed from the firewall. With these two commands, there always will be a communications channel between Asterisk and the peer, and Asterisk will use the outside address when sending SIP messages.

To configure Asterisk with mydivert.com please make the following replacements in the sip.conf and extensions.conf examples given below:

SIPUSERNAME = Your SIP account username
SIPPASSWORD = Your SIP account password
LOCAL-IP = Your asterisk LOCAL IP address (example: 192.168.1.0/255.255.255.0)
PUBLIC-IP = Your PUBLIC IP address (example: 200.43.215.194)

The configuration for Asterisk (sip.conf) should look very simlar to this :

[general]
context = default
disallow = all
allow = ulaw
allow = alaw
maxexpiry = 120
defaultexpiry = 90
allow = g729 ;a license from digium will be required if transcoding g729 to other codecs, else disallow g729
trustrpid = yes
sendrpid = yes
nat = yes
bindport = 5060
externip = PUBLIC-IP
localnet = LOCAL-IP
useragent = Asterisk

register => SIPUSERNAME:SIPPASSWORD@sip.mydivert.com/SIPUSERNAME

[mydivert]
fromuser = SIPUSERNAME
username = SIPUSERNAME
authuser = SIPUSERNAME
secret = SIPPASSWORD
insecure = port,invite
dtmf = rfc2833
disallow = all
allow = g729
allow = ulaw
allow = alaw
type = friend
host = sip.mydivert.com
nat = yes
;force keep-alives with qualify=yes
qualify = yes
;here we state the context for incoming calls on the mydivert.com channel. we need to set this up also in extensions.conf
context = from-mydivert

;this could be your extension - your voip phone using mydivert.com
;[8000]
;insecure = no
;canreinvite = no
;regexten = 8000
;dtmf= rfc2833
;context = sip-phone
;host= dynamic
;type= friend
;username = 8000
;secret = 1234
;nat= yes
;qualify = yes

In extensions.conf you need to setup the context and routing. It would look something like this:

[general]
autofallthrough=yes

[globals]

[default]

[from-mydivert]
;this is the context we need to setup to receive incoming calls
;first is the default extension that calls arrive on.
exten => SIPUSERNAME,1,Answer
exten => SIPUSERNAME,2,Dial(SIP/8000)
exten => SIPUSERNAME,3,Hangup

;if you have SIP trunking enabled for your account calls will arrive with DID invites.
;You then add each DID in this context with routing. example DID number 15166179421
;exten => 15166179421,1,Answer
;exten => 15166179421,2,Dial(SIP/8000)
;exten => 15166179421,3,Hangup

;this is the context of your extension voip phone dialing into asterisk and placing an outgoing call
;[sip-phone]
;exten => _X.,1,Answer
;if you have caller-id 'set by equipment' enabled you can set the CID for the outgoing call via the mydivert.com trunk.
;If not, then the mydivert.com server will set CID for you.
;exten => _X.,2,Set(CALLERID(name)=15166179421)
;exten => _X.,3,Set(CALLERID(num)=15166179421)
;exten => _X.,4,Dial(SIP/${EXTEN}@mydivert,30,Tt)
;exten => _X.,5,Hangup


and I have done with this code:

register => SIPUSERNAME:SIPPASSWORD@sip.mydivert.com/SIPUSERNAME

[mydivert]
fromuser = SIPUSERNAME
username = SIPUSERNAME
authuser = SIPUSERNAME
secret = SIPPASSWORD
insecure = port,invite
dtmf = rfc2833
disallow = all
allow = g729
allow = ulaw
allow = alaw
type = friend
host = sip.mydivert.com
nat = yes
;force keep-alives with qualify=yes
qualify = yes
;here we state the context for incoming calls on the mydivert.com channel. we need to set this up also in extensions.conf
context = from-mydivert


Someone should help me. Thanks
Roakus
Roakusfm
Newsterisk
 
Posts: 21
Joined: Wed Oct 19, 2011 3:40 pm

Re: How to set up inbound and outbound

Postby Roakusfm » Fri Oct 21, 2011 2:18 pm

I dont know where to put the rest of the code.
Roakusfm
Newsterisk
 
Posts: 21
Joined: Wed Oct 19, 2011 3:40 pm


Return to AsteriskNOW - FreePBX GUI

Who is online

Users browsing this forum: No registered users and 0 guests