UniFi VoIP - Asterisk: SIP Configuration

Overview


Readers will learn how to configure a SIP account in asterisk, and configure SIP settings in the UVP.

Creating an extension for the UVP on Asterisk


Typically, the file containing the extensions resides in /etc/asterisk/sip.conf. To add extension 100 you would have to add the following text snippet to this file:

 

[100]
type=friend
host=dynamic
disallow=all
allow=ulaw
qualify=1000
canreinvite=no
nat=force_rport
dtmfmode=rfc2833
context=from-internal
username=100
callerid=Your Name <100>
secret=password
dial=SIP/100 

To be able to call this extension you will need to hook it up to the corresponding dialplan. Normally, the file containing the dialplan resides in /etc/asterisk/extensions.conf. We would need to create the context from-internal which is what we specified as the outbound context for the SIP extension 100. 

[from-internal]
exten => 100,1,Dial(SIP/${EXTEN}|40|Ttr)

Configuring the UVP with SIP Settings


If you have not already followed the Initial Configuration steps in this article Standalone UniFi VoIP Phone Configuration Guide please complete these before continuing.  If you have any questions about the following settings or what they mean please refer to the article above in the SIP Configuration section. 

 

Minimum Asterisk SIP Configuration Requirements:

  • Server
  • User name
  • Password

 

Enter the SIP settings that you configured in asterisk above.

Server = Server IP(or hostname) for asterisk server

User name = SIP Username

Password = SIP Password(secret above)

UVPAccount-Asterisk.png

 

Asterisk log showing the UVP has registered.

    -- Registered SIP '100' at XX.XX.XX.XX:1024
[Jun  3 13:36:06] NOTICE[4093]: chan_sip.c:23522 handle_response_peerpoke: Peer '100' is now Reachable. (139ms / 5000ms)

 

Navigate back to the UVP App home screen and it should be connected and allow you to call if your asterisk server is set up for outbound calls(SIP, IAX, PRI, etc)

UVPHome-Asterisk.png

- UBNT-Devin

Powered by Zendesk