[solved] Asterisk registered but no incoming/outgoing calls

Hi,
my Asterisk is able to register at the sip-provider, but it’s not possible to receive incoming calls or to place a call.

sip.conf

[general]
port = 5060
bindaddr = 0.0.0.0
context=sip-in
language=de
;dtmfmode=info
;realm=usergruppe@asterisk
;notifymimetype=text/plain
context =  sipout
qualify=no
disallow=all
disable=all
allow=alaw
allow=ulaw
allow=g729
allow=gsm
allow=slinear
srvlookup=yes
;maxexpirey=3600
;defaultexpirey=120
register => <user>:<pw>@217.10.79.9/<user>


[sipgate-out]
type=peer
insecure=very ; otherwise I get authentication errors
;permit = 172.26.209.130/29
;permit=sipgate.de
;nat=yes
nat=no
username=<user>
fromuser=<user>
fromdomain=sipgate.de
;fromdomain=217.10.79.9
secret=<pw>
host=sipgate.de
;host=217.10.79.9
qualify=yes
canreinvite=no
dtmfmode=rfc2833
disallow=all
allow=ulaw

;[sipgate-in]
type=peer
fromdomain=sipgate.de
;fromdomain=217.10.79.9
host=sipgate.de
;host=217.10.79.9
context=sip-in
nat=yes
disallow=all
allow=alaw
allow=ulaw
qualify=yes
canreinvite=no
dtmfmode=rfc2833


[200]; User1
type = friend
callerid="User1"<200>
context = meine-telefone
secret = 1234
host = dynamic
nat=never
;mailbox=200@meine-telefone

extensions.conf

[general]

[sip-in]
exten => <user>,1,Dial(SIP/200,20)

[sipout]
exten => _X.,1,Set(CALLERID(num)=<user>)
exten => _X.,2,Set(CALLERID(namIe)=<phonenumber>)
exten => _X.,3,Dial(SIP/${EXTEN}@sipgate-out,30,trg)
exten => _X.,4,Hangup

[meine-telefone]

;User 1
;exten => <phonenumber>,1,Dial(SIP/200,5)
exten => 200,1,Dial(SIP/200,5)
exten => 200,2,VoiceMail(200,u)
exten => 200,2,VoiceMail(200,b)

Any idea ?
Even with debug 10 it’s not possible to see any incoming traffic on the Asterisk.
I’ve checked with X-Lite and it’s working fine (possible to dial and to be called).

Thanks a lot in advance!

It might be a firewall issue. Is your Asterisk server sitting behind a firewall and does it have a NATed connection?

If so the firewall may need configuration and also the Astertisk server need some NAT config in sip.conf (i.e. setup localnet=, externip=, nat=yes, etc).

no, the Asterisk is not behind a firewall (even the linux firewall is shut down).
A notebook connected via the same switch works fine with X-lite. So I’ve installed X-Lite for linux and found that this does have the same problems as the Asterisk itself (so register is possible but nothing else).

Looks like a Linux-issue now. Any idea ? (although it’s the incorrect forum now).
Thanks a lot

sorry, my fault. Of course there is a Firewall. The Fritz-Box does have a buit-in one :blush:

I changed the environment:
Asterisk + X-Lite (V2.0 for testing purpose only) on Linux server. 2 laptops in same network both with Windows and X-Lite 3.0. All computers connected over the same switch to the router (Fritz-Box). The Windows phones are able to register and to call / to be called, but still everything on linux is not.
I think X-Lite 2.0 does have NAT problems, so I stopped testing with this. This is now my sip.conf

[general]
bindport=5060
bindaddr=0.0.0.0
language=de
disallow=all
disable=all
allow=alaw
allow=ulaw
allow=g729
allow=gsm
allow=slinear
srvlookup=yes
nat=yes
externip=fritz.fonwlan.box
localnet=192.168.178.0/255.255.255.0
stunaddr=stun.sipgate.net:10000
externrefresh=10
host=sipgate.de
register=><user>:<PW>@217.10.79.9/<user>
canreinvite=no
dtmfmode=rfc2833
qualify=yes
fromdomain=sipgate.de

[sipgate-out]
insecure=port,invite; otherwise I get authentication errors
username=<user>
fromuser=<user>
secret=<pw>
context=sip-out
type=friend

[sipgate-in]
context=sip-in
type=friend

Any idea ? I do not believe that this is any configuration issue on the firewall since the windows clients are working well… :question:

Try to disable the stun, remove this:

stunaddr:10000=stun.sipgate.net

and reload the config, after test, and paste the CLI output here.

I did now uncomment this line, did a sip reload in the CLI and tried to dial in. It still doesn’t work and there is no output in CLI.
After reload there was only
== Parsing /etc/asterisk/sip.conf: Found
== Parsing /etc/asterisk/users.conf: Found
== Parsing /etc/asterisk/sip._notify.conf: Found

On the webaccess from sipgate I can see a missed call and I received the announcement “the person you have called is temporarily not available. Please try again later…”

:question:

Try to see if any traffic comes in when call arrives, user wireshark or tcpdump

tcpdump -p 5060 -s0

I had similar strange effects with an ubuntu intrepid install and switched to Asterisknow, because i was to lazy to debug this. Btw. i had the same strange behavior with siproxd on this intrepid install. Looked like all port 5060 udp traffic went to /dev/null while the packets themselfs were visibly coming in when i looked with tcpdump…

it’s solved. See
http://forums.digium.com/viewtopic.php?t=66371

I decided to open a new thread because the problem was different now

Before I reconfigured, I set up my Linux completly new and installed Asterisk 1.6 (had 1.4 before). Several NAT issues are solved with 1.6