Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 5e53acd1b3df23ede19263100768fe3d > files > 5

asterisk-chan_unistim-0.9.4-1mdv2007.0.i586.rpm

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.

Install :
- This version works on asterisk stable 1.2.x
- tar xvjf chan_unistim-0.9.4.tar.bz2 && cd chan_unistim-0.9.4
- make && make install && make config (should work with a default install of asterisk)
- edit /etc/asterisk/unistim.conf
- start asterisk

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

Rebooting a Nortel phone:
- Press mute,up,down,up,down,up,mute,9,release(red button)

Extensions.conf :
The line=> entry in unistim.conf does not add an extension in asterisk. It will be used for the futur multiline support (useful for three way calling / transfer). If you want to call an unistim device you need :
- in unistim.conf :
[violet]
device=006038abcdef
line => 102

- in extensions.conf
exten => 2100,1,Dial(USTM/102@violet)
or if you use the standard extensions.conf from asterisk make samples :
exten => 2100,1,Macro(stdexten,2100,USTM/102@violet) 

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=
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

Wiki, Additional infos, Comments :
http://www.voip-info.org/wiki-Asterisk+UNISTIM+channels

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). Setup a VPN if you want to do that.
- 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 or 2. 0 is the default method, should work. 1 can be used on new firmware (black i2004) and 2 on old violet i2004.
- 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.

TODO :
- bridging. Beware, it's a dangerous feature with the picky RTP stack of i2004 phones. RTP peer must send packets with a precise timing (every 20ms, 160 bytes payload for G711).
- three way calling / multiple lines / transfer
- call history
- better codec negociation : if you enable g723/g729, although it works with asterisk in pass-thru, it's not great.
- reload config