Difference between revisions of "Phone"

From Freeside Atlanta
Jump to navigation Jump to search
Line 1: Line 1:
Currently the phone system accepts incoming calls and make calls [[Equipment/Cisco_7960 | Cisco 7960]] see Eldon or [[Matt|User:Msg4real]] for Help<br>
Currently the phone system accepts incoming calls and With a delay can make calls and some help [[Equipment/Cisco_7960 | Cisco 7960]] see Eldon or Matt for howto <br>
The system has a Voicemail setup and -mails the BOD<br>
The system May have a Voicemail <br>
It uses the Google Voice Bounce Back method Commonly used by others before XMPP was created. <strike>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...


Currently takes calls using the XMPP PROTOCOL and/or SIP
I have added XMPP calling on lines 3-5 and Line 2 is not configured correctly at this time stay tuned...  </strike>
= Phone System =
= Phone System ON PI=




== To-Do ==
== To-Do ==
* <strike>Get Callcentric DID (or Other)</strike>
* <strike>Edit Sip.conf and Extension.conf With <strike>Callcentric login  and a Google account</strike>
* <strike>Test (DTMF TONES, calling, Dialplan, other) </strike>
* Change Voicemail Settings (send wav to someone)
* Change Voicemail Settings (send wav to someone)
* Create IVR 
* <strike> configure sendmail </strike>
* Add A Custom Voicemail Greating
* Add A Custom Voicemail Greating
* Add/Change Phone book (xml) (dir.php) (started )
* Add/Change Phone book (xml) (started )
* Mount Phones into Workshop
* <strike>Fix asterisk Config errors (some syntax changes needed in some files due to update)
* Buy a 48v ~1.5 amp Power brick or 15.4W per phone (currently POE with Original brick) [add poe to phones]
* <strike> Fix Cisco config </strike>
* Make E911 NOTICE for phone (and list of 911 numbers by phone)
* <strike>Make a web page for the phone system
 
* ADD URL (sip calling) calling into asterisk ([http://www.voip-info.org/wiki/view/Asterisk+tips+SIP+URI+Dial Guide])  
== Prerequisites ==       
* Change some init </strike>
=== Supplies ===
* Fix some internal port FWDing
* Sip Phone (cisco sip)
* <strike> Debug 7960
* Callcentric DID
* Mount Phones </strike>
* Google Voice account
* Buy a 48v ~1.5 amp Power brick or 15.4W per phone (currently POE with Original brick)  
* RasPI 2 w/ RASPBX
* <strike>Make POE crossover adapters (4,5 switches with 7,8) (BUYING)</strike>
* tftp (phone config)
* Make Instructions for 7960 (see talk)
   
* Make NOTICE for phone
=== 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. <strike>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...  </strike>


== Prerequisites ==         
== Prerequisites ==         
Line 70: Line 53:
  python setup.py install
  python setup.py install
  sed -i 's|https://www.google.com/accounts/ServiceLoginAuth?service=grandcentral|https://accounts.google.com/ServiceLogin?service=grandcentral\&continue=https://www.google.com/voice|' /usr/local/lib/python2.7/dist-packages/googlevoice/settings.py
  sed -i 's|https://www.google.com/accounts/ServiceLoginAuth?service=grandcentral|https://accounts.google.com/ServiceLogin?service=grandcentral\&continue=https://www.google.com/voice|' /usr/local/lib/python2.7/dist-packages/googlevoice/settings.py
sed -i 's|      galx.*|      galx = re.search(r\"name=\\"GALX\\" type=\\"hidden\\"\\
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  
  *value=\\"(.+)\\"\", content).group(1)|' /usr/local/lib/python2.7/dist-packages/googlevoice/voice.py  


Line 226: Line 209:
<br>
<br>
<br>
<br>
== Services ==
[https://www.gvsip.com/ GVsip] A Free to low cost gv sip gateway <br>
[http://www.callcentric.com/ callcentric] A DID and SIP provider <br>
[http://www.linphone.org/free-sip-service.html Linphone] A free DID to sip service (does not work well with gv due to abuse)<br>
==Other==
==Other==
[http://www.asteriskdocs.org/en/2nd_Edition/asterisk-book-html-chunk/index.html Asterisk™: The Future of Telephony]<br>
[http://www.asteriskdocs.org/en/2nd_Edition/asterisk-book-html-chunk/index.html Asterisk™: The Future of Telephony]<br>
<br>
<br>
[http://tech.iprock.com/?p=9784 BounceBack with Freepbx] &nbsp;&nbsp;&nbsp;[Guide]<br>
[http://tech.iprock.com/?p=9784 how to on freepbx]<br>
[http://nerdvittles.com/?p=12233 Incredible PBX for Asterisk-GUI (RasPi 2 Edition)] &nbsp;&nbsp;&nbsp;[Guide]<br>
[http://www.einhorn-net.de/headset/index_e.html Headset Jack Pinout] << Make a Intercom anyone?
[http://www.einhorn-net.de/headset/index_e.html Headset Jack Pinout] << Make a Intercom anyone?
=[[equipment/Cisco_7960| Cisco 7960]] POE=
=[[equipment/Cisco_7960| 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 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)
* 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)
* 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)

Revision as of 04:35, 14 May 2015

Currently the phone system accepts incoming calls and With a delay can make calls and some help Cisco 7960 see Eldon or Matt for howto
The system May have a Voicemail
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...

Phone System

To-Do

  • Get Callcentric DID (or Other)
  • Edit Sip.conf and Extension.conf With Callcentric login and a Google account
  • Test (DTMF TONES, calling, Dialplan, other)
  • Change Voicemail Settings (send wav to someone)
  • configure sendmail
  • Add A Custom Voicemail Greating
  • Add/Change Phone book (xml) (started )
  • Fix asterisk Config errors (some syntax changes needed in some files due to update)
  • Fix Cisco config
  • Make a web page for the phone system
  • ADD URL (sip calling) calling into asterisk (Guide)
  • Change some init
  • Fix some internal port FWDing
  • Debug 7960
  • Mount Phones
  • Buy a 48v ~1.5 amp Power brick or 15.4W per phone (currently POE with Original brick)
  • Make POE crossover adapters (4,5 switches with 7,8) (BUYING)
  • Make Instructions for 7960 (see talk)
  • Make NOTICE for phone

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


Other

Asterisk™: The Future of Telephony

how to on freepbx
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)