SIPGate calls in or out not bothway


#1

Hi.

I downloaded and installed Asterisk on a Mandrake Linux server and so far very impressed. However I have a problem that I just dont seem to be able to work out.

I have an account with Sipgate. First I managed to set up the PBX to receive incoming calls and pass them to extension 2001. Then I managed to get outgoing calls to the SIPGate test number 10000. However I dont seem to be able to configure the PBX to do both.

Here it a copy of my extensions.conf

[code]
[general]
static=yes
writeprotect=no

[globals]

[outboundfree]

exten => _910000,1,Dial(SIP/${EXTEN:1}@sipgate.co.uk,30,tr)
exten => _910000,2,Congestion

ignorepat => 9
include => default

[default]

exten => s,1,Dial(SIP/2001,20)
exten => s,2,Voicemail(u2001)

exten => 2001,1,Dial(SIP/2001,20)
exten => 2001,2,Voicemail(u2001)

exten => 2002,1,Dial(SIP/2002,20)
exten => 2002,2,Voicemail(u2002)

exten => 2003,1,Dial(SIP/2003,20)
exten => 2003,2,Voicemail(u2003)

exten => 2004,1,Dial(Sip/2004,20)
exten => 2004,2,Voicemail(u2004)[/code]

And the sip.conf with my user name and passwords masked:

[general]
context=default
port=5060
bindaddr=0.0.0.0
srvlookup=yes
register => nnnnnnn:AAAAAAAA@sipgate.co.uk/2001
externip = mydomain.com
localnet=192.168.0.0/255.255.0.0

[sipgate.co.uk]
type=friend
secret=AAAAAAAA
username=nnnnnnn
fromuser=nnnnnnn
authuser=nnnnnnn
host=sipgate.co.uk
nat=yes
canreinvite=no
fromdomain=sipgate.co.uk

[2001]
type=friend
secret=aster1sk
host=dynamic
username=2001
canreinvite=no
mailbox=2001
callgroup=1
pickupgroup=1
context=outboundfree

[2002]
type=friend
secret=aster1sk
host=dynamic
username=2002
canreinvite=no
mailbox=2002
callgroup=1
pickupgroup=1
context=outboundfree

[2003]
type=friend
secret=aster1sk
host=dynamic
username=2003
canreinvite=no
mailbox=2003
nat=yes
callgroup=2
pickupgroup=2

[2004]
type=friend
secret=aster1sk
host=dynamic
username=2004
canreinvite=no
mailbox=2004
nat=yes
callgroup=2
pickupgroup=2

Now, what happens is that with the above configuration I can make outging calls to the SIPGate test number 10000 by dialling 910000 from either extensions 2001 or 2002, however incoming calls are not connected.

If I comment out the [sipgate.co.uk] section of my sip.conf, then incoming calls are automatically routed to the extension 2001 as I would expect, but I cant make outgoing calls.

I guess I’m new and just not up to speed with things, but if tomeone could help it would be very much appreciated!

Thanks.
Stauart


#2

First off, use the search function on this forum (above) to find previous posts about sipgate configuration. Read those and see if that helps.

Secondly, read and copy exactly the asterisk config stuff on the sipgate help pages.

Thirdly, once you’ve tried all those things, if it still isn’t working, post what’s happened here.