Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4568,6 +4568,8 @@ components:
$ref: '#/components/schemas/tag1'
machineDetectionResult:
$ref: '#/components/schemas/machineDetectionResult'
sipCallId:
$ref: '#/components/schemas/sipCallId'
bridgeCompleteCallback:
type: object
description: >-
Expand Down Expand Up @@ -4832,6 +4834,10 @@ components:
$ref: '#/components/schemas/errorId'
tag:
$ref: '#/components/schemas/tag1'
sipCallId:
$ref: '#/components/schemas/sipCallId'
sipResponseCode:
$ref: '#/components/schemas/sipResponseCode'
dtmfCallback:
type: object
description: >-
Expand Down Expand Up @@ -4948,6 +4954,10 @@ components:
$ref: '#/components/schemas/stirShaken'
uui:
$ref: '#/components/schemas/uui'
sipCallId:
$ref: '#/components/schemas/sipCallId'
sipHeaders:
$ref: '#/components/schemas/sipHeaders'
machineDetectionCompleteCallback:
type: object
description: >-
Expand Down Expand Up @@ -5595,6 +5605,36 @@ components:
value, including the encoding specifier, may not exceed 256 characters.
example: bXktdXVp
maxLength: 256
sipCallId:
type: string
description: >-
(optional) The SIP Call-ID of the call's current SIP dialog with
Bandwidth's SBC. Used to correlate dialogs and trace calls. Present on
any call, inbound or outbound, once that dialog has been established;
may be absent very early in a call before the dialog exists.
example: c95ac8d6e1a31c52eb38f419893c151633ec68f8d@sbc.bandwidth.com
sipHeaders:
type: object
additionalProperties:
type: string
description: >-
(optional) Map of customer-supplied X-* headers from the original
INVITE. Keys are lowercase (SIP headers are case-insensitive). Present
only for inbound SIP URI calls with custom headers. Note - keys preserve
the original SIP header name in lowercase rather than Bandwidth's usual
camelCase JSON convention, since these are passthrough values from the
caller's SIP INVITE, not Bandwidth-defined fields. If the same header
name is sent more than once in the INVITE, only the last value is kept.
example:
x-custom-header: customer-value
x-session-id: sess-12345
sipResponseCode:
type: integer
description: >-
(optional) The SIP status code returned by Bandwidth's SBC when it
rejected an outbound call's INVITE (e.g. 486 for busy, 603 for decline).
Present only when an outbound call was rejected by the SBC.
example: 486
codeRequest:
type: object
properties:
Expand Down
6 changes: 4 additions & 2 deletions bandwidth/models/answer_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ class AnswerCallback(BaseModel):
answer_time: Optional[datetime] = Field(default=None, description="Time the call was answered, in ISO 8601 format.", alias="answerTime")
tag: Optional[StrictStr] = Field(default=None, description="(optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present.")
machine_detection_result: Optional[MachineDetectionResult] = Field(default=None, alias="machineDetectionResult")
sip_call_id: Optional[StrictStr] = Field(default=None, description="(optional) The SIP Call-ID of the call's current SIP dialog with Bandwidth's SBC. Used to correlate dialogs and trace calls. Present on any call, inbound or outbound, once that dialog has been established; may be absent very early in a call before the dialog exists.", alias="sipCallId")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag", "machineDetectionResult"]
__properties: ClassVar[List[str]] = ["eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag", "machineDetectionResult", "sipCallId"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -141,7 +142,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"startTime": obj.get("startTime"),
"answerTime": obj.get("answerTime"),
"tag": obj.get("tag"),
"machineDetectionResult": MachineDetectionResult.from_dict(obj["machineDetectionResult"]) if obj.get("machineDetectionResult") is not None else None
"machineDetectionResult": MachineDetectionResult.from_dict(obj["machineDetectionResult"]) if obj.get("machineDetectionResult") is not None else None,
"sipCallId": obj.get("sipCallId")
})
# store additional fields in additional_properties
for _key in obj.keys():
Expand Down
10 changes: 7 additions & 3 deletions bandwidth/models/disconnect_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import json

