Hello,
i’m facing problem with connecting to asterisk server which is installed on cloud virtual machine.
i’m novice to asterisk technology.There’s no problem for local asterisk server same network with SIP Client.Here is my sip.conf setting,
[general]
externip=
localnet=xxx.xxx.xx.xx/24
port=5060
nat=route
[user1]
type=friend
host=dynamic
secret=
context=users
permit=xxx.xxx.xx.xx/255.255.255.0
[user2]
type=friend
host=dynamic
secret=
context=users
permit=xxx.xxx.xx.xx/255.255.255.0
currently i used zoiper softphone to connect.
here is my zoiper setting,
domain=
username=user1
password=
user ID=user1
i think i still have problem with port forwarding and firewall setting on my cloud server.
appreciate for all kindly suggestion. 
Best Regard.
Hello.
Is Asterisk listening on a proper network interface?
Show the output of Linux command:
netstat -4ulpan
We don’t know the network topology. Any kind of NAT form either side - client or Asterisk ?
Use tcpdump to see what’s happening.
Assuming that Asterisk is listening on eth0 interface on port 5060 and client is trying to register from 11.22.33.44 ip address:
tcpdump -pni eth0 -As0 port 5060 and host 11.22.33.44
then show us the output. And we’ll see if there are no packets at all, or if Asterisk rejects packets.
I also recommend you to check:
wiki.asterisk.org/wiki/display/AST/Named+ACLs
, so, use deny=0.0.0.0/0.0.0.0 and then permit=11.22.33.44.
Do the same with parameters ‘contactdeny’ and ‘contactpermit’. Examples are in default sip.conf.
Also check if you have ‘alwaysauthreject=yes’ and ‘allowguest=no’.