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

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:

  • order, an integer 1-6 with higher priorities determined by lower numbers

  • id, a codec identifier from the following list:

    • ulaw

    • alaw

    • g722

    • g726

    • g729

    • gsm

  • name, a codec name from the following list:

    • ULAW

    • ALAW

    • G722

    • G726

    • G729

    • GSM

{
'order' => '1',
'id' => 'ulaw',
'name' => 'ULAW',
},
{
'order' => '2',
'id' => 'alaw',
'name' => 'ALAW',
},
{
'order' => '3',
'id' => 'g722',
'name' => 'G722',
},
{
'order' => '4',
'id' => 'g726',
'name' => 'G726'
},
{
'order' => '5',
'id' => 'g722',
'name' => 'G722'
},
{
'order' => '6',
'id' => 'gsm',
'name' => 'GSM',
}

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

Return to Documentation Home I Return to Sangoma Support