ONDEWO-SIP API available at GitHub
SIP LifeCycle is explained at here
rpc SipStartSession (SipStartSessionRequest) returns (SipStatus)Starts a new SIP session for an account registered at a SIP server.
RegisterAccount
need to be called before.
rpc SipEndSession (.google.protobuf.Empty) returns (SipStatus)Ends a SIP session for an account registered at a SIP server
rpc SipStartCall (SipStartCallRequest) returns (SipStatus)Starts a call in an active SIP session for an account registered at a SIP server
rpc SipEndCall (SipEndCallRequest) returns (SipStatus)Ends a call in an active SIP session for an account registered at a SIP server
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
rpc SipRegisterAccount (SipRegisterAccountRequest) returns (SipStatus)Registers s SIP account at a SIP server
rpc SipGetSipStatus (.google.protobuf.Empty) returns (SipStatus)Gets the current SIP status
rpc SipGetSipStatusHistory (.google.protobuf.Empty) returns (SipStatusHistoryResponse)Gets the history of SIP status
rpc SipPlayWavFiles (SipPlayWavFilesRequest) returns (SipStatus)Plays wav files during an ongoing call of an active SIP session
rpc SipMute (.google.protobuf.Empty) returns (SipStatus)Mutes the microphone in an ongoing call of an active SIP session
rpc SipUnMute (.google.protobuf.Empty) returns (SipStatus)Un-mutes the microphone in an ongoing call of an active SIP session
Ends an ongoing call of the active SIP session of the active SIP account
Field | Type | Label | Description |
hard_hangup | bool | Set to |
Plays a list of wav files
Field | Type | Label | Description |
wav_files | bytes | repeated | Wav files as bytes in a list that will be played |
Field | Type | Label | Description |
account_name | string | Account name of the sip user. Usually something like |
|
password | string | Password of the account |
|
auth_username | string | Optional: authentication user name |
|
outbound_proxy | string | Optional: outbound proxy address, e.g. |
Request to start the call with the active SIP session of the active SIP account
Field | Type | Label | Description |
callee_id | string | SIP account name |
|
headers | SipStartCallRequest.HeadersEntry | repeated | Headers to include when starting the call |
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
Request for starting a new SIP session for a specified account
Field | Type | Label | Description |
account_name | string | Account name of the sip user. Usually something like |
|
auto_answer_interval | int32 | answer interval |
Field | Type | Label | Description |
account_name | string | Account name of the sip user. Usually something like |
|
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 |
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
History of SIP status
Field | Type | Label | Description |
status_history | SipStatus | repeated | History of SIP status |
Request for transferring a call with or without headers
Field | Type | Label | Description |
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 |
Field | Type | Label | Description |
key | string |
|
|
value | string |
|
Types of status
Name | Number | Description |
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 |
.proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
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) |