telnyx 6.36.0 → 6.37.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/package.json +1 -1
- package/resources/texml/accounts/calls/calls.d.mts +613 -208
- package/resources/texml/accounts/calls/calls.d.mts.map +1 -1
- package/resources/texml/accounts/calls/calls.d.ts +613 -208
- package/resources/texml/accounts/calls/calls.d.ts.map +1 -1
- package/resources/texml/accounts/calls/calls.js +1 -5
- package/resources/texml/accounts/calls/calls.js.map +1 -1
- package/resources/texml/accounts/calls/calls.mjs +1 -5
- package/resources/texml/accounts/calls/calls.mjs.map +1 -1
- package/src/resources/texml/accounts/calls/calls.ts +704 -209
- 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,11 +83,7 @@ export class Calls extends APIResource {
|
|
|
83
83
|
* ```ts
|
|
84
84
|
* const response = await client.texml.accounts.calls.calls(
|
|
85
85
|
* 'account_sid',
|
|
86
|
-
* {
|
|
87
|
-
* ApplicationSid: 'example-app-sid',
|
|
88
|
-
* From: '+13120001234',
|
|
89
|
-
* To: '+13121230000',
|
|
90
|
-
* },
|
|
86
|
+
* { Url: 'https://www.example.com/instructions.xml' },
|
|
91
87
|
* );
|
|
92
88
|
* ```
|
|
93
89
|
*/
|
|
@@ -688,256 +684,755 @@ export interface CallUpdateParams {
|
|
|
688
684
|
Url?: string;
|
|
689
685
|
}
|
|
690
686
|
|
|
691
|
-
export
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
ApplicationSid: string;
|
|
687
|
+
export type CallCallsParams =
|
|
688
|
+
| CallCallsParams.WithURL
|
|
689
|
+
| CallCallsParams.WithTeXml
|
|
690
|
+
| CallCallsParams.ApplicationDefault;
|
|
696
691
|
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
692
|
+
export declare namespace CallCallsParams {
|
|
693
|
+
export interface WithURL {
|
|
694
|
+
/**
|
|
695
|
+
* The URL from which Telnyx will retrieve the TeXML call instructions.
|
|
696
|
+
*/
|
|
697
|
+
Url: string;
|
|
702
698
|
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
To: string;
|
|
699
|
+
/**
|
|
700
|
+
* The ID of the TeXML Application.
|
|
701
|
+
*/
|
|
702
|
+
ApplicationSid?: string;
|
|
708
703
|
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
704
|
+
/**
|
|
705
|
+
* Select whether to perform answering machine detection in the background. By
|
|
706
|
+
* default execution is blocked until Answering Machine Detection is completed.
|
|
707
|
+
*/
|
|
708
|
+
AsyncAmd?: boolean;
|
|
714
709
|
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
710
|
+
/**
|
|
711
|
+
* URL destination for Telnyx to send AMD callback events to for the call.
|
|
712
|
+
*/
|
|
713
|
+
AsyncAmdStatusCallback?: string;
|
|
719
714
|
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
715
|
+
/**
|
|
716
|
+
* HTTP request type used for `AsyncAmdStatusCallback`. The default value is
|
|
717
|
+
* inherited from TeXML Application setting.
|
|
718
|
+
*/
|
|
719
|
+
AsyncAmdStatusCallbackMethod?: 'GET' | 'POST';
|
|
725
720
|
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
721
|
+
/**
|
|
722
|
+
* To be used as the caller id name (SIP From Display Name) presented to the
|
|
723
|
+
* destination (`To` number). The string should have a maximum of 128 characters,
|
|
724
|
+
* containing only letters, numbers, spaces, and `-_~!.+` special characters. If
|
|
725
|
+
* ommited, the display name will be the same as the number in the `From` field.
|
|
726
|
+
*/
|
|
727
|
+
CallerId?: string;
|
|
733
728
|
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
729
|
+
/**
|
|
730
|
+
* Whether to cancel ongoing playback on `greeting ended` detection. Defaults to
|
|
731
|
+
* `true`.
|
|
732
|
+
*/
|
|
733
|
+
CancelPlaybackOnDetectMessageEnd?: boolean;
|
|
739
734
|
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
735
|
+
/**
|
|
736
|
+
* Whether to cancel ongoing playback on `machine` detection. Defaults to `true`.
|
|
737
|
+
*/
|
|
738
|
+
CancelPlaybackOnMachineDetection?: boolean;
|
|
744
739
|
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
740
|
+
/**
|
|
741
|
+
* Custom HTTP headers to be sent with the call. Each header should be an object
|
|
742
|
+
* with 'name' and 'value' properties.
|
|
743
|
+
*/
|
|
744
|
+
CustomHeaders?: Array<WithURL.CustomHeader>;
|
|
750
745
|
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
746
|
+
/**
|
|
747
|
+
* Allows you to chose between Premium and Standard detections.
|
|
748
|
+
*/
|
|
749
|
+
DetectionMode?: 'Premium' | 'Regular';
|
|
755
750
|
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
751
|
+
/**
|
|
752
|
+
* A failover URL for which Telnyx will retrieve the TeXML call instructions if the
|
|
753
|
+
* `Url` is not responding.
|
|
754
|
+
*/
|
|
755
|
+
FallbackUrl?: string;
|
|
761
756
|
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
757
|
+
/**
|
|
758
|
+
* The phone number of the party that initiated the call. Phone numbers are
|
|
759
|
+
* formatted with a `+` and country code.
|
|
760
|
+
*/
|
|
761
|
+
From?: string;
|
|
766
762
|
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
MachineDetectionSilenceTimeout?: number;
|
|
763
|
+
/**
|
|
764
|
+
* Enables Answering Machine Detection.
|
|
765
|
+
*/
|
|
766
|
+
MachineDetection?: 'Enable' | 'Disable' | 'DetectMessageEnd';
|
|
772
767
|
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
768
|
+
/**
|
|
769
|
+
* If initial silence duration is greater than this value, consider it a machine.
|
|
770
|
+
* Ignored when `premium` detection is used.
|
|
771
|
+
*/
|
|
772
|
+
MachineDetectionSilenceTimeout?: number;
|
|
778
773
|
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
774
|
+
/**
|
|
775
|
+
* Silence duration threshold after a greeting message or voice for it be
|
|
776
|
+
* considered human. Ignored when `premium` detection is used.
|
|
777
|
+
*/
|
|
778
|
+
MachineDetectionSpeechEndThreshold?: number;
|
|
784
779
|
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
780
|
+
/**
|
|
781
|
+
* Maximum threshold of a human greeting. If greeting longer than this value,
|
|
782
|
+
* considered machine. Ignored when `premium` detection is used.
|
|
783
|
+
*/
|
|
784
|
+
MachineDetectionSpeechThreshold?: number;
|
|
789
785
|
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
* destinations.
|
|
795
|
-
*/
|
|
796
|
-
MediaEncryption?: 'disabled' | 'SRTP' | 'DTLS';
|
|
786
|
+
/**
|
|
787
|
+
* Maximum timeout threshold in milliseconds for overall detection.
|
|
788
|
+
*/
|
|
789
|
+
MachineDetectionTimeout?: number;
|
|
797
790
|
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
791
|
+
/**
|
|
792
|
+
* Defines whether media should be encrypted on the call. When set to `SRTP`, the
|
|
793
|
+
* call will use Secure Real-time Transport Protocol for media encryption. When set
|
|
794
|
+
* to `DTLS`, the call will use DTLS for media encryption. Only supported for SIP
|
|
795
|
+
* destinations.
|
|
796
|
+
*/
|
|
797
|
+
MediaEncryption?: 'disabled' | 'SRTP' | 'DTLS';
|
|
802
798
|
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
799
|
+
/**
|
|
800
|
+
* The list of comma-separated codecs to be offered on a call.
|
|
801
|
+
*/
|
|
802
|
+
PreferredCodecs?: string;
|
|
807
803
|
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
804
|
+
/**
|
|
805
|
+
* Whether to record the entire participant's call leg. Defaults to `false`.
|
|
806
|
+
*/
|
|
807
|
+
Record?: boolean;
|
|
812
808
|
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
809
|
+
/**
|
|
810
|
+
* The number of channels in the final recording. Defaults to `mono`.
|
|
811
|
+
*/
|
|
812
|
+
RecordingChannels?: 'mono' | 'dual';
|
|
817
813
|
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
*/
|
|
823
|
-
RecordingStatusCallbackEvent?: string;
|
|
814
|
+
/**
|
|
815
|
+
* The URL the recording callbacks will be sent to.
|
|
816
|
+
*/
|
|
817
|
+
RecordingStatusCallback?: string;
|
|
824
818
|
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
819
|
+
/**
|
|
820
|
+
* The changes to the recording's state that should generate a call to
|
|
821
|
+
* `RecoridngStatusCallback`. Can be: `in-progress`, `completed` and `absent`.
|
|
822
|
+
* Separate multiple values with a space. Defaults to `completed`.
|
|
823
|
+
*/
|
|
824
|
+
RecordingStatusCallbackEvent?: string;
|
|
829
825
|
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
* will be applied. The minimum value is 0. The default value is 0 (infinite)
|
|
835
|
-
*/
|
|
836
|
-
RecordingTimeout?: number;
|
|
826
|
+
/**
|
|
827
|
+
* HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
|
|
828
|
+
*/
|
|
829
|
+
RecordingStatusCallbackMethod?: 'GET' | 'POST';
|
|
837
830
|
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
831
|
+
/**
|
|
832
|
+
* The number of seconds that Telnyx will wait for the recording to be stopped if
|
|
833
|
+
* silence is detected. The timer only starts when the speech is detected. Please
|
|
834
|
+
* note that the transcription is used to detect silence and the related charge
|
|
835
|
+
* will be applied. The minimum value is 0. The default value is 0 (infinite)
|
|
836
|
+
*/
|
|
837
|
+
RecordingTimeout?: number;
|
|
842
838
|
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
839
|
+
/**
|
|
840
|
+
* The audio track to record for the call. The default is `both`.
|
|
841
|
+
*/
|
|
842
|
+
RecordingTrack?: 'inbound' | 'outbound' | 'both';
|
|
847
843
|
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
844
|
+
/**
|
|
845
|
+
* Whether to send RecordingUrl in webhooks.
|
|
846
|
+
*/
|
|
847
|
+
SendRecordingUrl?: boolean;
|
|
852
848
|
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
849
|
+
/**
|
|
850
|
+
* The password to use for SIP authentication.
|
|
851
|
+
*/
|
|
852
|
+
SipAuthPassword?: string;
|
|
857
853
|
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
854
|
+
/**
|
|
855
|
+
* The username to use for SIP authentication.
|
|
856
|
+
*/
|
|
857
|
+
SipAuthUsername?: string;
|
|
862
858
|
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
859
|
+
/**
|
|
860
|
+
* Defines the SIP region to be used for the call.
|
|
861
|
+
*/
|
|
862
|
+
SipRegion?: 'US' | 'Europe' | 'Canada' | 'Australia' | 'Middle East';
|
|
867
863
|
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
StatusCallbackEvent?: 'initiated' | 'ringing' | 'answered' | 'completed';
|
|
864
|
+
/**
|
|
865
|
+
* URL destination for Telnyx to send status callback events to for the call.
|
|
866
|
+
*/
|
|
867
|
+
StatusCallback?: string;
|
|
873
868
|
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
869
|
+
/**
|
|
870
|
+
* The call events for which Telnyx should send a webhook. Multiple events can be
|
|
871
|
+
* defined when separated by a space.
|
|
872
|
+
*/
|
|
873
|
+
StatusCallbackEvent?: 'initiated' | 'ringing' | 'answered' | 'completed';
|
|
878
874
|
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
*/
|
|
884
|
-
SuperviseCallSid?: string;
|
|
875
|
+
/**
|
|
876
|
+
* HTTP request type used for `StatusCallback`.
|
|
877
|
+
*/
|
|
878
|
+
StatusCallbackMethod?: 'GET' | 'POST';
|
|
885
879
|
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
880
|
+
/**
|
|
881
|
+
* The call control ID of the existing call to supervise. When provided, the
|
|
882
|
+
* created leg will be added to the specified call in supervising mode. Status
|
|
883
|
+
* callbacks and action callbacks will NOT be sent for the supervising leg.
|
|
884
|
+
*/
|
|
885
|
+
SuperviseCallSid?: string;
|
|
892
886
|
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
887
|
+
/**
|
|
888
|
+
* The supervising role for the new leg. Determines the audio behavior: barge (hear
|
|
889
|
+
* both sides), whisper (only hear supervisor), monitor (hear both sides but
|
|
890
|
+
* supervisor muted). Default: barge
|
|
891
|
+
*/
|
|
892
|
+
SupervisingRole?: 'barge' | 'whisper' | 'monitor';
|
|
898
893
|
|
|
899
|
-
|
|
900
|
-
* The maximum duration of the call in seconds. The minimum value is 30 and the
|
|
901
|
-
* maximum value is 14400 (4 hours). Default is 14400 seconds.
|
|
902
|
-
*/
|
|
903
|
-
TimeLimit?: number;
|
|
894
|
+
Texml?: unknown;
|
|
904
895
|
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
timeout_seconds?: number;
|
|
896
|
+
/**
|
|
897
|
+
* The maximum duration of the call in seconds. The minimum value is 30 and the
|
|
898
|
+
* maximum value is 14400 (4 hours). Default is 14400 seconds.
|
|
899
|
+
*/
|
|
900
|
+
TimeLimit?: number;
|
|
911
901
|
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
902
|
+
/**
|
|
903
|
+
* The number of seconds to wait for the called party to answer the call before the
|
|
904
|
+
* call is canceled. The minimum value is 5 and the maximum value is 120. Default
|
|
905
|
+
* is 30 seconds.
|
|
906
|
+
*/
|
|
907
|
+
timeout_seconds?: number;
|
|
917
908
|
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
909
|
+
/**
|
|
910
|
+
* The phone number of the called party. Phone numbers are formatted with a `+` and
|
|
911
|
+
* country code.
|
|
912
|
+
*/
|
|
913
|
+
To?: string;
|
|
922
914
|
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
915
|
+
/**
|
|
916
|
+
* Whether to trim any leading and trailing silence from the recording. Defaults to
|
|
917
|
+
* `trim-silence`.
|
|
918
|
+
*/
|
|
919
|
+
Trim?: 'trim-silence' | 'do-not-trim';
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* HTTP request type used for `Url`. The default value is inherited from TeXML
|
|
923
|
+
* Application setting.
|
|
924
|
+
*/
|
|
925
|
+
UrlMethod?: 'GET' | 'POST';
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
export namespace WithURL {
|
|
929
|
+
export interface CustomHeader {
|
|
930
|
+
/**
|
|
931
|
+
* The name of the custom header
|
|
932
|
+
*/
|
|
933
|
+
name: string;
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* The value of the custom header
|
|
937
|
+
*/
|
|
938
|
+
value: string;
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
export interface WithTeXml {
|
|
943
|
+
/**
|
|
944
|
+
* TeXML to be used as instructions for the call. If provided, the call will
|
|
945
|
+
* execute these instructions instead of fetching from the Url.
|
|
946
|
+
*/
|
|
947
|
+
Texml: string;
|
|
948
|
+
|
|
949
|
+
/**
|
|
950
|
+
* The ID of the TeXML Application.
|
|
951
|
+
*/
|
|
952
|
+
ApplicationSid?: string;
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* Select whether to perform answering machine detection in the background. By
|
|
956
|
+
* default execution is blocked until Answering Machine Detection is completed.
|
|
957
|
+
*/
|
|
958
|
+
AsyncAmd?: boolean;
|
|
959
|
+
|
|
960
|
+
/**
|
|
961
|
+
* URL destination for Telnyx to send AMD callback events to for the call.
|
|
962
|
+
*/
|
|
963
|
+
AsyncAmdStatusCallback?: string;
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* HTTP request type used for `AsyncAmdStatusCallback`. The default value is
|
|
967
|
+
* inherited from TeXML Application setting.
|
|
968
|
+
*/
|
|
969
|
+
AsyncAmdStatusCallbackMethod?: 'GET' | 'POST';
|
|
970
|
+
|
|
971
|
+
/**
|
|
972
|
+
* To be used as the caller id name (SIP From Display Name) presented to the
|
|
973
|
+
* destination (`To` number). The string should have a maximum of 128 characters,
|
|
974
|
+
* containing only letters, numbers, spaces, and `-_~!.+` special characters. If
|
|
975
|
+
* ommited, the display name will be the same as the number in the `From` field.
|
|
976
|
+
*/
|
|
977
|
+
CallerId?: string;
|
|
978
|
+
|
|
979
|
+
/**
|
|
980
|
+
* Whether to cancel ongoing playback on `greeting ended` detection. Defaults to
|
|
981
|
+
* `true`.
|
|
982
|
+
*/
|
|
983
|
+
CancelPlaybackOnDetectMessageEnd?: boolean;
|
|
984
|
+
|
|
985
|
+
/**
|
|
986
|
+
* Whether to cancel ongoing playback on `machine` detection. Defaults to `true`.
|
|
987
|
+
*/
|
|
988
|
+
CancelPlaybackOnMachineDetection?: boolean;
|
|
989
|
+
|
|
990
|
+
/**
|
|
991
|
+
* Custom HTTP headers to be sent with the call. Each header should be an object
|
|
992
|
+
* with 'name' and 'value' properties.
|
|
993
|
+
*/
|
|
994
|
+
CustomHeaders?: Array<WithTeXml.CustomHeader>;
|
|
995
|
+
|
|
996
|
+
/**
|
|
997
|
+
* Allows you to chose between Premium and Standard detections.
|
|
998
|
+
*/
|
|
999
|
+
DetectionMode?: 'Premium' | 'Regular';
|
|
1000
|
+
|
|
1001
|
+
/**
|
|
1002
|
+
* A failover URL for which Telnyx will retrieve the TeXML call instructions if the
|
|
1003
|
+
* `Url` is not responding.
|
|
1004
|
+
*/
|
|
1005
|
+
FallbackUrl?: string;
|
|
1006
|
+
|
|
1007
|
+
/**
|
|
1008
|
+
* The phone number of the party that initiated the call. Phone numbers are
|
|
1009
|
+
* formatted with a `+` and country code.
|
|
1010
|
+
*/
|
|
1011
|
+
From?: string;
|
|
1012
|
+
|
|
1013
|
+
/**
|
|
1014
|
+
* Enables Answering Machine Detection.
|
|
1015
|
+
*/
|
|
1016
|
+
MachineDetection?: 'Enable' | 'Disable' | 'DetectMessageEnd';
|
|
1017
|
+
|
|
1018
|
+
/**
|
|
1019
|
+
* If initial silence duration is greater than this value, consider it a machine.
|
|
1020
|
+
* Ignored when `premium` detection is used.
|
|
1021
|
+
*/
|
|
1022
|
+
MachineDetectionSilenceTimeout?: number;
|
|
1023
|
+
|
|
1024
|
+
/**
|
|
1025
|
+
* Silence duration threshold after a greeting message or voice for it be
|
|
1026
|
+
* considered human. Ignored when `premium` detection is used.
|
|
1027
|
+
*/
|
|
1028
|
+
MachineDetectionSpeechEndThreshold?: number;
|
|
1029
|
+
|
|
1030
|
+
/**
|
|
1031
|
+
* Maximum threshold of a human greeting. If greeting longer than this value,
|
|
1032
|
+
* considered machine. Ignored when `premium` detection is used.
|
|
1033
|
+
*/
|
|
1034
|
+
MachineDetectionSpeechThreshold?: number;
|
|
1035
|
+
|
|
1036
|
+
/**
|
|
1037
|
+
* Maximum timeout threshold in milliseconds for overall detection.
|
|
1038
|
+
*/
|
|
1039
|
+
MachineDetectionTimeout?: number;
|
|
1040
|
+
|
|
1041
|
+
/**
|
|
1042
|
+
* Defines whether media should be encrypted on the call. When set to `SRTP`, the
|
|
1043
|
+
* call will use Secure Real-time Transport Protocol for media encryption. When set
|
|
1044
|
+
* to `DTLS`, the call will use DTLS for media encryption. Only supported for SIP
|
|
1045
|
+
* destinations.
|
|
1046
|
+
*/
|
|
1047
|
+
MediaEncryption?: 'disabled' | 'SRTP' | 'DTLS';
|
|
1048
|
+
|
|
1049
|
+
/**
|
|
1050
|
+
* The list of comma-separated codecs to be offered on a call.
|
|
1051
|
+
*/
|
|
1052
|
+
PreferredCodecs?: string;
|
|
1053
|
+
|
|
1054
|
+
/**
|
|
1055
|
+
* Whether to record the entire participant's call leg. Defaults to `false`.
|
|
1056
|
+
*/
|
|
1057
|
+
Record?: boolean;
|
|
1058
|
+
|
|
1059
|
+
/**
|
|
1060
|
+
* The number of channels in the final recording. Defaults to `mono`.
|
|
1061
|
+
*/
|
|
1062
|
+
RecordingChannels?: 'mono' | 'dual';
|
|
1063
|
+
|
|
1064
|
+
/**
|
|
1065
|
+
* The URL the recording callbacks will be sent to.
|
|
1066
|
+
*/
|
|
1067
|
+
RecordingStatusCallback?: string;
|
|
1068
|
+
|
|
1069
|
+
/**
|
|
1070
|
+
* The changes to the recording's state that should generate a call to
|
|
1071
|
+
* `RecoridngStatusCallback`. Can be: `in-progress`, `completed` and `absent`.
|
|
1072
|
+
* Separate multiple values with a space. Defaults to `completed`.
|
|
1073
|
+
*/
|
|
1074
|
+
RecordingStatusCallbackEvent?: string;
|
|
1075
|
+
|
|
1076
|
+
/**
|
|
1077
|
+
* HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
|
|
1078
|
+
*/
|
|
1079
|
+
RecordingStatusCallbackMethod?: 'GET' | 'POST';
|
|
1080
|
+
|
|
1081
|
+
/**
|
|
1082
|
+
* The number of seconds that Telnyx will wait for the recording to be stopped if
|
|
1083
|
+
* silence is detected. The timer only starts when the speech is detected. Please
|
|
1084
|
+
* note that the transcription is used to detect silence and the related charge
|
|
1085
|
+
* will be applied. The minimum value is 0. The default value is 0 (infinite)
|
|
1086
|
+
*/
|
|
1087
|
+
RecordingTimeout?: number;
|
|
1088
|
+
|
|
1089
|
+
/**
|
|
1090
|
+
* The audio track to record for the call. The default is `both`.
|
|
1091
|
+
*/
|
|
1092
|
+
RecordingTrack?: 'inbound' | 'outbound' | 'both';
|
|
1093
|
+
|
|
1094
|
+
/**
|
|
1095
|
+
* Whether to send RecordingUrl in webhooks.
|
|
1096
|
+
*/
|
|
1097
|
+
SendRecordingUrl?: boolean;
|
|
1098
|
+
|
|
1099
|
+
/**
|
|
1100
|
+
* The password to use for SIP authentication.
|
|
1101
|
+
*/
|
|
1102
|
+
SipAuthPassword?: string;
|
|
1103
|
+
|
|
1104
|
+
/**
|
|
1105
|
+
* The username to use for SIP authentication.
|
|
1106
|
+
*/
|
|
1107
|
+
SipAuthUsername?: string;
|
|
1108
|
+
|
|
1109
|
+
/**
|
|
1110
|
+
* Defines the SIP region to be used for the call.
|
|
1111
|
+
*/
|
|
1112
|
+
SipRegion?: 'US' | 'Europe' | 'Canada' | 'Australia' | 'Middle East';
|
|
1113
|
+
|
|
1114
|
+
/**
|
|
1115
|
+
* URL destination for Telnyx to send status callback events to for the call.
|
|
1116
|
+
*/
|
|
1117
|
+
StatusCallback?: string;
|
|
1118
|
+
|
|
1119
|
+
/**
|
|
1120
|
+
* The call events for which Telnyx should send a webhook. Multiple events can be
|
|
1121
|
+
* defined when separated by a space.
|
|
1122
|
+
*/
|
|
1123
|
+
StatusCallbackEvent?: 'initiated' | 'ringing' | 'answered' | 'completed';
|
|
1124
|
+
|
|
1125
|
+
/**
|
|
1126
|
+
* HTTP request type used for `StatusCallback`.
|
|
1127
|
+
*/
|
|
1128
|
+
StatusCallbackMethod?: 'GET' | 'POST';
|
|
1129
|
+
|
|
1130
|
+
/**
|
|
1131
|
+
* The call control ID of the existing call to supervise. When provided, the
|
|
1132
|
+
* created leg will be added to the specified call in supervising mode. Status
|
|
1133
|
+
* callbacks and action callbacks will NOT be sent for the supervising leg.
|
|
1134
|
+
*/
|
|
1135
|
+
SuperviseCallSid?: string;
|
|
1136
|
+
|
|
1137
|
+
/**
|
|
1138
|
+
* The supervising role for the new leg. Determines the audio behavior: barge (hear
|
|
1139
|
+
* both sides), whisper (only hear supervisor), monitor (hear both sides but
|
|
1140
|
+
* supervisor muted). Default: barge
|
|
1141
|
+
*/
|
|
1142
|
+
SupervisingRole?: 'barge' | 'whisper' | 'monitor';
|
|
1143
|
+
|
|
1144
|
+
/**
|
|
1145
|
+
* The maximum duration of the call in seconds. The minimum value is 30 and the
|
|
1146
|
+
* maximum value is 14400 (4 hours). Default is 14400 seconds.
|
|
1147
|
+
*/
|
|
1148
|
+
TimeLimit?: number;
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
* The number of seconds to wait for the called party to answer the call before the
|
|
1152
|
+
* call is canceled. The minimum value is 5 and the maximum value is 120. Default
|
|
1153
|
+
* is 30 seconds.
|
|
1154
|
+
*/
|
|
1155
|
+
timeout_seconds?: number;
|
|
1156
|
+
|
|
1157
|
+
/**
|
|
1158
|
+
* The phone number of the called party. Phone numbers are formatted with a `+` and
|
|
1159
|
+
* country code.
|
|
1160
|
+
*/
|
|
1161
|
+
To?: string;
|
|
1162
|
+
|
|
1163
|
+
/**
|
|
1164
|
+
* Whether to trim any leading and trailing silence from the recording. Defaults to
|
|
1165
|
+
* `trim-silence`.
|
|
1166
|
+
*/
|
|
1167
|
+
Trim?: 'trim-silence' | 'do-not-trim';
|
|
1168
|
+
|
|
1169
|
+
Url?: unknown;
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* HTTP request type used for `Url`. The default value is inherited from TeXML
|
|
1173
|
+
* Application setting.
|
|
1174
|
+
*/
|
|
1175
|
+
UrlMethod?: 'GET' | 'POST';
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
export namespace WithTeXml {
|
|
1179
|
+
export interface CustomHeader {
|
|
1180
|
+
/**
|
|
1181
|
+
* The name of the custom header
|
|
1182
|
+
*/
|
|
1183
|
+
name: string;
|
|
1184
|
+
|
|
1185
|
+
/**
|
|
1186
|
+
* The value of the custom header
|
|
1187
|
+
*/
|
|
1188
|
+
value: string;
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
export interface ApplicationDefault {
|
|
1193
|
+
/**
|
|
1194
|
+
* The ID of the TeXML Application.
|
|
1195
|
+
*/
|
|
1196
|
+
ApplicationSid?: string;
|
|
1197
|
+
|
|
1198
|
+
/**
|
|
1199
|
+
* Select whether to perform answering machine detection in the background. By
|
|
1200
|
+
* default execution is blocked until Answering Machine Detection is completed.
|
|
1201
|
+
*/
|
|
1202
|
+
AsyncAmd?: boolean;
|
|
1203
|
+
|
|
1204
|
+
/**
|
|
1205
|
+
* URL destination for Telnyx to send AMD callback events to for the call.
|
|
1206
|
+
*/
|
|
1207
|
+
AsyncAmdStatusCallback?: string;
|
|
1208
|
+
|
|
1209
|
+
/**
|
|
1210
|
+
* HTTP request type used for `AsyncAmdStatusCallback`. The default value is
|
|
1211
|
+
* inherited from TeXML Application setting.
|
|
1212
|
+
*/
|
|
1213
|
+
AsyncAmdStatusCallbackMethod?: 'GET' | 'POST';
|
|
929
1214
|
|
|
930
|
-
export namespace CallCallsParams {
|
|
931
|
-
export interface CustomHeader {
|
|
932
1215
|
/**
|
|
933
|
-
*
|
|
1216
|
+
* To be used as the caller id name (SIP From Display Name) presented to the
|
|
1217
|
+
* destination (`To` number). The string should have a maximum of 128 characters,
|
|
1218
|
+
* containing only letters, numbers, spaces, and `-_~!.+` special characters. If
|
|
1219
|
+
* ommited, the display name will be the same as the number in the `From` field.
|
|
934
1220
|
*/
|
|
935
|
-
|
|
1221
|
+
CallerId?: string;
|
|
936
1222
|
|
|
937
1223
|
/**
|
|
938
|
-
*
|
|
1224
|
+
* Whether to cancel ongoing playback on `greeting ended` detection. Defaults to
|
|
1225
|
+
* `true`.
|
|
939
1226
|
*/
|
|
940
|
-
|
|
1227
|
+
CancelPlaybackOnDetectMessageEnd?: boolean;
|
|
1228
|
+
|
|
1229
|
+
/**
|
|
1230
|
+
* Whether to cancel ongoing playback on `machine` detection. Defaults to `true`.
|
|
1231
|
+
*/
|
|
1232
|
+
CancelPlaybackOnMachineDetection?: boolean;
|
|
1233
|
+
|
|
1234
|
+
/**
|
|
1235
|
+
* Custom HTTP headers to be sent with the call. Each header should be an object
|
|
1236
|
+
* with 'name' and 'value' properties.
|
|
1237
|
+
*/
|
|
1238
|
+
CustomHeaders?: Array<ApplicationDefault.CustomHeader>;
|
|
1239
|
+
|
|
1240
|
+
/**
|
|
1241
|
+
* Allows you to chose between Premium and Standard detections.
|
|
1242
|
+
*/
|
|
1243
|
+
DetectionMode?: 'Premium' | 'Regular';
|
|
1244
|
+
|
|
1245
|
+
/**
|
|
1246
|
+
* A failover URL for which Telnyx will retrieve the TeXML call instructions if the
|
|
1247
|
+
* `Url` is not responding.
|
|
1248
|
+
*/
|
|
1249
|
+
FallbackUrl?: string;
|
|
1250
|
+
|
|
1251
|
+
/**
|
|
1252
|
+
* The phone number of the party that initiated the call. Phone numbers are
|
|
1253
|
+
* formatted with a `+` and country code.
|
|
1254
|
+
*/
|
|
1255
|
+
From?: string;
|
|
1256
|
+
|
|
1257
|
+
/**
|
|
1258
|
+
* Enables Answering Machine Detection.
|
|
1259
|
+
*/
|
|
1260
|
+
MachineDetection?: 'Enable' | 'Disable' | 'DetectMessageEnd';
|
|
1261
|
+
|
|
1262
|
+
/**
|
|
1263
|
+
* If initial silence duration is greater than this value, consider it a machine.
|
|
1264
|
+
* Ignored when `premium` detection is used.
|
|
1265
|
+
*/
|
|
1266
|
+
MachineDetectionSilenceTimeout?: number;
|
|
1267
|
+
|
|
1268
|
+
/**
|
|
1269
|
+
* Silence duration threshold after a greeting message or voice for it be
|
|
1270
|
+
* considered human. Ignored when `premium` detection is used.
|
|
1271
|
+
*/
|
|
1272
|
+
MachineDetectionSpeechEndThreshold?: number;
|
|
1273
|
+
|
|
1274
|
+
/**
|
|
1275
|
+
* Maximum threshold of a human greeting. If greeting longer than this value,
|
|
1276
|
+
* considered machine. Ignored when `premium` detection is used.
|
|
1277
|
+
*/
|
|
1278
|
+
MachineDetectionSpeechThreshold?: number;
|
|
1279
|
+
|
|
1280
|
+
/**
|
|
1281
|
+
* Maximum timeout threshold in milliseconds for overall detection.
|
|
1282
|
+
*/
|
|
1283
|
+
MachineDetectionTimeout?: number;
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* Defines whether media should be encrypted on the call. When set to `SRTP`, the
|
|
1287
|
+
* call will use Secure Real-time Transport Protocol for media encryption. When set
|
|
1288
|
+
* to `DTLS`, the call will use DTLS for media encryption. Only supported for SIP
|
|
1289
|
+
* destinations.
|
|
1290
|
+
*/
|
|
1291
|
+
MediaEncryption?: 'disabled' | 'SRTP' | 'DTLS';
|
|
1292
|
+
|
|
1293
|
+
/**
|
|
1294
|
+
* The list of comma-separated codecs to be offered on a call.
|
|
1295
|
+
*/
|
|
1296
|
+
PreferredCodecs?: string;
|
|
1297
|
+
|
|
1298
|
+
/**
|
|
1299
|
+
* Whether to record the entire participant's call leg. Defaults to `false`.
|
|
1300
|
+
*/
|
|
1301
|
+
Record?: boolean;
|
|
1302
|
+
|
|
1303
|
+
/**
|
|
1304
|
+
* The number of channels in the final recording. Defaults to `mono`.
|
|
1305
|
+
*/
|
|
1306
|
+
RecordingChannels?: 'mono' | 'dual';
|
|
1307
|
+
|
|
1308
|
+
/**
|
|
1309
|
+
* The URL the recording callbacks will be sent to.
|
|
1310
|
+
*/
|
|
1311
|
+
RecordingStatusCallback?: string;
|
|
1312
|
+
|
|
1313
|
+
/**
|
|
1314
|
+
* The changes to the recording's state that should generate a call to
|
|
1315
|
+
* `RecoridngStatusCallback`. Can be: `in-progress`, `completed` and `absent`.
|
|
1316
|
+
* Separate multiple values with a space. Defaults to `completed`.
|
|
1317
|
+
*/
|
|
1318
|
+
RecordingStatusCallbackEvent?: string;
|
|
1319
|
+
|
|
1320
|
+
/**
|
|
1321
|
+
* HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
|
|
1322
|
+
*/
|
|
1323
|
+
RecordingStatusCallbackMethod?: 'GET' | 'POST';
|
|
1324
|
+
|
|
1325
|
+
/**
|
|
1326
|
+
* The number of seconds that Telnyx will wait for the recording to be stopped if
|
|
1327
|
+
* silence is detected. The timer only starts when the speech is detected. Please
|
|
1328
|
+
* note that the transcription is used to detect silence and the related charge
|
|
1329
|
+
* will be applied. The minimum value is 0. The default value is 0 (infinite)
|
|
1330
|
+
*/
|
|
1331
|
+
RecordingTimeout?: number;
|
|
1332
|
+
|
|
1333
|
+
/**
|
|
1334
|
+
* The audio track to record for the call. The default is `both`.
|
|
1335
|
+
*/
|
|
1336
|
+
RecordingTrack?: 'inbound' | 'outbound' | 'both';
|
|
1337
|
+
|
|
1338
|
+
/**
|
|
1339
|
+
* Whether to send RecordingUrl in webhooks.
|
|
1340
|
+
*/
|
|
1341
|
+
SendRecordingUrl?: boolean;
|
|
1342
|
+
|
|
1343
|
+
/**
|
|
1344
|
+
* The password to use for SIP authentication.
|
|
1345
|
+
*/
|
|
1346
|
+
SipAuthPassword?: string;
|
|
1347
|
+
|
|
1348
|
+
/**
|
|
1349
|
+
* The username to use for SIP authentication.
|
|
1350
|
+
*/
|
|
1351
|
+
SipAuthUsername?: string;
|
|
1352
|
+
|
|
1353
|
+
/**
|
|
1354
|
+
* Defines the SIP region to be used for the call.
|
|
1355
|
+
*/
|
|
1356
|
+
SipRegion?: 'US' | 'Europe' | 'Canada' | 'Australia' | 'Middle East';
|
|
1357
|
+
|
|
1358
|
+
/**
|
|
1359
|
+
* URL destination for Telnyx to send status callback events to for the call.
|
|
1360
|
+
*/
|
|
1361
|
+
StatusCallback?: string;
|
|
1362
|
+
|
|
1363
|
+
/**
|
|
1364
|
+
* The call events for which Telnyx should send a webhook. Multiple events can be
|
|
1365
|
+
* defined when separated by a space.
|
|
1366
|
+
*/
|
|
1367
|
+
StatusCallbackEvent?: 'initiated' | 'ringing' | 'answered' | 'completed';
|
|
1368
|
+
|
|
1369
|
+
/**
|
|
1370
|
+
* HTTP request type used for `StatusCallback`.
|
|
1371
|
+
*/
|
|
1372
|
+
StatusCallbackMethod?: 'GET' | 'POST';
|
|
1373
|
+
|
|
1374
|
+
/**
|
|
1375
|
+
* The call control ID of the existing call to supervise. When provided, the
|
|
1376
|
+
* created leg will be added to the specified call in supervising mode. Status
|
|
1377
|
+
* callbacks and action callbacks will NOT be sent for the supervising leg.
|
|
1378
|
+
*/
|
|
1379
|
+
SuperviseCallSid?: string;
|
|
1380
|
+
|
|
1381
|
+
/**
|
|
1382
|
+
* The supervising role for the new leg. Determines the audio behavior: barge (hear
|
|
1383
|
+
* both sides), whisper (only hear supervisor), monitor (hear both sides but
|
|
1384
|
+
* supervisor muted). Default: barge
|
|
1385
|
+
*/
|
|
1386
|
+
SupervisingRole?: 'barge' | 'whisper' | 'monitor';
|
|
1387
|
+
|
|
1388
|
+
Texml?: unknown;
|
|
1389
|
+
|
|
1390
|
+
/**
|
|
1391
|
+
* The maximum duration of the call in seconds. The minimum value is 30 and the
|
|
1392
|
+
* maximum value is 14400 (4 hours). Default is 14400 seconds.
|
|
1393
|
+
*/
|
|
1394
|
+
TimeLimit?: number;
|
|
1395
|
+
|
|
1396
|
+
/**
|
|
1397
|
+
* The number of seconds to wait for the called party to answer the call before the
|
|
1398
|
+
* call is canceled. The minimum value is 5 and the maximum value is 120. Default
|
|
1399
|
+
* is 30 seconds.
|
|
1400
|
+
*/
|
|
1401
|
+
timeout_seconds?: number;
|
|
1402
|
+
|
|
1403
|
+
/**
|
|
1404
|
+
* The phone number of the called party. Phone numbers are formatted with a `+` and
|
|
1405
|
+
* country code.
|
|
1406
|
+
*/
|
|
1407
|
+
To?: string;
|
|
1408
|
+
|
|
1409
|
+
/**
|
|
1410
|
+
* Whether to trim any leading and trailing silence from the recording. Defaults to
|
|
1411
|
+
* `trim-silence`.
|
|
1412
|
+
*/
|
|
1413
|
+
Trim?: 'trim-silence' | 'do-not-trim';
|
|
1414
|
+
|
|
1415
|
+
Url?: unknown;
|
|
1416
|
+
|
|
1417
|
+
/**
|
|
1418
|
+
* HTTP request type used for `Url`. The default value is inherited from TeXML
|
|
1419
|
+
* Application setting.
|
|
1420
|
+
*/
|
|
1421
|
+
UrlMethod?: 'GET' | 'POST';
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
export namespace ApplicationDefault {
|
|
1425
|
+
export interface CustomHeader {
|
|
1426
|
+
/**
|
|
1427
|
+
* The name of the custom header
|
|
1428
|
+
*/
|
|
1429
|
+
name: string;
|
|
1430
|
+
|
|
1431
|
+
/**
|
|
1432
|
+
* The value of the custom header
|
|
1433
|
+
*/
|
|
1434
|
+
value: string;
|
|
1435
|
+
}
|
|
941
1436
|
}
|
|
942
1437
|
}
|
|
943
1438
|
|