https://github.com/purecloudlabs/realtime-debug
:zap: :bug: An easy way to debug purecloud's realtime APIs
https://github.com/purecloudlabs/realtime-debug
Last synced: 3 months ago
JSON representation
:zap: :bug: An easy way to debug purecloud's realtime APIs
- Host: GitHub
- URL: https://github.com/purecloudlabs/realtime-debug
- Owner: purecloudlabs
- License: mit
- Created: 2016-09-07T18:15:48.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-02-13T23:04:41.000Z (over 2 years ago)
- Last Synced: 2025-06-14T09:05:15.633Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 86.9 KB
- Stars: 0
- Watchers: 36
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This is an extension which helps debug PureCloud's realtime APIs. Intended for use in
development of PureCloud or PureCloud integrations.
Contributing, developing:
- `npm install`
- `npm test` - runs linter and builds extension
Install:
- https://chrome.google.com/webstore/detail/cgcbglankfpindfcechphhmcnoljajkl
Install for localhost:
- Clone repo and ensure localhost is listed in manifest, then install from
chrome://extensions
Use:
```javascript
debugRealtime(/jabber:client/, 'log', { absoluteTime: true, filterRealtime: /transport-info/ });
```
Handy Method for triggering ice failures:
```javascript
debugRealtime(/jabber:client/, 'log', { thawIce: true });
// now ice candidates sent over realtime will get mangled causing ice failures
// use refreeze to cause ice mangling to stop after a short period of time (i.e., simulate failure/retry)
debugRealtime(/jabber:client/, 'log', { thawIce: true, refreeze: 4000 });
/// use slow ice to simulate slow or delayed ice, instead of a failure
debugRealtime(/jabber:client/, 'log', { slowIce: 1000 });
```
```javascript
/// log jabber:client stanzas, filtering none, mangling ice transports
debugRealtime(/jabber:client/, 'log',
{
absoluteTime: true,
filterRealtime: null,
mangleStanzas: [{
regexp: /ip=".*?"/,
mangle: (s) => {
return s.toString().replace(/ip=".*?"/g, 'ip="123.123.123.123"').replace(/rel-addr=".*?"/g, 'rel-addr="123.123.123.123"');
}
}, {
regexp: /ufrag=".*?"/,
mangle: (s) => {
return s.toString().replace(/ufrag=".*?"/g, 'ufrag="123a"').replace(/pwd="/g, 'pwd="asd').replace(/:..<\/finger/g, ':00