Poll: SIP: do you need to register first?

SIP phones on dynamic IPs must register w/asterisk before making calls

  • Yes
  • No

0 voters

Test your knowledge

Of course. If the phone isn’t registred, how can the phone know how is his proxy server?
Of course, the phone have to register first!

C’mon people, 100+ views and only 4 votes ?
btw: the correct answer will be announced on 8/1/2011.

[quote=“gnu”]Of course. If the phone isn’t registred, how can the phone know how is his proxy server?
Of course, the phone have to register first![/quote]

If the phone doesn’t know the identity of the proxy, in practice it won’t know the address of the registrar!

The real answer is more complex.

The phone doesn’t need to register in order to make outgoing calls.

In principle it needs to register in order to receive incoming calls.

The former is complicated because some phones and some servers may not play fair in this case (e.g. you may find you need to provide a full SIP URL, not just a phone-number like user name).

The latter is complicated by workarounds for commercially imposed dynamic IP restrictions. If the entity making the last hop towards the phone (which could be another phone, not just a PABX or proxy), has a domain name, registration should not be necessary. This is subject to caching policies at the last hop originating end, and where ISPs deliberately change addresses on live connections, to the response time of any dynamic DNS server update.

I believe that Asterisk caches DNS lookups when it parses sip.conf, so I think that specifying host= with a dynamic DNS name will fail if the address changes after the last sip.conf reload.

An example of an incoming call without registration is an outgoing (sic) call from Windows Messenger. It sends a request to the remote side using its proprietary protocol and the far end then sets up a SIP session in the reverse direction.

I’m also told that if you leave phone exposed to the internet, either explicitly, or because the firewall thinks it is the right place for port 5060, you are likely to get silent calls in the middle of the night.

Let’s not complicate the issue. The question is really simple. The phone is defined with

Does the phone need to register before placing an outgoing call through asterisk ?

Assuming the phone has no objections, that depends on the settings of allowguest and type.

If type=peer and allowguest is no, I believe registration is necessary.

I assume the answer you are looking for is no.

No, I am looking to help people understand the issue. You are getting pretty close, but you only covered a very specific case.
To make things easier, I can disclose that none of the options in the poll is the correct one :smiley:
The reality is a little bit more complex than a simple Yes/No choice.

Time to publish the answer.

The setting allowguest is irrelevant.

The answer depends on type(peer/friend):

peer - yes
friend - no

Now if someone could tell me why type=friend is splattered all over asterisk docs …