The attached package should provide OAuth 2.0 supoort to any Asterisk 13 or Asterisk 14 system:
1. Extract oauth2.tar.gz to the /root directory.
2. Edit oauth2.creds. The first line must contain your Oauth 2.0 Client ID and the second line must contain your OAuth 2.0 Client Secret.
3. Make oauth2 executable: chmod +x oauth2
4. Execute oauth2: ./oauth2
5. Use your OAuth 2.0 refresh token(s) as the Password(s) in FreePBX's Motif module (or as the secret(s) in xmpp.conf of plain Asterisk).
6. After clicking Apply Config in FreePBX, wait 15 seconds after the Reloading dialog box disappears before doing anything else.
.
If you don't already have an OAuth 2.0 Client ID, Client Secret, and refresh token(s):
1. Go to Google Developer Console: https://console.developers.google.com/project
2. Log in with your Google Voice username/password
3. Click CREATE PROJECT
4. Enter a Project name
5. Click Create
6. In the left pane, click Credentials
7. Click OAuth consent screen
8. Enter a Product name shown to users
9. Click Save
10. Click Create credentials
11. Click OAuth client ID
12. Select Web application
13. Enter a Name
14. Enter https://developers.google.com/oauthplayground at Authorized redirect URIs
15. Click Create
16. Record Client ID and Client secret
17. Go to https://developers.google.com/oauthplayground
18. Click the gear icon
19. Check Use your own OAuth credentials
20. Enter OAuth Client ID and OAuth Client secret
21. Click Close
22. Enter https://www.googleapis.com/auth/googletalk at Input your own scopes
23. Click Authorize API
24. Click Allow
25. Click Exchange authorization code for tokens
26. Reopen Step 2
27. Record Refresh token
To create a refresh token for additional Google Voice accounts, log out, log in to the desired account, and go to step 17.
.
Credit to Ryan Tilton, dziny, carlb8, phonesimon, and others for the original res_xmpp.c modifications.
↧