telnyx 6.71.0 → 6.72.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/client.d.mts +8 -8
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -8
- package/client.d.ts.map +1 -1
- package/client.js +6 -6
- package/client.js.map +1 -1
- package/client.mjs +6 -6
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/ai/ai.d.mts +1 -1
- package/resources/ai/ai.d.mts.map +1 -1
- package/resources/ai/ai.d.ts +1 -1
- package/resources/ai/ai.d.ts.map +1 -1
- package/resources/ai/ai.js +2 -2
- package/resources/ai/ai.js.map +1 -1
- package/resources/ai/ai.mjs +2 -2
- package/resources/ai/ai.mjs.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/speech-to-text/index.d.mts +3 -3
- package/resources/speech-to-text/index.d.mts.map +1 -1
- package/resources/speech-to-text/index.d.ts +3 -3
- package/resources/speech-to-text/index.d.ts.map +1 -1
- package/resources/speech-to-text/index.js +1 -5
- package/resources/speech-to-text/index.js.map +1 -1
- package/resources/speech-to-text/index.mjs +0 -2
- package/resources/speech-to-text/index.mjs.map +1 -1
- package/resources/speech-to-text/internal-base.d.mts +42 -11
- package/resources/speech-to-text/internal-base.d.mts.map +1 -1
- package/resources/speech-to-text/internal-base.d.ts +42 -11
- package/resources/speech-to-text/internal-base.d.ts.map +1 -1
- package/resources/speech-to-text/internal-base.js +5 -9
- package/resources/speech-to-text/internal-base.js.map +1 -1
- package/resources/speech-to-text/internal-base.mjs +5 -9
- package/resources/speech-to-text/internal-base.mjs.map +1 -1
- package/resources/speech-to-text/speech-to-text.d.mts +79 -100
- package/resources/speech-to-text/speech-to-text.d.mts.map +1 -1
- package/resources/speech-to-text/speech-to-text.d.ts +79 -100
- package/resources/speech-to-text/speech-to-text.d.ts.map +1 -1
- package/resources/speech-to-text/speech-to-text.js +16 -19
- package/resources/speech-to-text/speech-to-text.js.map +1 -1
- package/resources/speech-to-text/speech-to-text.mjs +16 -19
- package/resources/speech-to-text/speech-to-text.mjs.map +1 -1
- package/resources/speech-to-text/ws-base.d.mts +106 -0
- package/resources/speech-to-text/ws-base.d.mts.map +1 -0
- package/resources/speech-to-text/ws-base.d.ts +106 -0
- package/resources/speech-to-text/ws-base.d.ts.map +1 -0
- package/resources/speech-to-text/ws-base.js +476 -0
- package/resources/speech-to-text/ws-base.js.map +1 -0
- package/resources/speech-to-text/ws-base.mjs +472 -0
- package/resources/speech-to-text/ws-base.mjs.map +1 -0
- package/resources/speech-to-text/ws.d.mts +9 -28
- package/resources/speech-to-text/ws.d.mts.map +1 -1
- package/resources/speech-to-text/ws.d.ts +9 -28
- package/resources/speech-to-text/ws.d.ts.map +1 -1
- package/resources/speech-to-text/ws.js +17 -97
- package/resources/speech-to-text/ws.js.map +1 -1
- package/resources/speech-to-text/ws.mjs +17 -97
- package/resources/speech-to-text/ws.mjs.map +1 -1
- package/resources/speech-to-text.d.mts +1 -80
- package/resources/speech-to-text.d.mts.map +1 -1
- package/resources/speech-to-text.d.ts +1 -80
- package/resources/speech-to-text.d.ts.map +1 -1
- package/resources/speech-to-text.js +2 -32
- package/resources/speech-to-text.js.map +1 -1
- package/resources/speech-to-text.mjs +1 -30
- package/resources/speech-to-text.mjs.map +1 -1
- package/resources/texml/accounts/calls/calls.d.mts +31 -465
- package/resources/texml/accounts/calls/calls.d.mts.map +1 -1
- package/resources/texml/accounts/calls/calls.d.ts +31 -465
- package/resources/texml/accounts/calls/calls.d.ts.map +1 -1
- package/resources/texml/accounts/calls/calls.js +7 -1
- package/resources/texml/accounts/calls/calls.js.map +1 -1
- package/resources/texml/accounts/calls/calls.mjs +7 -1
- package/resources/texml/accounts/calls/calls.mjs.map +1 -1
- package/resources/text-to-speech/index.d.mts +1 -1
- package/resources/text-to-speech/index.d.mts.map +1 -1
- package/resources/text-to-speech/index.d.ts +1 -1
- package/resources/text-to-speech/index.d.ts.map +1 -1
- package/resources/text-to-speech/index.js.map +1 -1
- package/resources/text-to-speech/index.mjs.map +1 -1
- package/resources/text-to-speech/text-to-speech.d.mts +79 -13
- package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
- package/resources/text-to-speech/text-to-speech.d.ts +79 -13
- package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
- package/resources/text-to-speech/text-to-speech.js +33 -1
- package/resources/text-to-speech/text-to-speech.js.map +1 -1
- package/resources/text-to-speech/text-to-speech.mjs +33 -1
- package/resources/text-to-speech/text-to-speech.mjs.map +1 -1
- package/src/client.ts +26 -20
- package/src/resources/ai/ai.ts +3 -3
- package/src/resources/index.ts +5 -2
- package/src/resources/speech-to-text/index.ts +6 -9
- package/src/resources/speech-to-text/internal-base.ts +49 -22
- package/src/resources/speech-to-text/speech-to-text.ts +102 -128
- package/src/resources/speech-to-text/ws-base.ts +619 -0
- package/src/resources/speech-to-text/ws.ts +26 -111
- package/src/resources/speech-to-text.ts +1 -112
- package/src/resources/texml/accounts/calls/calls.ts +36 -564
- package/src/resources/text-to-speech/index.ts +3 -2
- package/src/resources/text-to-speech/text-to-speech.ts +100 -16
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -83,7 +83,13 @@ export class Calls extends APIResource {
|
|
|
83
83
|
* ```ts
|
|
84
84
|
* const response = await client.texml.accounts.calls.calls(
|
|
85
85
|
* 'account_sid',
|
|
86
|
-
* {
|
|
86
|
+
* {
|
|
87
|
+
* params: {
|
|
88
|
+
* ApplicationSid: 'example-app-sid',
|
|
89
|
+
* From: '+13120001234',
|
|
90
|
+
* To: '+13121230000',
|
|
91
|
+
* },
|
|
92
|
+
* },
|
|
87
93
|
* );
|
|
88
94
|
* ```
|
|
89
95
|
*/
|
|
@@ -678,566 +684,37 @@ export interface CallUpdateParams {
|
|
|
678
684
|
}
|
|
679
685
|
|
|
680
686
|
export interface CallCallsParams {
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
*/
|
|
689
|
-
Url: string;
|
|
690
|
-
|
|
691
|
-
/**
|
|
692
|
-
* The ID of the TeXML Application.
|
|
693
|
-
*/
|
|
694
|
-
ApplicationSid?: string;
|
|
695
|
-
|
|
696
|
-
/**
|
|
697
|
-
* Select whether to perform answering machine detection in the background. By
|
|
698
|
-
* default execution is blocked until Answering Machine Detection is completed.
|
|
699
|
-
*/
|
|
700
|
-
AsyncAmd?: boolean;
|
|
701
|
-
|
|
702
|
-
/**
|
|
703
|
-
* URL destination for Telnyx to send AMD callback events to for the call.
|
|
704
|
-
*/
|
|
705
|
-
AsyncAmdStatusCallback?: string;
|
|
706
|
-
|
|
707
|
-
/**
|
|
708
|
-
* HTTP request type used for `AsyncAmdStatusCallback`. The default value is
|
|
709
|
-
* inherited from TeXML Application setting.
|
|
710
|
-
*/
|
|
711
|
-
AsyncAmdStatusCallbackMethod?: 'GET' | 'POST';
|
|
712
|
-
|
|
713
|
-
/**
|
|
714
|
-
* To be used as the caller id name (SIP From Display Name) presented to the
|
|
715
|
-
* destination (`To` number). The string should have a maximum of 128 characters,
|
|
716
|
-
* containing only letters, numbers, spaces, and `-_~!.+` special characters. If
|
|
717
|
-
* ommited, the display name will be the same as the number in the `From` field.
|
|
718
|
-
*/
|
|
719
|
-
CallerId?: string;
|
|
720
|
-
|
|
721
|
-
/**
|
|
722
|
-
* Whether to cancel ongoing playback on `greeting ended` detection. Defaults to
|
|
723
|
-
* `true`.
|
|
724
|
-
*/
|
|
725
|
-
CancelPlaybackOnDetectMessageEnd?: boolean;
|
|
726
|
-
|
|
727
|
-
/**
|
|
728
|
-
* Whether to cancel ongoing playback on `machine` detection. Defaults to `true`.
|
|
729
|
-
*/
|
|
730
|
-
CancelPlaybackOnMachineDetection?: boolean;
|
|
731
|
-
|
|
732
|
-
/**
|
|
733
|
-
* Custom HTTP headers to be sent with the call. Each header should be an object
|
|
734
|
-
* with 'name' and 'value' properties.
|
|
735
|
-
*/
|
|
736
|
-
CustomHeaders?: Array<WithURL.CustomHeader>;
|
|
737
|
-
|
|
738
|
-
/**
|
|
739
|
-
* Enables Deepfake Detection on the dialed call. When enabled, audio from the
|
|
740
|
-
* remote party is analyzed to determine whether the voice is AI-generated. Results
|
|
741
|
-
* are delivered asynchronously via a callback.
|
|
742
|
-
*/
|
|
743
|
-
DeepfakeDetection?: 'Enable';
|
|
744
|
-
|
|
745
|
-
/**
|
|
746
|
-
* HTTP request type used for `DeepfakeDetectionCallbackUrl`.
|
|
747
|
-
*/
|
|
748
|
-
DeepfakeDetectionCallbackMethod?: 'GET' | 'POST';
|
|
749
|
-
|
|
750
|
-
/**
|
|
751
|
-
* URL destination for Telnyx to send deepfake detection callback events to for the
|
|
752
|
-
* call.
|
|
753
|
-
*/
|
|
754
|
-
DeepfakeDetectionCallbackUrl?: string;
|
|
755
|
-
|
|
756
|
-
/**
|
|
757
|
-
* Allows you to choose between Regular, Premium, and PremiumCallScreening
|
|
758
|
-
* detections. See
|
|
759
|
-
* https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection
|
|
760
|
-
*/
|
|
761
|
-
DetectionMode?: 'Premium' | 'Regular' | 'PremiumCallScreening';
|
|
762
|
-
|
|
763
|
-
/**
|
|
764
|
-
* A failover URL for which Telnyx will retrieve the TeXML call instructions if the
|
|
765
|
-
* `Url` is not responding.
|
|
766
|
-
*/
|
|
767
|
-
FallbackUrl?: string;
|
|
768
|
-
|
|
769
|
-
/**
|
|
770
|
-
* The phone number of the party that initiated the call. Phone numbers are
|
|
771
|
-
* formatted with a `+` and country code.
|
|
772
|
-
*/
|
|
773
|
-
From?: string;
|
|
774
|
-
|
|
775
|
-
/**
|
|
776
|
-
* Enables Answering Machine Detection.
|
|
777
|
-
*/
|
|
778
|
-
MachineDetection?: 'Enable' | 'Disable' | 'DetectMessageEnd';
|
|
779
|
-
|
|
780
|
-
/**
|
|
781
|
-
* Silence duration threshold after a call screening prompt before ending prompt
|
|
782
|
-
* detection, in milliseconds. Used when `DetectionMode` is `PremiumCallScreening`.
|
|
783
|
-
*/
|
|
784
|
-
MachineDetectionPromptEndTimeout?: number;
|
|
785
|
-
|
|
786
|
-
/**
|
|
787
|
-
* If initial silence duration is greater than this value, consider it a machine.
|
|
788
|
-
* Ignored when `premium` detection is used.
|
|
789
|
-
*/
|
|
790
|
-
MachineDetectionSilenceTimeout?: number;
|
|
791
|
-
|
|
792
|
-
/**
|
|
793
|
-
* Silence duration threshold after a greeting message or voice for it be
|
|
794
|
-
* considered human. Ignored when `premium` detection is used.
|
|
795
|
-
*/
|
|
796
|
-
MachineDetectionSpeechEndThreshold?: number;
|
|
797
|
-
|
|
798
|
-
/**
|
|
799
|
-
* Maximum threshold of a human greeting. If greeting longer than this value,
|
|
800
|
-
* considered machine. Ignored when `premium` detection is used.
|
|
801
|
-
*/
|
|
802
|
-
MachineDetectionSpeechThreshold?: number;
|
|
803
|
-
|
|
804
|
-
/**
|
|
805
|
-
* Maximum timeout threshold in milliseconds for overall detection.
|
|
806
|
-
*/
|
|
807
|
-
MachineDetectionTimeout?: number;
|
|
808
|
-
|
|
809
|
-
/**
|
|
810
|
-
* Defines whether media should be encrypted on the call. When set to `SRTP`, the
|
|
811
|
-
* call will use Secure Real-time Transport Protocol for media encryption. When set
|
|
812
|
-
* to `DTLS`, the call will use DTLS for media encryption. Only supported for SIP
|
|
813
|
-
* destinations.
|
|
814
|
-
*/
|
|
815
|
-
MediaEncryption?: 'disabled' | 'SRTP' | 'DTLS';
|
|
816
|
-
|
|
817
|
-
/**
|
|
818
|
-
* The list of comma-separated codecs to be offered on a call.
|
|
819
|
-
*/
|
|
820
|
-
PreferredCodecs?: string;
|
|
821
|
-
|
|
822
|
-
/**
|
|
823
|
-
* Whether to record the entire participant's call leg. Defaults to `false`.
|
|
824
|
-
*/
|
|
825
|
-
Record?: boolean;
|
|
826
|
-
|
|
827
|
-
/**
|
|
828
|
-
* The number of channels in the final recording. Defaults to `mono`.
|
|
829
|
-
*/
|
|
830
|
-
RecordingChannels?: 'mono' | 'dual';
|
|
831
|
-
|
|
832
|
-
/**
|
|
833
|
-
* The URL the recording callbacks will be sent to.
|
|
834
|
-
*/
|
|
835
|
-
RecordingStatusCallback?: string;
|
|
836
|
-
|
|
837
|
-
/**
|
|
838
|
-
* The changes to the recording's state that should generate a call to
|
|
839
|
-
* `RecoridngStatusCallback`. Can be: `in-progress`, `completed` and `absent`.
|
|
840
|
-
* Separate multiple values with a space. Defaults to `completed`.
|
|
841
|
-
*/
|
|
842
|
-
RecordingStatusCallbackEvent?: string;
|
|
843
|
-
|
|
844
|
-
/**
|
|
845
|
-
* HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
|
|
846
|
-
*/
|
|
847
|
-
RecordingStatusCallbackMethod?: 'GET' | 'POST';
|
|
848
|
-
|
|
849
|
-
/**
|
|
850
|
-
* The number of seconds that Telnyx will wait for the recording to be stopped if
|
|
851
|
-
* silence is detected. The timer only starts when the speech is detected. Please
|
|
852
|
-
* note that the transcription is used to detect silence and the related charge
|
|
853
|
-
* will be applied. The minimum value is 0. The default value is 0 (infinite)
|
|
854
|
-
*/
|
|
855
|
-
RecordingTimeout?: number;
|
|
856
|
-
|
|
857
|
-
/**
|
|
858
|
-
* The audio track to record for the call. The default is `both`.
|
|
859
|
-
*/
|
|
860
|
-
RecordingTrack?: 'inbound' | 'outbound' | 'both';
|
|
861
|
-
|
|
862
|
-
/**
|
|
863
|
-
* Whether to send RecordingUrl in webhooks.
|
|
864
|
-
*/
|
|
865
|
-
SendRecordingUrl?: boolean;
|
|
866
|
-
|
|
867
|
-
/**
|
|
868
|
-
* The password to use for SIP authentication.
|
|
869
|
-
*/
|
|
870
|
-
SipAuthPassword?: string;
|
|
871
|
-
|
|
872
|
-
/**
|
|
873
|
-
* The username to use for SIP authentication.
|
|
874
|
-
*/
|
|
875
|
-
SipAuthUsername?: string;
|
|
876
|
-
|
|
877
|
-
/**
|
|
878
|
-
* Defines the SIP region to be used for the call.
|
|
879
|
-
*/
|
|
880
|
-
SipRegion?: 'US' | 'Europe' | 'Canada' | 'Australia' | 'Middle East';
|
|
881
|
-
|
|
882
|
-
/**
|
|
883
|
-
* URL destination for Telnyx to send status callback events to for the call.
|
|
884
|
-
*/
|
|
885
|
-
StatusCallback?: string;
|
|
886
|
-
|
|
887
|
-
/**
|
|
888
|
-
* The call events for which Telnyx should send a webhook. Multiple events can be
|
|
889
|
-
* defined when separated by a space.
|
|
890
|
-
*/
|
|
891
|
-
StatusCallbackEvent?: 'initiated' | 'ringing' | 'answered' | 'completed';
|
|
892
|
-
|
|
893
|
-
/**
|
|
894
|
-
* HTTP request type used for `StatusCallback`.
|
|
895
|
-
*/
|
|
896
|
-
StatusCallbackMethod?: 'GET' | 'POST';
|
|
897
|
-
|
|
898
|
-
/**
|
|
899
|
-
* The call control ID of the existing call to supervise. When provided, the
|
|
900
|
-
* created leg will be added to the specified call in supervising mode. Status
|
|
901
|
-
* callbacks and action callbacks will NOT be sent for the supervising leg.
|
|
902
|
-
*/
|
|
903
|
-
SuperviseCallSid?: string;
|
|
904
|
-
|
|
905
|
-
/**
|
|
906
|
-
* The supervising role for the new leg. Determines the audio behavior: barge (hear
|
|
907
|
-
* both sides), whisper (only hear supervisor), monitor (hear both sides but
|
|
908
|
-
* supervisor muted). Default: barge
|
|
909
|
-
*/
|
|
910
|
-
SupervisingRole?: 'barge' | 'whisper' | 'monitor';
|
|
911
|
-
|
|
912
|
-
Texml?: string | null;
|
|
913
|
-
|
|
914
|
-
/**
|
|
915
|
-
* The maximum duration of the call in seconds. The minimum value is 30 and the
|
|
916
|
-
* maximum value is 14400 (4 hours). Default is 14400 seconds.
|
|
917
|
-
*/
|
|
918
|
-
TimeLimit?: number;
|
|
919
|
-
|
|
920
|
-
/**
|
|
921
|
-
* The number of seconds to wait for the called party to answer the call before the
|
|
922
|
-
* call is canceled. The minimum value is 5 and the maximum value is 120. Default
|
|
923
|
-
* is 30 seconds.
|
|
924
|
-
*/
|
|
925
|
-
Timeout?: number;
|
|
926
|
-
|
|
927
|
-
/**
|
|
928
|
-
* The phone number of the called party. Phone numbers are formatted with a `+` and
|
|
929
|
-
* country code.
|
|
930
|
-
*/
|
|
931
|
-
To?: string;
|
|
932
|
-
|
|
933
|
-
/**
|
|
934
|
-
* Whether to trim any leading and trailing silence from the recording. Defaults to
|
|
935
|
-
* `trim-silence`.
|
|
936
|
-
*/
|
|
937
|
-
Trim?: 'trim-silence' | 'do-not-trim';
|
|
938
|
-
|
|
939
|
-
/**
|
|
940
|
-
* HTTP request type used for `Url`. The default value is inherited from TeXML
|
|
941
|
-
* Application setting.
|
|
942
|
-
*/
|
|
943
|
-
UrlMethod?: 'GET' | 'POST';
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
export namespace WithURL {
|
|
947
|
-
export interface CustomHeader {
|
|
948
|
-
/**
|
|
949
|
-
* The name of the custom header
|
|
950
|
-
*/
|
|
951
|
-
name: string;
|
|
952
|
-
|
|
953
|
-
/**
|
|
954
|
-
* The value of the custom header
|
|
955
|
-
*/
|
|
956
|
-
value: string;
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
export interface WithTeXml {
|
|
961
|
-
/**
|
|
962
|
-
* TeXML to be used as instructions for the call. If provided, the call will
|
|
963
|
-
* execute these instructions instead of fetching from the Url.
|
|
964
|
-
*/
|
|
965
|
-
Texml: string;
|
|
966
|
-
|
|
967
|
-
/**
|
|
968
|
-
* The ID of the TeXML Application.
|
|
969
|
-
*/
|
|
970
|
-
ApplicationSid?: string;
|
|
971
|
-
|
|
972
|
-
/**
|
|
973
|
-
* Select whether to perform answering machine detection in the background. By
|
|
974
|
-
* default execution is blocked until Answering Machine Detection is completed.
|
|
975
|
-
*/
|
|
976
|
-
AsyncAmd?: boolean;
|
|
977
|
-
|
|
978
|
-
/**
|
|
979
|
-
* URL destination for Telnyx to send AMD callback events to for the call.
|
|
980
|
-
*/
|
|
981
|
-
AsyncAmdStatusCallback?: string;
|
|
982
|
-
|
|
983
|
-
/**
|
|
984
|
-
* HTTP request type used for `AsyncAmdStatusCallback`. The default value is
|
|
985
|
-
* inherited from TeXML Application setting.
|
|
986
|
-
*/
|
|
987
|
-
AsyncAmdStatusCallbackMethod?: 'GET' | 'POST';
|
|
988
|
-
|
|
989
|
-
/**
|
|
990
|
-
* To be used as the caller id name (SIP From Display Name) presented to the
|
|
991
|
-
* destination (`To` number). The string should have a maximum of 128 characters,
|
|
992
|
-
* containing only letters, numbers, spaces, and `-_~!.+` special characters. If
|
|
993
|
-
* ommited, the display name will be the same as the number in the `From` field.
|
|
994
|
-
*/
|
|
995
|
-
CallerId?: string;
|
|
996
|
-
|
|
997
|
-
/**
|
|
998
|
-
* Whether to cancel ongoing playback on `greeting ended` detection. Defaults to
|
|
999
|
-
* `true`.
|
|
1000
|
-
*/
|
|
1001
|
-
CancelPlaybackOnDetectMessageEnd?: boolean;
|
|
1002
|
-
|
|
1003
|
-
/**
|
|
1004
|
-
* Whether to cancel ongoing playback on `machine` detection. Defaults to `true`.
|
|
1005
|
-
*/
|
|
1006
|
-
CancelPlaybackOnMachineDetection?: boolean;
|
|
1007
|
-
|
|
1008
|
-
/**
|
|
1009
|
-
* Custom HTTP headers to be sent with the call. Each header should be an object
|
|
1010
|
-
* with 'name' and 'value' properties.
|
|
1011
|
-
*/
|
|
1012
|
-
CustomHeaders?: Array<WithTeXml.CustomHeader>;
|
|
1013
|
-
|
|
1014
|
-
/**
|
|
1015
|
-
* Enables Deepfake Detection on the dialed call. When enabled, audio from the
|
|
1016
|
-
* remote party is analyzed to determine whether the voice is AI-generated. Results
|
|
1017
|
-
* are delivered asynchronously via a callback.
|
|
1018
|
-
*/
|
|
1019
|
-
DeepfakeDetection?: 'Enable';
|
|
1020
|
-
|
|
1021
|
-
/**
|
|
1022
|
-
* HTTP request type used for `DeepfakeDetectionCallbackUrl`.
|
|
1023
|
-
*/
|
|
1024
|
-
DeepfakeDetectionCallbackMethod?: 'GET' | 'POST';
|
|
1025
|
-
|
|
1026
|
-
/**
|
|
1027
|
-
* URL destination for Telnyx to send deepfake detection callback events to for the
|
|
1028
|
-
* call.
|
|
1029
|
-
*/
|
|
1030
|
-
DeepfakeDetectionCallbackUrl?: string;
|
|
1031
|
-
|
|
1032
|
-
/**
|
|
1033
|
-
* Allows you to choose between Regular, Premium, and PremiumCallScreening
|
|
1034
|
-
* detections. See
|
|
1035
|
-
* https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection
|
|
1036
|
-
*/
|
|
1037
|
-
DetectionMode?: 'Premium' | 'Regular' | 'PremiumCallScreening';
|
|
687
|
+
/**
|
|
688
|
+
* Initiate a TeXML call. Provide either `Url` (fetches TeXML from URL) or `Texml`
|
|
689
|
+
* (inline TeXML), or neither (uses the application default). `Url` and `Texml` are
|
|
690
|
+
* mutually exclusive.
|
|
691
|
+
*/
|
|
692
|
+
params: CallCallsParams.Params;
|
|
693
|
+
}
|
|
1038
694
|
|
|
695
|
+
export namespace CallCallsParams {
|
|
696
|
+
/**
|
|
697
|
+
* Initiate a TeXML call. Provide either `Url` (fetches TeXML from URL) or `Texml`
|
|
698
|
+
* (inline TeXML), or neither (uses the application default). `Url` and `Texml` are
|
|
699
|
+
* mutually exclusive.
|
|
700
|
+
*/
|
|
701
|
+
export interface Params {
|
|
1039
702
|
/**
|
|
1040
|
-
*
|
|
1041
|
-
* `Url` is not responding.
|
|
703
|
+
* The ID of the TeXML Application.
|
|
1042
704
|
*/
|
|
1043
|
-
|
|
705
|
+
ApplicationSid: string;
|
|
1044
706
|
|
|
1045
707
|
/**
|
|
1046
708
|
* The phone number of the party that initiated the call. Phone numbers are
|
|
1047
709
|
* formatted with a `+` and country code.
|
|
1048
710
|
*/
|
|
1049
|
-
From
|
|
1050
|
-
|
|
1051
|
-
/**
|
|
1052
|
-
* Enables Answering Machine Detection.
|
|
1053
|
-
*/
|
|
1054
|
-
MachineDetection?: 'Enable' | 'Disable' | 'DetectMessageEnd';
|
|
1055
|
-
|
|
1056
|
-
/**
|
|
1057
|
-
* Silence duration threshold after a call screening prompt before ending prompt
|
|
1058
|
-
* detection, in milliseconds. Used when `DetectionMode` is `PremiumCallScreening`.
|
|
1059
|
-
*/
|
|
1060
|
-
MachineDetectionPromptEndTimeout?: number;
|
|
1061
|
-
|
|
1062
|
-
/**
|
|
1063
|
-
* If initial silence duration is greater than this value, consider it a machine.
|
|
1064
|
-
* Ignored when `premium` detection is used.
|
|
1065
|
-
*/
|
|
1066
|
-
MachineDetectionSilenceTimeout?: number;
|
|
1067
|
-
|
|
1068
|
-
/**
|
|
1069
|
-
* Silence duration threshold after a greeting message or voice for it be
|
|
1070
|
-
* considered human. Ignored when `premium` detection is used.
|
|
1071
|
-
*/
|
|
1072
|
-
MachineDetectionSpeechEndThreshold?: number;
|
|
1073
|
-
|
|
1074
|
-
/**
|
|
1075
|
-
* Maximum threshold of a human greeting. If greeting longer than this value,
|
|
1076
|
-
* considered machine. Ignored when `premium` detection is used.
|
|
1077
|
-
*/
|
|
1078
|
-
MachineDetectionSpeechThreshold?: number;
|
|
1079
|
-
|
|
1080
|
-
/**
|
|
1081
|
-
* Maximum timeout threshold in milliseconds for overall detection.
|
|
1082
|
-
*/
|
|
1083
|
-
MachineDetectionTimeout?: number;
|
|
1084
|
-
|
|
1085
|
-
/**
|
|
1086
|
-
* Defines whether media should be encrypted on the call. When set to `SRTP`, the
|
|
1087
|
-
* call will use Secure Real-time Transport Protocol for media encryption. When set
|
|
1088
|
-
* to `DTLS`, the call will use DTLS for media encryption. Only supported for SIP
|
|
1089
|
-
* destinations.
|
|
1090
|
-
*/
|
|
1091
|
-
MediaEncryption?: 'disabled' | 'SRTP' | 'DTLS';
|
|
1092
|
-
|
|
1093
|
-
/**
|
|
1094
|
-
* The list of comma-separated codecs to be offered on a call.
|
|
1095
|
-
*/
|
|
1096
|
-
PreferredCodecs?: string;
|
|
1097
|
-
|
|
1098
|
-
/**
|
|
1099
|
-
* Whether to record the entire participant's call leg. Defaults to `false`.
|
|
1100
|
-
*/
|
|
1101
|
-
Record?: boolean;
|
|
1102
|
-
|
|
1103
|
-
/**
|
|
1104
|
-
* The number of channels in the final recording. Defaults to `mono`.
|
|
1105
|
-
*/
|
|
1106
|
-
RecordingChannels?: 'mono' | 'dual';
|
|
1107
|
-
|
|
1108
|
-
/**
|
|
1109
|
-
* The URL the recording callbacks will be sent to.
|
|
1110
|
-
*/
|
|
1111
|
-
RecordingStatusCallback?: string;
|
|
1112
|
-
|
|
1113
|
-
/**
|
|
1114
|
-
* The changes to the recording's state that should generate a call to
|
|
1115
|
-
* `RecoridngStatusCallback`. Can be: `in-progress`, `completed` and `absent`.
|
|
1116
|
-
* Separate multiple values with a space. Defaults to `completed`.
|
|
1117
|
-
*/
|
|
1118
|
-
RecordingStatusCallbackEvent?: string;
|
|
1119
|
-
|
|
1120
|
-
/**
|
|
1121
|
-
* HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
|
|
1122
|
-
*/
|
|
1123
|
-
RecordingStatusCallbackMethod?: 'GET' | 'POST';
|
|
1124
|
-
|
|
1125
|
-
/**
|
|
1126
|
-
* The number of seconds that Telnyx will wait for the recording to be stopped if
|
|
1127
|
-
* silence is detected. The timer only starts when the speech is detected. Please
|
|
1128
|
-
* note that the transcription is used to detect silence and the related charge
|
|
1129
|
-
* will be applied. The minimum value is 0. The default value is 0 (infinite)
|
|
1130
|
-
*/
|
|
1131
|
-
RecordingTimeout?: number;
|
|
1132
|
-
|
|
1133
|
-
/**
|
|
1134
|
-
* The audio track to record for the call. The default is `both`.
|
|
1135
|
-
*/
|
|
1136
|
-
RecordingTrack?: 'inbound' | 'outbound' | 'both';
|
|
1137
|
-
|
|
1138
|
-
/**
|
|
1139
|
-
* Whether to send RecordingUrl in webhooks.
|
|
1140
|
-
*/
|
|
1141
|
-
SendRecordingUrl?: boolean;
|
|
1142
|
-
|
|
1143
|
-
/**
|
|
1144
|
-
* The password to use for SIP authentication.
|
|
1145
|
-
*/
|
|
1146
|
-
SipAuthPassword?: string;
|
|
1147
|
-
|
|
1148
|
-
/**
|
|
1149
|
-
* The username to use for SIP authentication.
|
|
1150
|
-
*/
|
|
1151
|
-
SipAuthUsername?: string;
|
|
1152
|
-
|
|
1153
|
-
/**
|
|
1154
|
-
* Defines the SIP region to be used for the call.
|
|
1155
|
-
*/
|
|
1156
|
-
SipRegion?: 'US' | 'Europe' | 'Canada' | 'Australia' | 'Middle East';
|
|
1157
|
-
|
|
1158
|
-
/**
|
|
1159
|
-
* URL destination for Telnyx to send status callback events to for the call.
|
|
1160
|
-
*/
|
|
1161
|
-
StatusCallback?: string;
|
|
1162
|
-
|
|
1163
|
-
/**
|
|
1164
|
-
* The call events for which Telnyx should send a webhook. Multiple events can be
|
|
1165
|
-
* defined when separated by a space.
|
|
1166
|
-
*/
|
|
1167
|
-
StatusCallbackEvent?: 'initiated' | 'ringing' | 'answered' | 'completed';
|
|
1168
|
-
|
|
1169
|
-
/**
|
|
1170
|
-
* HTTP request type used for `StatusCallback`.
|
|
1171
|
-
*/
|
|
1172
|
-
StatusCallbackMethod?: 'GET' | 'POST';
|
|
1173
|
-
|
|
1174
|
-
/**
|
|
1175
|
-
* The call control ID of the existing call to supervise. When provided, the
|
|
1176
|
-
* created leg will be added to the specified call in supervising mode. Status
|
|
1177
|
-
* callbacks and action callbacks will NOT be sent for the supervising leg.
|
|
1178
|
-
*/
|
|
1179
|
-
SuperviseCallSid?: string;
|
|
1180
|
-
|
|
1181
|
-
/**
|
|
1182
|
-
* The supervising role for the new leg. Determines the audio behavior: barge (hear
|
|
1183
|
-
* both sides), whisper (only hear supervisor), monitor (hear both sides but
|
|
1184
|
-
* supervisor muted). Default: barge
|
|
1185
|
-
*/
|
|
1186
|
-
SupervisingRole?: 'barge' | 'whisper' | 'monitor';
|
|
1187
|
-
|
|
1188
|
-
/**
|
|
1189
|
-
* The maximum duration of the call in seconds. The minimum value is 30 and the
|
|
1190
|
-
* maximum value is 14400 (4 hours). Default is 14400 seconds.
|
|
1191
|
-
*/
|
|
1192
|
-
TimeLimit?: number;
|
|
1193
|
-
|
|
1194
|
-
/**
|
|
1195
|
-
* The number of seconds to wait for the called party to answer the call before the
|
|
1196
|
-
* call is canceled. The minimum value is 5 and the maximum value is 120. Default
|
|
1197
|
-
* is 30 seconds.
|
|
1198
|
-
*/
|
|
1199
|
-
Timeout?: number;
|
|
711
|
+
From: string;
|
|
1200
712
|
|
|
1201
713
|
/**
|
|
1202
714
|
* The phone number of the called party. Phone numbers are formatted with a `+` and
|
|
1203
715
|
* country code.
|
|
1204
716
|
*/
|
|
1205
|
-
To
|
|
1206
|
-
|
|
1207
|
-
/**
|
|
1208
|
-
* Whether to trim any leading and trailing silence from the recording. Defaults to
|
|
1209
|
-
* `trim-silence`.
|
|
1210
|
-
*/
|
|
1211
|
-
Trim?: 'trim-silence' | 'do-not-trim';
|
|
1212
|
-
|
|
1213
|
-
Url?: string | null;
|
|
1214
|
-
|
|
1215
|
-
/**
|
|
1216
|
-
* HTTP request type used for `Url`. The default value is inherited from TeXML
|
|
1217
|
-
* Application setting.
|
|
1218
|
-
*/
|
|
1219
|
-
UrlMethod?: 'GET' | 'POST';
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
export namespace WithTeXml {
|
|
1223
|
-
export interface CustomHeader {
|
|
1224
|
-
/**
|
|
1225
|
-
* The name of the custom header
|
|
1226
|
-
*/
|
|
1227
|
-
name: string;
|
|
1228
|
-
|
|
1229
|
-
/**
|
|
1230
|
-
* The value of the custom header
|
|
1231
|
-
*/
|
|
1232
|
-
value: string;
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
export interface ApplicationDefault {
|
|
1237
|
-
/**
|
|
1238
|
-
* The ID of the TeXML Application.
|
|
1239
|
-
*/
|
|
1240
|
-
ApplicationSid?: string;
|
|
717
|
+
To: string;
|
|
1241
718
|
|
|
1242
719
|
/**
|
|
1243
720
|
* Select whether to perform answering machine detection in the background. By
|
|
@@ -1279,7 +756,7 @@ export namespace CallCallsParams {
|
|
|
1279
756
|
* Custom HTTP headers to be sent with the call. Each header should be an object
|
|
1280
757
|
* with 'name' and 'value' properties.
|
|
1281
758
|
*/
|
|
1282
|
-
CustomHeaders?: Array<
|
|
759
|
+
CustomHeaders?: Array<Params.CustomHeader>;
|
|
1283
760
|
|
|
1284
761
|
/**
|
|
1285
762
|
* Enables Deepfake Detection on the dialed call. When enabled, audio from the
|
|
@@ -1312,12 +789,6 @@ export namespace CallCallsParams {
|
|
|
1312
789
|
*/
|
|
1313
790
|
FallbackUrl?: string;
|
|
1314
791
|
|
|
1315
|
-
/**
|
|
1316
|
-
* The phone number of the party that initiated the call. Phone numbers are
|
|
1317
|
-
* formatted with a `+` and country code.
|
|
1318
|
-
*/
|
|
1319
|
-
From?: string;
|
|
1320
|
-
|
|
1321
792
|
/**
|
|
1322
793
|
* Enables Answering Machine Detection.
|
|
1323
794
|
*/
|
|
@@ -1455,7 +926,11 @@ export namespace CallCallsParams {
|
|
|
1455
926
|
*/
|
|
1456
927
|
SupervisingRole?: 'barge' | 'whisper' | 'monitor';
|
|
1457
928
|
|
|
1458
|
-
|
|
929
|
+
/**
|
|
930
|
+
* TeXML to be used as instructions for the call. If provided, the call will
|
|
931
|
+
* execute these instructions instead of fetching from the Url.
|
|
932
|
+
*/
|
|
933
|
+
Texml?: string;
|
|
1459
934
|
|
|
1460
935
|
/**
|
|
1461
936
|
* The maximum duration of the call in seconds. The minimum value is 30 and the
|
|
@@ -1470,19 +945,16 @@ export namespace CallCallsParams {
|
|
|
1470
945
|
*/
|
|
1471
946
|
Timeout?: number;
|
|
1472
947
|
|
|
1473
|
-
/**
|
|
1474
|
-
* The phone number of the called party. Phone numbers are formatted with a `+` and
|
|
1475
|
-
* country code.
|
|
1476
|
-
*/
|
|
1477
|
-
To?: string;
|
|
1478
|
-
|
|
1479
948
|
/**
|
|
1480
949
|
* Whether to trim any leading and trailing silence from the recording. Defaults to
|
|
1481
950
|
* `trim-silence`.
|
|
1482
951
|
*/
|
|
1483
952
|
Trim?: 'trim-silence' | 'do-not-trim';
|
|
1484
953
|
|
|
1485
|
-
|
|
954
|
+
/**
|
|
955
|
+
* The URL from which Telnyx will retrieve the TeXML call instructions.
|
|
956
|
+
*/
|
|
957
|
+
Url?: string;
|
|
1486
958
|
|
|
1487
959
|
/**
|
|
1488
960
|
* HTTP request type used for `Url`. The default value is inherited from TeXML
|
|
@@ -1491,7 +963,7 @@ export namespace CallCallsParams {
|
|
|
1491
963
|
UrlMethod?: 'GET' | 'POST';
|
|
1492
964
|
}
|
|
1493
965
|
|
|
1494
|
-
export namespace
|
|
966
|
+
export namespace Params {
|
|
1495
967
|
export interface CustomHeader {
|
|
1496
968
|
/**
|
|
1497
969
|
* The name of the custom header
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
4
|
TextToSpeech,
|
|
5
|
-
type
|
|
5
|
+
type TextToSpeechCreateSpeechResponse,
|
|
6
6
|
type TextToSpeechListVoicesResponse,
|
|
7
7
|
type StreamClientEvent,
|
|
8
8
|
type StreamServerEvent,
|
|
9
|
-
type
|
|
9
|
+
type TextToSpeechCreateSpeechParams,
|
|
10
|
+
type TextToSpeechGenerateSpeechParams,
|
|
10
11
|
type TextToSpeechListVoicesParams,
|
|
11
12
|
type TextToSpeechStreamParams,
|
|
12
13
|
} from './text-to-speech';
|