0
votes

After installed asterisk in centos6.4, and set it up successfully, I tried to create a sip client(using zoiper) from the other computer to connect to that asterisk server (they are under the same wifi network).

here are the sip.conf file:

[general]
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
qualify=yes
context=test
[1001]
type=friend
secret=test
host=dynamic
nat=yes
[1002]
type=friend
secret=test
host=dynamic
nat=yes

And extensions.conf:

[default]
exten => _.,1,Hangup()

[test]
exten => 1001,1,Dial(SIP/1001)
exten => 1002,1,Dial(SIP/1002)

After start asterisk server, I am configuring user 1002 in the other computer to connect to asterisk, the phone tool used is Zoiper, the settings: Domain: 192.168.0.14 (my asterisk server ip in LAN). username: 1002, password: test. Everything looks fine. Even use the web data capturing tool, I can see there are outgoing request like : SUBSCRIBE sip:[email protected];transport=UDP. But the status just remains in registering, can anyone tell me where I am wrong?

1

1 Answers

0
votes

You need

1) setup asterisk nat acordinly, for that use this article: http://www.voip-info.org/wiki/view/Asterisk+SIP+NAT+solutions vital settings fro this situation is localnet=.

2) Change to nat=no in peer settings. If you set nat=yes, asterisk will try detect external ip and use it when communicating with your phone.