ondewo/sip/sip.proto

Top

Services

Sip

ONDEWO-SIP API available at GitHub

SIP LifeCycle is explained at here

Service Methods

SipStartSession

rpc SipStartSession (SipStartSessionRequest) returns (SipStatus)
Starts a new SIP session for an account registered at a SIP server. RegisterAccount need to be called before.

SipEndSession

rpc SipEndSession (.google.protobuf.Empty) returns (SipStatus)
Ends a SIP session for an account registered at a SIP server

SipStartCall

rpc SipStartCall (SipStartCallRequest) returns (SipStatus)
Starts a call in an active SIP session for an account registered at a SIP server

SipEndCall

rpc SipEndCall (SipEndCallRequest) returns (SipStatus)
Ends a call in an active SIP session for an account registered at a SIP server

SipTransferCall

rpc SipTransferCall (SipTransferCallRequest) returns (SipStatus)
Transfers a call in an active SIP session for an account registered at a SIP server to another SIP account or phone number specified by transfer_id

SipRegisterAccount

rpc SipRegisterAccount (SipRegisterAccountRequest) returns (SipStatus)
Registers s SIP account at a SIP server

SipGetSipStatus

rpc SipGetSipStatus (.google.protobuf.Empty) returns (SipStatus)
Gets the current SIP status

SipGetSipStatusHistory

rpc SipGetSipStatusHistory (.google.protobuf.Empty) returns (SipStatusHistoryResponse)
Gets the history of SIP status

SipPlayWavFiles

rpc SipPlayWavFiles (SipPlayWavFilesRequest) returns (SipStatus)
Plays wav files during an ongoing call of an active SIP session

SipMute

rpc SipMute (.google.protobuf.Empty) returns (SipStatus)
Mutes the microphone in an ongoing call of an active SIP session

SipUnMute

rpc SipUnMute (.google.protobuf.Empty) returns (SipStatus)
Un-mutes the microphone in an ongoing call of an active SIP session
Messages

SipEndCallRequest

Ends an ongoing call of the active SIP session of the active SIP account

FieldTypeLabelDescription
hard_hangup bool

Set to True to forcefully hang up the call

SipPlayWavFilesRequest

Plays a list of wav files

FieldTypeLabelDescription
wav_files bytes repeated

Wav files as bytes in a list that will be played

SipRegisterAccountRequest

FieldTypeLabelDescription
account_name string

Account name of the sip user. Usually something like sip-user-1@mydomain.com or sip-user-1@192.168.123.123 which uses the default SIP port 5060. Also a non-default SIP port can be specified via sip-user-1@mydomain.com:5099 to connect to a SIP server running on port 5099

password string

Password of the account

auth_username string

Optional: authentication user name

outbound_proxy string

Optional: outbound proxy address, e.g. my.outbound.proxy.com

SipStartCallRequest

Request to start the call with the active SIP session of the active SIP account

FieldTypeLabelDescription
callee_id string

SIP account name

headers SipStartCallRequest.HeadersEntry repeated

Headers to include when starting the call

SipStartCallRequest.HeadersEntry

FieldTypeLabelDescription
key string

value string

SipStartSessionRequest

Request for starting a new SIP session for a specified account

FieldTypeLabelDescription
account_name string

Account name of the sip user. Usually something like sip-user-1@mydomain.com or sip-user-1@192.168.123.123 which uses the default SIP port 5060. Also a non-default SIP port can be specified via sip-user-1@mydomain.com:5099 to connect to a SIP server running on port 5099

auto_answer_interval int32

answer interval

SipStatus

FieldTypeLabelDescription
account_name string

Account name of the sip user. Usually something like sip-user-1@mydomain.com or sip-user-1@192.168.123.123 which uses the default SIP port 5060. Also a non-default SIP port can be specified via sip-user-1@mydomain.com:5099 to connect to a SIP server running on port 5099

timestamp google.protobuf.Timestamp

Timestamp of the status

status_type SipStatus.StatusType

Status type

callee_id string

SIP account name

transfer_call_id string

SIP account of the transfer

headers SipStatus.HeadersEntry repeated

Headers to include when calling outbound or transfer

description string

More detailed description of the status

exception_name string

Name of the exception

exception_traceback string

Traceback of the exception

nlu_session_name string

session name of the NLU session

SipStatus.HeadersEntry

FieldTypeLabelDescription
key string

value string

SipStatusHistoryResponse

History of SIP status

FieldTypeLabelDescription
status_history SipStatus repeated

History of SIP status

SipTransferCallRequest

Request for transferring a call with or without headers

FieldTypeLabelDescription
transfer_id string

The account name or phone number to transfer the call to

headers SipTransferCallRequest.HeadersEntry repeated

The headers to include when transferring the call

SipTransferCallRequest.HeadersEntry

FieldTypeLabelDescription
key string

value string

Enums

SipStatus.StatusType

Types of status

NameNumberDescription
NO_SESSION 0

No session is currently active

REGISTERED 1

SIP account is registered at a SIP server

READY 2

SIP account is ready to call

INCOMING_CALL_INITIATED 3

SIP account is being called, i.e. inbound/incoming call

OUTGOING_CALL_INITIATED 4

SIP account starts calling, i.e. outbound/outgoing call

OUTGOING_CALL_CONNECTED 5

SIP account outbound call is connected

INCOMING_CALL_CONNECTED 6

SIP account incoming call is connected

TRANSFER_CALL_INITIATED 7

SIP account starts transferring the call

SOFT_HANGUP_INITIATED 8

SIP account hangs up the ongoing call

HARD_HANGUP_INITIATED 9

SIP account forcefully hangs up by terminating the SIP program

INCOMING_CALL_FAILED 10

SIP account cannot accept the incoming call

OUTGOING_CALL_FAILED 11

SIP account cannot do an outbound call

INCOMING_CALL_FINISHED 12

SIP account finished the ongoing incoming call

OUTGOING_CALL_FINISHED 13

SIP account finished the ongoing outgoing call

SESSION_REGISTRATION_FAILED 14

Registration of SIP account to SIP server failed

SESSION_STARTED 15

SIP account started a new SIP session via a SIP server

SESSION_ENDED 16

SIP account ended active sip session with SIP server

TRANSFER_CALL_FAILED 17

SIP account cannot transfer the call

MICROPHONE_MUTED 18

Microphone is muted

MICROPHONE_UNMUTED 19

Microphone is unmuted

MICROPHONE_WAV_FILES_PLAYED 20

Microphone has played wav files

NO_ONGOING_CALL 21

No ongoing call

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)