Skip to content

Commit

Permalink
Upgrade docs
Browse files Browse the repository at this point in the history
  • Loading branch information
datso committed Apr 23, 2017
1 parent dbf1e53 commit ad239c1
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 15 deletions.
33 changes: 26 additions & 7 deletions docs/accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,20 @@ So for each action, promise will be returned.

```
let configuration = {
username: '100',
password: '****',
host: '192.168.1.100' // IP or Domain name.
port: 5060,
realm: 'my.pbx.com' // Authorization host (see TODO: Link to wiki)
transport: 'UDP' // Default TCP
}
"name": "John",
"username": "sip_username",
"domain": "pbx.carusto.com",
"password": "****",
"proxy": null,
"transport": null, // Default TCP
"regServer": null, // Default wildcard
"regTimeout": null // Default 3600
"regHeaders": {
"X-Custom-Header": "Value"
},
"regContactParams": ";unique-device-token-id=XXXXXXXXX",
"regOnAdd": false, // Default true, use false for manual REGISTRATION
};
let endpoint = new Endpoint();
let state = await endpoint.start();
Expand Down Expand Up @@ -56,6 +63,18 @@ Example: Invalid host



.then((account) => {
console.log("Account: ", account);

setTimeout(() => {
endpoint.registerAccount(account, true);
}, 10000);

setTimeout(() => {
endpoint.registerAccount(account, false);
}, 20000);
});




37 changes: 29 additions & 8 deletions docs/settings.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
# Settings


TODO: Show how to change nat, pres, and registration settings.




# Codecs


# Connectivity settings
TODO

# Network settings
TODO


# Codecs settings
Print codec settings
```javascript
let endpoint = new Endpoint();
let state = await endpoint.start();
let {accounts, calls, settings, connectivity} = state;

console.log("codecs", settings.codecs); // Shows a list of available codecs with priority
```

Change codec configuration
```javascript
// Not listed codecs are automatically will have zero priority
endpoint.changeCodecSettings({
"PCMA/8000/1": 0,
"G722/16000/1": 0, // Zero means to disable the codec.
"iLBC/8000/1": 210,
"speex/8000/1": 0,
"speex/16000/1": 0,
"speex/32000/1": 0
})
```

0 comments on commit ad239c1

Please sign in to comment.