Phone

From Freeside Atlanta
Jump to navigation Jump to search

Currently the phone system accepts incoming calls and make calls Cisco 7960 see Eldon or User:Msg4real for Help
The system has a Voicemail setup and -mails the BOD

Currently takes calls using the XMPP PROTOCOL and/or SIP

Phone System ON PI

To-Do

  • Change Voicemail Settings (send wav to someone)
  • Create IVR
  • Add A Custom Voicemail Greating
  • Add/Change Phone book (xml) (dir.php) (started )
  • Mount Phones into Workshop
  • Buy a 48v ~1.5 amp Power brick or 15.4W per phone (currently POE with Original brick) [add poe to phones]
  • Make E911 NOTICE for phone (and list of 911 numbers by phone)

Prerequisites

Supplies

  • Sip Phone (cisco sip)
  • Callcentric DID
  • Google Voice account
  • RasPI 2 w/ RASPBX
  • tftp (phone config)

What was installed

  • OSS module

Configure the GUI

  • setup extensions
  • add trunks
  • incoming routes
  • add outgoing routes
  • OSS endpoint manager allows for easier phone setup

Make files for phones

  • Place a logo on a web server as defined in the phone service man
  • Make directory (see links)


old way

It uses the Google Voice Bounce Back method Commonly used by others before XMPP was created. I have however after some careful research and configuring we should have Several XMPP Lines. However, there have been reports that google is turning XMPP off, They have or some other crap. It will happen but what most people are refering to is Google has been Changing the Login Security, and detects what we are doing as an insecure app in logging in. Thus we must go into setting and change to allow and someone must logon to the account once day to once every 2 months...

I have added XMPP calling on lines 3-5 and Line 2 is not configured correctly at this time stay tuned...

Prerequisites

Supplies

  • Sip Phone (cisco sip)
  • Debian Server
  • Callcentric DID
  • Google Voice account
  • Python 2.7 w/ setuptools and simplejson
  • pygooglevoice script
  • tftp (phone config)
  • apache2 (host directory and logo)

What was installed

  • python-setuptools
  • pygooglevoice script
  • tftp
  • apache2
  • asterisk 13

Installing Pygooglevoice

  • We Ran the below code at root mainly to insure the install of pygooglevoice-0.5.tar.gz
wget http://pygooglevoice.googlecode.com/files/pygooglevoice-0.5.tar.gz
tar zxvf pygooglevoice-0.5.tar.gz
cd pygooglevoice-0.5
python setup.py install
sed -i 's|https://www.google.com/accounts/ServiceLoginAuth?service=grandcentral%7Chttps://accounts.google.com/ServiceLogin?service=grandcentral\&continue=https://www.google.com/voice%7C' /usr/local/lib/python2.7/dist-packages/googlevoice/settings.py
sed -i 's|      galx.*|      galx = re.search(r\"name=\\"GALX\\" type=\\"hidden\\"\\
*value=\\"(.+)\\"\", content).group(1)|' /usr/local/lib/python2.7/dist-packages/googlevoice/voice.py 
  • Latter We installed asterisk 13 from source and Apache+php using the Package manager as well as the tftp server we decided on using.

Main Files

TFTP

The Main files here are:

  • dialplan.xml = dialplan on Phone ONLY
  • P0S3-08-12-00.load = Phone Firmware
  • XMLDefault.cnf.xml = All Cisco Phone config
  • SIP(MAC_HERE).CNF = Phone config
  • SipDEFAULT.CNF = All Cisco SIP Phones config
  • *.PCM and *.RAW are ringtones (config-ed in RINGLIST.DAT)

HTTP

  • NOTE: HTTP on cisco requires port usage in urls it will not assume port 80
  • The Directory is located here! and the directory is a simple XML file (freeside.php with xml headers) ever there is a limit of 32 entries be warned If we need more we will need to use a database and fetch from there using a different script
  • the Phone logo I also here

Asterisk Setup

We edited sip.conf and extensions.conf to our info. Adding a password to the phone and the correct Callcentric and Google info. Note: after editing the documents you must restart asterisk. After the asterisk server was up we set up the TFTP server with the config files for the phone and the ringtones.. the config file had to be added to to include the network IP of the TFTP server, the web-server and asterisk install and the creds. we gave this user in sip.conf

Files

Sip.conf

[notice] This is just where we started here for ref [/notice]

