dect
/
asterisk
Archived
13
0
Fork 0

Merge the code from asterisk/team/group/chan_unistim:

This introduces a new channel driver, chan_unistim, that supports the Unistim
VoIP protocol for Nortel phones.  The following models have been confirmed 
to work: i2002, i2004 and i2050.

(closes issue #8864)
Reported by: c_hans
Patches: 
      chan_unistim.patch uploaded by c (license 304)
      ustm_no_conf.diff uploaded by junky (license 177)
Tested by: c_hans, dbowerman, math, junky, loloski


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88368 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
russell 2007-11-02 20:56:12 +00:00
parent 5590a16c77
commit 5f0e53299f
5 changed files with 5805 additions and 0 deletions

View File

@ -305,3 +305,6 @@ Miscellaneous
It allows you to configure a prefix for auto-monitor recordings.
* Added support for running your dialplan by writing one in lua. See
configs/extensions.lua.sample for examples of how to do this.
* Added a new channel driver, chan_unistim. See doc/unistim.txt and
configs/unistim.conf.sample for details. This new channel driver allows
you to use Nortel i2002, i2004, and i2050 phones with Asterisk.

View File

@ -163,6 +163,10 @@ Paul Cadach - Bringing chan_h323 up to date, bug fixes, and more!
Voop AS - Financial support for a lot of work with the SIP driver and the IAX
trunk MTU patch
Cedric Hans - Development of chan_unistim
cedric.hans(AT)mlkj.net
=== OTHER CONTRIBUTIONS ===
John Todd - Monkey sounds and associated teletorture prompt
Michael Jerris - bug marshaling

5628
channels/chan_unistim.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,43 @@
;
; chan_unistim configuration file.
;
[general]
port=5000 ; UDP port
;keepalive=120 ; in seconds, default = 120
;public_ip= ; if asterisk is behind a nat, specify your public IP
;autoprovisioning=no ; Allow undeclared phones to register an extension. See README for important
; informations. no (default), yes, tn.
;[black] ; name of the device
;device=000ae4012345 ; mac address of the phone
;rtp_port=10000 ; RTP port used by the phone, default = 10000. RTCP = rtp_port+1
;rtp_method=0 ; If you don't have sound, you can try 1, 2 or 3, default = 0
;status_method=0 ; If you don't see status text, try 1, default = 0
;titledefault=Asterisk ; default = "TimeZone (your time zone)". 12 characters max
;maintext0="you can insert" ; default = "Welcome", 24 characters max
;maintext1="a custom text" ; default = the name of the device, 24 characters max
;maintext2="(main page)" ; default = the public IP of the phone, 24 characters max
;dateformat=1 ; 0 = month/day, 1 (default) = day/month
;timeformat=1 ; 0 = 0:00am ; 1 (default) = 0h00, 2 = 0:00
;contrast=8 ; define the contrast of the LCD. From 0 to 15. Default = 8
;country=us ; country (ccTLD) for dial tone frequency. See README, default = us
;ringvolume=2 ; ring volume : 0,1,2,3, can be overrided by Dial(), default = 2
;ringstyle=3 ; ring style : 0 to 7, can be overrided by Dial(), default = 3
;callhistory=1 ; 0 = disable, 1 = enable call history, default = 1
;callerid="Customer Support" <555-234-5678>
;context=default ; context, default="default"
;mailbox=1234 ; Specify the mailbox number. Used by Message Waiting Indication
;linelabel="Support" ; Softkey label for the next line=> entry, 9 char max.
;extension=none ; Add an extension into the dialplan. Only valid in context specified previously.
; none=don't add (default), ask=prompt user, line=use the line number
;line => 100 ; Only one line by device is currently supported.
; Beware ! only bookmark and softkey entries are allowed after line=>
;bookmark=Hans C.@123 ; Use a softkey to dial 123. Name : 9 char max
;bookmark=Mailbox@011@54 ; 54 shows a mailbox icon. See #define FAV_ICON_ for other values (32 to 63)
;bookmark=Test@*@USTM/violet ; Display an icon if violet is connected (dynamic), only for unistim device
;bookmark=4@Pager@54321@51 ; Display a pager icon and dial 54321 when softkey 4 is pressed
;[violet]
;device=006038abcdef
;line => 102

127
doc/unistim.txt Normal file
View File

@ -0,0 +1,127 @@
This is a channel driver for Unistim protocol. You can use a least a Nortel i2002, i2004 and i2050.
Following features are supported : Send/Receive CallerID, Redial, SoftKeys, SendText(), Music On Hold, Message Waiting Indication (MWI), Distinctive ring, Transfer, Threeway call, History, Forward, Dynamic SoftKeys.
How to configure the i2004 :
- Power on the phone
- Wait for message "Nortel Networks"
- Press quickly the four buttons just below the LCD screen, in sequence from left to right
- If you see "Locating server", power off or reboot the phone and try again
- DHCP : 0
- SET IP : a free ip of your network
- NETMSK / DEF GW : netmask and default gateway
- S1 IP : ip of the asterisk server
- S1 PORT : 5000
- S1 ACTION : 1
- S1 RETRY COUNT : 10
- S2 : same as S1
How to place a call :
- The line=> entry in unistim.conf does not add an extension in asterisk by default.
If you want to do that, add extension=line in your phone context.
- if you have this entry on unistim.conf :
[violet]
device=006038abcdef
line => 102
then use exten => 2100,1,Dial(USTM/102@violet)
- You can display a text with :
exten => 555,1,SendText(Sends text to client. Greetings)
Rebooting a Nortel phone:
- Press mute,up,down,up,down,up,mute,9,release(red button)
Distinctive ring :
- You need to append /r to the dial string.
- The first digit must be from 0 to 7 (inclusive). It's the 'melody' selection.
- The second digit (optional) must be from 0 to 3 (inclusive). It's the ring volume. 0 still produce a sound.
Select the ring style #1 and the default volume :
exten => 2100,1,Dial(USTM/102@violet/r1)
Select the ring style #4 with a very loud volume :
exten => 2100,1,Dial(USTM/102@violet/r43)
Country code :
- You can use the following codes for country= (used for dial tone)
us fr au nl uk fi es jp no at nz tw cl se be sg il br hu lt pl za pt ee mx in de ch dk cn
- If you want a correct ring, busy and congestion tone, you also need a valid entry in
indications.conf and check if res_indications.so is loaded.
language= is also supported but it's only used by Asterisk (for more informations
see http://www.voip-info.org/wiki/view/Asterisk+multi-language ). The end user interface of the phone
will stay in english.
Bookmarks, Softkeys
- Layout :
|--------------------|
| 5 2 |
| 4 1 |
| 3 0 |
- When the second letter of bookmark= is @, then the first character is used for positioning this entry
- If this option is omitted, the bookmark will be added to the next available sofkey
- Also work for linelabel (example : linelabel="5@Line 123")
- You can change a softkey programmatically with SendText(@position@icon@label@extension) ex: SendText(@1@55@Stop Forwd@908)
Autoprovisioning :
- This feature must only be used on a trusted network. It's very insecure : all unistim phones
will be able to use your asterisk pbx.
- You must add an entry called [template]. Each new phones will be based on this profile.
- You must set a least line=>. This value will be incremented when a new phone is registred.
device= must not be specified. By default, the phone will asks for a number. It will be added into
the dialplan. Add extension=line for using the generated line number instead.
Example :
[general]
port=5000
autoprovisioning=yes
[template]
line => 100
bookmark=Support@123 ; Every phone will have a softkey Support
- If a first phone have a mac = 006038abcdef, a new device named USTM/100@006038abcdef will be created.
- If a second phone have a mac = 006038000000, it will be named USTM/101@006038000000 and so on.
- When autoprovisioning=tn, new phones will ask for a tn, if this number match a tn= entry in a device,
this phone will be mapped into.
Example:
[black]
tn=1234
line => 100
- If a user enter TN 1234, the phone will be known as USTM/100@black.
History :
- Use the two keys located in the middle of the Fixed feature keys row (on the bottom of the phone)
to enter call history.
- By default, chan_unistim add any incoming and outgoing calls in files (/var/log/asterisk/unistimHistory)
It can be a privacy issue, you can disable this feature by adding callhistory=0. If history files were created,
you also need to delete them. callhistory=0 will NOT disable normal asterisk CDR logs.
Forward :
- This feature requires chan_local (loaded by default)
Generic asterisk features :
You can use the following entries in unistim.conf
- Billing : accountcode amaflags
- Call Group : callgroup pickupgroup (untested)
- Music On Hold : musiconhold
- Language : language (see section Coutry Code)
- RTP NAT : nat (control ast_rtp_setnat, default = 0. Obscure behaviour)
Trunking :
- It's not possible to connect a Nortel Succession/Meridian/BCM to Asterisk via chan_unistim. Use either E1/T1 trunks, or buy UTPS (UNISTIM Terminal Proxy Server) from Nortel.
Wiki, Additional infos, Comments :
- http://www.voip-info.org/wiki-Asterisk+UNISTIM+channels
*BSD :
- Comment #define HAVE_IP_PKTINFO in chan_unistim.c
- Set public_ip with an IP of your computer
- Check if unistim.conf is in the correct directory
Issues :
- As always, NAT can be tricky. If a phone is behind a NAT, you should port forward UDP 5000 (or change [general] port= in unistim.conf) and UDP 10000 (or change [yourphone] rtp_port=)
- Only one phone per public IP (multiple phones behind the same NAT don't work). You can either :
- Setup a VPN
- Install asterisk inside your NAT. You can use IAX2 trunking if you're master asterisk is outside.
- If asterisk is behind a NAT, you must set [general] public_ip= with your public IP. If you don't do that or the bindaddr is invalid (or no longer valid, eg dynamic IP), phones should be able to display messages but will be unable to send/receive RTP packets (no sound)
- Don't forget : this work is based entirely on a reverse engineering, so you may encounter compatibility issues. At this time, I know three ways to establish a RTP session. You can modify [yourphone] rtp_method= with 0, 1, 2 or 3. 0 is the default method, should work. 1 can be used on new firmware (black i2004) and 2 on old violet i2004. 3 can be used on black i2004 with chrome.
- If you have difficulties, try unistim debug and set verbose 3 on the asterisk CLI. For extra debug, uncomment #define DUMP_PACKET 1 and recompile chan_unistim.