Interoperability/Asterisk
From Snom User Wiki
Contents |
Overview
Asterisk is a complete PBX in software. It runs on Linux and provides all of the features you would expect from a PBX and more. Asterisk does voice over IP in three protocols, and can interoperate with almost all standards-based telephony equipment using relatively inexpensive hardware. Asterisk provides Voicemail services with Directory, Call Conferencing, Interactive Voice Response and Call Queuing. It has support for three-way calling, caller ID services, ADSI, SIP and H.323 (as both client and gateway). As SIP protocol is much simpler and doesn’t rule out any of the features required in the PBX world, nowadays many people prefer it. Basic SIP building blocks include, for example, SIP proxy and registrar. Asterisk can’t really be described as either of these. It is closer to a media gateway with SIP proxy/registrar- type features that make it possible to build a feature-rich PBX system (or network).
Asterisk was originally written by Mark Spencer of Digium dba Linux Support Services Inc. Code has been contributed from Open Source coders around the world.
All snom phone models can be used with Asterisk.
snom Asterisk support
snom phones are fully interoperabel with Asterisk. Please check our new Asterisk Support site for details.
Basic Asterisk configuration
The relevant files for SIP phones in Asterisk are sip.conf, extensions.conf and voicemail.conf.The configuration depend on the desired dial plan and usernames e.g. preference to use phone extensions as a usernames.
sip.conf
sip.conf describes some general SIP parameters and all the SIP devices in the Asterisk PBX system. Please check the Asterisk sample files that come with the software or see our sample file section.
extensions.conf
Extensions.conf describes the dialplan for the Asterisk PBX system. It can be used in many ways. Please check the Asterisk sample files that come with the software or see our sample file section.
voicemail.conf
voicemail.conf describes how all the mailboxes should behave. Please check the Asterisk sample files that come with the software or see our sample file section.
snom configuration for Asterisk interoperability
Basic configuration
In order to use snom phones with Asterisk, you will need to configure some SIP parameters.
- Call Completion : OFF
- Challenge Response on Phone: OFF
- Use user=phone: OFF
- Filter packets from Registrar: OFF
SIP Lines
- Go to the Identity/ Line page
- Fill in the name, account and registrar. Use Asterisk’s IP address in the registrar field. Do not configure the mailbox here.
SIP codecs
snom and Asterisk both support several codecs but unlike snom, a separate license is required for Asterisk when using g.729 codec (Contact Digium inc.)
Message Waiting Indication (MWI)
MWI also works with Asterisk. If someone has left you a voicemail, you will receive indication of this (MWI). In snom 3xx, this will be displayed in two ways: a yellow LED will blink and there will be an MWI on the display. This is cleared only when you check your voicemails (and delete them).
In order to set this scenario up, configure the following:
sip.conf: mailbox=<your Mailboxnumber> extensions.conf: exten => asterisk,1,VoiceMailMain()
Function keys
Intercom
Add to your extensions.conf
exten => 2400,1,Set(VXML_URL=intercom=true) exten => 2400,2,SIPAddHeader(Call-Info: sip:domain.de\;answer-after=0) exten => 2400,3,Page(SIP/snom1&SIP/snom2)
"domain" has to be replaced by your own used domain.
Shared Line
This isn't currently supported by Asterisk.
Extension Monitoring (BLF) & Call Pick-Up
Snom phones will only support this feature on unpatched Asterisk versions. See the requirements and possible implementation in our "Call Pick-Up" article.
Sample Files
Example 1: To reach your snom phone, you can, for example, have the following three lines for extension 910 in extension.conf:
extension.conf
exten => 910,1,Dial,sip/${EXTEN}|30
exten => 910,2,voicemail2,u910
exten => 910,102,voicemail2,b910
${EXTEN} is an internal variable. Here it means that
you are going to dial sip/910.
- Although it is also possible to use a username other than the extension number, using the extension number makes management and documentation a little easier.
- Details for 910 are in sip.conf:
sip.conf
[general] port = 5060 ; Port to bind to bindaddr = 0.0.0.0 ; Address to bind to A context = default ;Default for incoming calls disallow=gsm allow=alaw ; Allow a-law ;allow=g729 disallow=ulaw [910] type=friend (inbound and outbound calls accepted) secret=password_for_this_phone host=dynamic callerid=JOHN <910> defaultip=10.1.1.2 (will be used if not yet registered) dtmfmode=inband (use this with inband mode DTMF) ;dtmfmode=rfc2833 (use this with outband mode DTMF) mailbox=910 (Asterisk VM-system’s mailbox #) [maria] (here a name is used instead of #) type=friend secret=password_for_this_phone host=dynamic callerid=MARIA <916> defaultip=10.1.1.3 dtmfmode=inband mailbox=916 etc.
voicemail.conf
910 => 1234, John Fischer, support@snom.de
- 910 is the mailbox number.
- 1234 is the password.
- Using the mail address makes it possible to receive voicemails as a mail attachment (wav).
Example 2:
sip.conf
[general] context=default allowguest=no realm=snom bindport=5060 bindaddr=0.0.0.0 pedantic=no vmexten=voicemail disallow=all allow=ulaw language=en dtmfmode = inband ; Can be RFC2833 or INFO with version 5 subscribecontext = from-sip ; Moderatly important that it matches the context :) [123] type=friend context=from-sip secret=1234 host=dynamic mailbox=1234@context,2345 restrictcid=no
extension.conf
[from-sip] exten => 123,hint,SIP/123 ; I am testing the difference of before or after exten => 123,1,Dial(SIP/123) [intercom] exten => 601,1,SIPAddHeader(Call-Info: sip:192.168.20.1\; answer-after=0) exten => 601,n,Dial(SIP/101) [overhead-paging] exten => 602,1,Wait(1) exten => 602,n,SIPAddHeader(Call-Info: sip:192.168.20.1\; answer-after=0) exten => 602,n,Page(SIP/101&SIP/102&SIP/103&SIP/104&SIP/105|q)
Links
External
- (ip-phone-forum.de -german): Configuration of "Extension Monitoring & Call pickup" for * 1.2 / Konfigurationsanleitung der Funktion "Nebenstellen- Überwachung und Rufübernahme" für * 1.2
- (voip-info.org): Tweaks to make the SNOMS happier with Asterisk
- More information about supported features can be found at http://www.asterisk.org.
- Hardware for Asterisk can be purchased from Digium Inc.
- Asterisk Echo Cancellation
FAQ
- How to make Asterisk send INVITEs to trigger the phone for Intercom?
- Calling the mailbox from the phone does not work. How to solve this?
- Why is hotdesking not working with Asterisk?
- Why do I hear the echo of my own voice on some/ all outbound calls?
- Why is my phone asking for a password constantly?