[general]
context=phone                 ; Default context for incoming calls
allowoverlap=no                 ; Disable overlap dialing support. (Default is yes)
bindport=5060                  ; UDP Port to bind to (SIP standard port is 5060)
externrefresh=60
localnet=192.168.1.0/255.255.255.0
udpbindaddr=0.0.0.0             ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes                   ; Enable DNS SRV lookups on outbound calls
canreinvite=no
dtmfmode = rfc2833
tcpenable=no
;directmedia=yes
register => sipusername:sippassword@iptel.org:5060/253xxxxxxx
session-timers=refuse
disallow=all
allow=ulaw
allow=gsm
 
[201]
defaultuser=201
secret=secret1
type=peer
callerid="user1 "
host=dynamic
context=phone
outgoinglimit=1
incominglimit=1
canreinvite=no
nat=yes
qualify=yes

[202]
defaultuser=202
secret=secret2
type=peer
callerid="user2 "
host=dynamic
context=phone
outgoinglimit=1
incominglimit=1
canreinvite=no
nat=yes
qualify=yes

[203]
defaultuser=203
secret=secret3
type=peer
callerid="user3 "
host=dynamic
context=phone
outgoinglimit=1
incominglimit=1
canreinvite=no
nat=yes
qualify=yes
 
[DID]
context=sip
defaultuser=sipusername
type=peer
secret=sippassword
host=iptel.org
fromdomain=iptel.org
fromuser=253xxxxxxx
trustrpid = yes
sendrpid = yes
canreinvite = no
insecure=port,invite
nat=yes
extensions.conf

[notice] This is just where we started here for ref [/notice]

[general]
static=no
writeprotect=no
autofallthrough=yes
clearglobalvars=yes
priorityjumping=no

[globals]
gtimeout=50    ; timeout value
; initialize
gvuser=10000
 
[sip]
exten => _253xxxxxxx,1,ExecIf($[${gvuser}!=10000]?Bridge(${gvuser}):Dial(SIP/201&SIP/203,60,D(:1)))
exten => _253xxxxxxx,n, Set(GLOBAL(gvuser)=10000)
exten => _253xxxxxxx, n, Hangup()
[phone]
include => sip
include => gv-outbound
[gv-outbound]
exten => _NXXNXXXXXX,1,GoTo(1${EXTEN},1)
exten => _1NXXNXXXXXX,1,Answer
exten => _1NXXNXXXXXX,n,Set(GLOBAL(gvuser)=${CHANNEL})
exten => _1NXXNXXXXXX,n,System(gvoice -e gvusername@gmail.com -p gvpassword call ${EXTEN} 1253xxxxxxx 1 &)
exten => _1NXXNXXXXXX,n,Ringing
exten => _1NXXNXXXXXX,n,Wait(30)
exten => _X.,n,Noop(Never received callback from Google Voice on channel ${gvuser} . exiting)
exten => h,1,GotoIf($["${CHANNEL(state)}" = "Ring"]?:bridged)
exten => h,n,Noop(Hangup on channel ${gvuser})
exten => h,n,System(gvoice -e gvusername@gmail.com -p gvpassword cancel &)
exten => h,n, Set(GLOBAL(gvuser)=10000)
exten => h,n,Hangup()
exten => h,n(bridged),Noop(The channel has been bridged successfully)
exten => h,n, Set(GLOBAL(gvuser)=10000)
     

Test cmds

 gvoice -e [gvusername@gmail.com] -p [gvpassword] call NXXNXXXXXX [callcentricdid] 1  
  • the above makes a call
asterisk -rvvvvv 
  • (loads the asterisk server Diagnostic program, type help for list of cmds) some are: sip show peers sip show registry sip show users sip reload

Links

Cisco 79XX Phone

Phone setup
How to use the 7060g
Directory info
cisco 79xx info

Asterisk 13 Documentation

Asterisk 13 Documentation
Application Dial


Services

GVsip A Free to low cost gv sip gateway
callcentric A DID and SIP provider
Linphone A free DID to sip service (does not work well with gv due to abuse)

Other

Asterisk™: The Future of Telephony

BounceBack with Freepbx    [Guide]
Incredible PBX for Asterisk-GUI (RasPi 2 Edition)    [Guide]
Headset Jack Pinout << Make a Intercom anyone?

Cisco 7960 POE

  • The Phone uses the old POE STD and thus requires a POE CROSSOVER cable to swap pins 4+5 to 7+8
  • The Phone also can use 802.3af STD B (power on non data pairs)
  • For smart POEs put a 25k resistor across pins 1 and 3 and connect your phone to the switch using a crossover cable. (this will tell the POE to send power)