The next step is to configure the phones themselves to communicate with Asterisk. The way we have configured the accounts in the SIP channel driver, Asterisk will expect the phones to register to it. Registration is simply a mechanism where a phone communicates "Hey, I'm Bob's phone... here's my username and password. Oh, and if you get any calls for me, I'm at this particular IP address."
Configuring your particular phone is obviously beyond the scope of this guide, but here are a list of common settings you're going to want to set in your phone, so that it can communicate with Asterisk:
- Registrar/Registration Server - The location of the server which the phone should register to. This should be set to the IP address of your Asterisk system.
- SIP User Name/Account Name/Address - The SIP username on the remote system. This should be set to demo-alice on one phone and demo-bob on the other. This username corresponds directly to the section name in square brackets in sip.conf.
- SIP Authentication User/Auth User - On Asterisk-based systems, this will be the same as the SIP user name above.
- Proxy Server/Outbound Proxy Server - This is the server with which your phone communicates to make outside calls. This should be set to the IP address of your Asterisk system.
When using chan_sip you can tell whether or not your phone has registered successfully to Asterisk by checking the output of the sip show peers command at the Asterisk CLI. If the Host column says (Unspecified), the phone has not yet registered. On the other hand, if the Host column contains an IP address and the Dyn column contains the letter D, you know that the phone has successfully registered.
In the example above, you can see that Alice's phone has not registered, but Bob's phone has registered.
For chan_pjsip you can use pjsip show endpoints.