@getdial/sdk - v0.21.0
Python SDK
AI SDK
getdial.ai
Preparing search index...
parseDialAudioMessage
Function parseDialAudioMessage
parseDialAudioMessage
(
raw
:
string
|
object
,
)
:
|
{
call_id
:
string
;
direction
:
"inbound"
|
"outbound"
;
formats
:
{
inbound
:
|
"mulaw_8000"
|
"alaw_8000"
|
"l16_8000"
|
"l16_16000"
|
"l16_24000"
;
outbound
:
|
"mulaw_8000"
|
"alaw_8000"
|
"l16_8000"
|
"l16_16000"
|
"l16_24000"
;
}
;
from
:
string
;
instruction
?:
string
|
null
;
language
?:
string
|
null
;
reconnect
?:
boolean
;
to
:
string
;
type
:
"call_connected"
;
}
|
{
payload
:
string
;
seq
?:
number
;
type
:
"media"
}
|
{
digit
:
string
;
type
:
"dtmf"
}
|
{
name
:
string
;
type
:
"mark"
}
|
{
seconds_remaining
:
number
;
type
:
"duration_warning"
}
|
{
timestamp
:
number
;
type
:
"ping_pong"
}
|
{
reason
:
|
"error"
|
"caller_hangup"
|
"customer_hangup"
|
"duration_limit"
;
type
:
"call_ended"
;
}
Parse + validate a frame received from Dial. Throws on an invalid frame.
Parameters
raw
:
string
|
object
Returns
|
{
call_id
:
string
;
direction
:
"inbound"
|
"outbound"
;
formats
:
{
inbound
:
|
"mulaw_8000"
|
"alaw_8000"
|
"l16_8000"
|
"l16_16000"
|
"l16_24000"
;
outbound
:
|
"mulaw_8000"
|
"alaw_8000"
|
"l16_8000"
|
"l16_16000"
|
"l16_24000"
;
}
;
from
:
string
;
instruction
?:
string
|
null
;
language
?:
string
|
null
;
reconnect
?:
boolean
;
to
:
string
;
type
:
"call_connected"
;
}
|
{
payload
:
string
;
seq
?:
number
;
type
:
"media"
}
|
{
digit
:
string
;
type
:
"dtmf"
}
|
{
name
:
string
;
type
:
"mark"
}
|
{
seconds_remaining
:
number
;
type
:
"duration_warning"
}
|
{
timestamp
:
number
;
type
:
"ping_pong"
}
|
{
reason
:
|
"error"
|
"caller_hangup"
|
"customer_hangup"
|
"duration_limit"
;
type
:
"call_ended"
;
}
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Python SDK
AI SDK
getdial.ai
@getdial/sdk - v0.21.0
Loading...
Parse + validate a frame received from Dial. Throws on an invalid frame.