from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from bandwidth.models.call_direction_enum import CallDirectionEnum
from typing import Optional, Set
Expand All @@ -46,8 +46,10 @@ class DisconnectCallback(BaseModel):
error_message: Optional[StrictStr] = Field(default=None, description="Text explaining the reason that caused the call to fail in case of errors.", alias="errorMessage")
error_id: Optional[StrictStr] = Field(default=None, description="Bandwidth's internal id that references the error event.", alias="errorId")
tag: Optional[StrictStr] = Field(default=None, description="(optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present.")
sip_call_id: Optional[StrictStr] = Field(default=None, description="(optional) The SIP Call-ID of the call's current SIP dialog with Bandwidth's SBC. Used to correlate dialogs and trace calls. Present on any call, inbound or outbound, once that dialog has been established; may be absent very early in a call before the dialog exists.", alias="sipCallId")
sip_response_code: Optional[StrictInt] = Field(default=None, description="(optional) The SIP status code returned by Bandwidth's SBC when it rejected an outbound call's INVITE (e.g. 486 for busy, 603 for decline). Present only when an outbound call was rejected by the SBC.", alias="sipResponseCode")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["eventType", "eventTime", "accountId", "applicationId", "from", "to", "callId", "direction", "callUrl", "enqueuedTime", "startTime", "answerTime", "endTime", "cause", "errorMessage", "errorId", "tag"]
__properties: ClassVar[List[str]] = ["eventType", "eventTime", "accountId", "applicationId", "from", "to", "callId", "direction", "callUrl", "enqueuedTime", "startTime", "answerTime", "endTime", "cause", "errorMessage", "errorId", "tag", "sipCallId", "sipResponseCode"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -148,7 +150,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"cause": obj.get("cause"),
"errorMessage": obj.get("errorMessage"),
"errorId": obj.get("errorId"),
"tag": obj.get("tag")
"tag": obj.get("tag"),
"sipCallId": obj.get("sipCallId"),
"sipResponseCode": obj.get("sipResponseCode")
})
# store additional fields in additional_properties
for _key in obj.keys():
Expand Down
8 changes: 6 additions & 2 deletions bandwidth/models/initiate_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ class InitiateCallback(BaseModel):
diversion: Optional[Diversion] = None
stir_shaken: Optional[StirShaken] = Field(default=None, alias="stirShaken")
uui: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field(default=None, description="The value of the `User-To-User` header to send within the initial `INVITE`. Must include the encoding parameter as specified in RFC 7433. Only `base64`, `jwt` and `hex` encoding are currently allowed. This value, including the encoding specifier, may not exceed 256 characters.")
sip_call_id: Optional[StrictStr] = Field(default=None, description="(optional) The SIP Call-ID of the call's current SIP dialog with Bandwidth's SBC. Used to correlate dialogs and trace calls. Present on any call, inbound or outbound, once that dialog has been established; may be absent very early in a call before the dialog exists.", alias="sipCallId")
sip_headers: Optional[Dict[str, StrictStr]] = Field(default=None, description="(optional) Map of customer-supplied X-* headers from the original INVITE. Keys are lowercase (SIP headers are case-insensitive). Present only for inbound SIP URI calls with custom headers. Note - keys preserve the original SIP header name in lowercase rather than Bandwidth's usual camelCase JSON convention, since these are passthrough values from the caller's SIP INVITE, not Bandwidth-defined fields. If the same header name is sent more than once in the INVITE, only the last value is kept.", alias="sipHeaders")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "startTime", "diversion", "stirShaken", "uui"]
__properties: ClassVar[List[str]] = ["eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "startTime", "diversion", "stirShaken", "uui", "sipCallId", "sipHeaders"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -124,7 +126,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"startTime": obj.get("startTime"),
"diversion": Diversion.from_dict(obj["diversion"]) if obj.get("diversion") is not None else None,
"stirShaken": StirShaken.from_dict(obj["stirShaken"]) if obj.get("stirShaken") is not None else None,
"uui": obj.get("uui")
"uui": obj.get("uui"),
"sipCallId": obj.get("sipCallId"),
"sipHeaders": obj.get("sipHeaders")
})
# store additional fields in additional_properties
for _key in obj.keys():
Expand Down
1 change: 1 addition & 0 deletions docs/AnswerCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Name | Type | Description | Notes
**answer_time** | **datetime** | Time the call was answered, in ISO 8601 format. | [optional]
**tag** | **str** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional]
**machine_detection_result** | [**MachineDetectionResult**](MachineDetectionResult.md) | | [optional]
**sip_call_id** | **str** | (optional) The SIP Call-ID of the call's current SIP dialog with Bandwidth's SBC. Used to correlate dialogs and trace calls. Present on any call, inbound or outbound, once that dialog has been established; may be absent very early in a call before the dialog exists. | [optional]

## Example

Expand Down
2 changes: 2 additions & 0 deletions docs/DisconnectCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Name | Type | Description | Notes
**error_message** | **str** | Text explaining the reason that caused the call to fail in case of errors. | [optional]
**error_id** | **str** | Bandwidth's internal id that references the error event. | [optional]
**tag** | **str** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional]
**sip_call_id** | **str** | (optional) The SIP Call-ID of the call's current SIP dialog with Bandwidth's SBC. Used to correlate dialogs and trace calls. Present on any call, inbound or outbound, once that dialog has been established; may be absent very early in a call before the dialog exists. | [optional]
**sip_response_code** | **int** | (optional) The SIP status code returned by Bandwidth's SBC when it rejected an outbound call's INVITE (e.g. 486 for busy, 603 for decline). Present only when an outbound call was rejected by the SBC. | [optional]

## Example

Expand Down
2 changes: 2 additions & 0 deletions docs/InitiateCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Name | Type | Description | Notes
**diversion** | [**Diversion**](Diversion.md) | | [optional]
**stir_shaken** | [**StirShaken**](StirShaken.md) | | [optional]
**uui** | **str** | The value of the `User-To-User` header to send within the initial `INVITE`. Must include the encoding parameter as specified in RFC 7433. Only `base64`, `jwt` and `hex` encoding are currently allowed. This value, including the encoding specifier, may not exceed 256 characters. | [optional]
**sip_call_id** | **str** | (optional) The SIP Call-ID of the call's current SIP dialog with Bandwidth's SBC. Used to correlate dialogs and trace calls. Present on any call, inbound or outbound, once that dialog has been established; may be absent very early in a call before the dialog exists. | [optional]
**sip_headers** | **Dict[str, str]** | (optional) Map of customer-supplied X-* headers from the original INVITE. Keys are lowercase (SIP headers are case-insensitive). Present only for inbound SIP URI calls with custom headers. Note - keys preserve the original SIP header name in lowercase rather than Bandwidth's usual camelCase JSON convention, since these are passthrough values from the caller's SIP INVITE, not Bandwidth-defined fields. If the same header name is sent more than once in the INVITE, only the last value is kept. | [optional]

## Example

Expand Down
Loading