sip_endpoint.save
Description
Save a new SIP endpoint or save changes to an existing SIP endpoint.
Arguments
Please be aware that while the API will accept the required parameters alone without complaining, other parameters may be required for a working configuration.
name | required | value type | default value |
---|---|---|---|
name | yes. This identifies the entry in the configuration. If you are changing the name, you need to reference the entry with sip endpoint's object_id or add an 'old_name' entry with the previous name entry. | string | Â |
defaultuser | no | string | Â |
secret | no | string | Â |
registration | no | in, out, none | none |
host | no | ip or hostname | Â |
transport | no | UDP, TCP, TLS | UDP |
nat | no | no, yes, force_rport, comedia | yes |
auth | no | string | Â |
fromuser | no | string | Â |
fromdomain | no | ip or hostname | Â |
remotesecret | no | string | Â |
port | no | port number | Â |
qualify | no | 0/1 | 0 |
qualifyfreq | no | number | 60 |
dtmfmode | no | auto, info, rfc2833, inband | auto |
trustrpid | no | 0/1 | 0 |
sendrpid | no | 0/1 | 0 |
rpid_format | no | pass, rpid | pass |
callingpres | no | allowed_not_screened, allowed_passed_screen, allowed_failed_screen, allowed, prohib_not_screened, prohib_passed_screen, prohib_failed_screen, prohib, unavailable | allowed_not_screened |
progressinband | no | yes, no, never | never |
allowoverlap | no | 0/1 | 0 |
usereqphone | no | 0/1 | 0 |
use_q850_reason | no | 0/1 | 0 |
honorsdpversion | no | 0/1 | 1 |
max_forwards | no | number | 3 |
registertrying | no | 0/1 | 0 |
outboundproxy | no | ip or hostname | Â |
timert1 | no | number | 500 |
timerb | no | number | 32000 |
session-timers | no | originate, accept, refuse | accept |
session-minse | no | number | 90 |
session-expires | no | number | 1800 |
session-refresher | no | uac, uas | uas |
audio_codecs | no | Array of objects with member 'id' one of: ulaw, alaw, g722, g726, g729, gsm; 'value' 0/1 indicating codec is enabled or disabled | all codecs enabled |
codec_order | no | Array of objects defined by:
| { |
alaw_pr | no | Number 10-50, multiple of 10 | 20 |
ulaw_pr | no | Number 10-50, multiple of 10 | 20 |
gsm_pr | no | 20 | 20 |
g722_pr | no | Number 10-40, multiple of 10 | 20 |
g726_pr | no | Number 10-200, multiple of 10 | 20 |
g726nonstandard | no | boolean | 0 |
g729_pr | no | Number 10-40, multiple of 10 | 20 |
preferred_codec_only | no | 0/1 | 0 |
t38pt_udptl | no | 'yes,fec', 'yes,redundancy', no | 'yes,redundancy' if suitable fax codecs are enabled, otherwise 'no' |
t1min | no | string | 500ms |
allowtransfer | no | 0/1 | 1 |
promiscredir | no | 0/1 | 0 |
rtptimeout | no | 0/1 | 0 |
rtpholdtimeout | no | 0/1 | 0 |
t38transport | no | udptl | Â |
insecure | no | 0/1 | 0 |
dtmfmode | no | string (auto, info, inband, rfc2833) | auto |
enable_advanced | no | 0/1 | 0 |
extension | no | string | none |
defaultuser | no | string | none |
rtpjittermode | no | static, adaptive | adaptive |
rtpjitterdelay | no | 10-100 | 50 |
Example Requests & Responses
Example One
Request
Save a new sip endpoint.
{
    'method' => 'sip_endpoint.save',
    'parameters' => {
          'transport' => [
                           'UDP'
                         ],
          'nat' => 'yes',
          'name' => '8005555555',
          'secret' => 'sdlkfj9348jkh7',
          'defaultuser' => '38fh48fjh47f',
          'host' => 'dynamic',
          'qualifyfreq' => '60'
        }
} |
Response
{
          'result' => 'success'
 } |
Or
{
          'result' => 'error',
          'error' => 'An Error String',
          'error_key' => 'AN_ERROR_LANGUAGE_KEY',
 } |
Example Two
Request
Save changes to an existing SIP Endpoint. Â (See entry on name field if you want to edit the endpoint's name.)
Response
Or