알림 작업 - 전역
NotifyAction API를 사용하면 전화 통신 공급자에게 보낼 작업을 정의할 수 있습니다.
각 작업 유형에 대해 각 add 함수를 호출하여 NotifyAction 개체에 작업을 추가합니다. 각 add 함수는 addSay() 메서드에 대한 SayAction 객체와 같은 Action 객체를 반환합니다. 반환된 개체에 대한 자세한 내용은 각 메서드 예제를 참조하세요.
알림 작업 - addConference ()
현재 회의를 현재 전화 회의로 옮기는 회의 작업을 추가합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 없음 |
| 유형 | 설명 |
|---|---|
| ConferenceAction | NotifyAction 객체에 추가된 작업입니다. ConferenceAction 개체를 사용하여 전화 회의 이름 및 참가자가 참가하거나 나갈 때 전화 회의의 동작을 정의합니다. |
이 예시에서는 회의 작업을 추가하고 회의 이름을 설정하는 방법을 보여줍니다.
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// add a conference call action and set its name
var conference = notifyAction.addConference();
conference.setName('Brown Bag: Week 3');
알림 작업 - addConference.setEndOnExit(부울 endOnExit)
지정된 호출자가 전화 회의를 종료할 때 전화 회의를 종료할지 여부를 정의합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 끝OnExit | 부울 | 지정된 호출자가 현재 전화 회의를 종료할 때 전화 회의를 종료해야 하는지 여부를 나타내는 플래그
|
| 유형 | 설명 |
|---|---|
| void |
이 예제에서는 전화 회의 작업을 추가한 다음 지정된 호출자가 나갈 때 전화 회의가 종료되도록 설정하는 방법을 보여 줍니다.
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// add a conference call action and set the caller that starts the meeting
var conference = notifyAction.addConference();
// retrieve the participant for which the conference call should exit when they leave
var notifyParticipantGr = new GlideRecord('notify_participant');
notifyParticipantGr.get('active participant sys id');
if (notifyParticipantGr.isValid) {
conference.setEndOnExit(true);
}
알림 작업 - addConference.setHangupOnStar(Boolean hangupOnStar)
참가자가 별(*) 키를 누를 때 전화 회의를 종료할지 여부를 정의합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 행업온스타 | 부울 | 참가자가 별(*) 키를 누를 때 전화 회의를 종료해야 하는지 여부를 나타내는 플래그입니다. 유효한 값은 다음과 같습니다.
|
| 유형 | 설명 |
|---|---|
| void |
이 예시에서는 전화 회의 작업을 추가한 다음 전화 회의를 녹음하는 방법을 보여줍니다.
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// add a conference call action and set the hang up action
var conference = notifyAction.addConference();
conference.setHangupOnStar(true);
알림 작업 - addConference.setMuted(부울 음소거됨)
현재 전화 회의에서 지정된 호출자를 음소거해야 하는지 여부를 정의합니다.
이 메서드를 호출하지 않으면 호출자가 기본적으로 음소거되지 않습니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 음소거 | 부울 | 현재 전화 회의에서 지정된 호출자를 음소거해야 하는지 여부를 나타내는 플래그
|
| 유형 | 설명 |
|---|---|
| void |
이 예제에서는 전화 회의 작업을 추가한 다음 지정된 호출자를 음소거하는 방법을 보여 줍니다.
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// add a conference call action and set it to mute the specified participant
var conference = notifyAction.addConference();
var notifyParticipantGr = new GlideRecord('notify_participant');
notifyParticipantGr.get('active participant sys id');
if (notifyParticipantGr.isValid) {
conference.setMuted(true);
}
알림 작업 - addConference.setName(문자열 이름)
현재 전화 회의의 이름을 지정된 이름으로 설정합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 이름 | 문자열 | 현재 전화 회의에 연결할 이름입니다. |
| 유형 | 설명 |
|---|---|
| void |
이 예시에서는 전화 회의 작업을 추가하고 전화 회의 이름을 설정하는 방법을 보여줍니다.
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// add a conference call action and set its name
var conference = notifyAction.addConference();
conference.setName('Brown Bag: Week 3');
알림 작업 - addConference.setRecord(부울 기록)
관련된 컨퍼런스 회의를 기록할지 여부를 정의합니다.
이 메서드를 호출하지 않으면 컨퍼런스 회의는 기본적으로 기록되지 않습니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 기록 | 부울 | 현재 컨퍼런스 회의를 녹화해야 하는지 여부를 나타내는 플래그입니다.
|
| 유형 | 설명 |
|---|---|
| void |
이 예시에서는 전화 회의 작업을 추가한 다음 전화 회의를 녹음하는 방법을 보여줍니다.
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// add a conference call action and set it to be recorded
var conference = notifyAction.addConference();
conference.setRecord(true);
알림 작업 - addConference.setStartOnEnter(Boolean startOnEnter)
지정된 호출자가 전화 회의에 참가할 때 전화 회의를 시작할지 여부를 정의합니다.
기본적으로 호출자가 둘 이상일 때마다 전화 회의가 시작됩니다. 특정 호출자가 참가할 때만 전화 회의가 시작되도록 하려면 다른 호출자 각각에 대해 이 메서드를 호출하고 값을 "false"로 설정해야 합니다. 이렇게 하면 원하는 사람이 전화 회의에 참가할 때까지 전화 회의가 시작되지 않습니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| startOnEnter | 부울 | 선택한 호출자가 현재 전화 회의에 참가할 때 전화 회의를 시작해야 하는지 여부를 나타내는 플래그입니다.
|
| 유형 | 설명 |
|---|---|
| void |
이 예시에서는 전화 회의 작업을 추가한 다음 지정된 호출자가 참가할 때까지 전화 회의가 시작되지 않도록 설정하는 방법을 보여줍니다.
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// add a conference call action and set the caller that starts the meeting
var conference = notifyAction.addConference();
// retrieve the participant for which the conference call should start when they arrive
var notifyParticipantGr = new GlideRecord('notify_participant');
notifyParticipantGr.get('active participant sys id');
if (notifyParticipantGr.isValid) {
conference.setStartOnEnter(true);
}
알림 작업 - addDial()
지정된 전화 번호 또는 알림 클라이언트로 콜을 착신 전환합니다.
addDial 작업이 만들어지면 연결된 전화 번호(setPhoneNumber()) 또는 알림 클라이언트(setClientRecord())도 설정해야 합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 없음 |
| 유형 | 설명 |
|---|---|
| 다이얼 액션 | NotifyAction 객체에 추가된 작업입니다. |
이 예시에서는 아웃바운드 전화를 걸고 통화를 녹음하는 방법을 보여줍니다.
// Initialize NotifyAction
var notifyAction = new SNC.NotifyAction();
// Call addDial() to connect to another party – this returns an object of type DialAction
var dialAction = notifyAction.addDial();
// Call setPhoneNumber(String phoneNumber)in DialAction.java to specify the phone number to dial
dialAction.setPhoneNumber('+919765xxxxxxx');
// Invoke setRecord(Boolean record) to record the call to this new number +919765xxxxxxx
dialAction.setRecord(true);
알림 작업 - addDial.setCallerID(String callerID)
발신 콜에 대한 발신자 ID를 정의합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| callerID | 문자열 | 발신 콜에 대해 설정할 호출자 식별자입니다. |
| 유형 | 설명 |
|---|---|
| void |
이 예제에서는 아웃바운드 호출을 수행하고 호출 시간 제한을 설정하는 방법을 보여 줍니다.
// Initialize NotifyAction
var notifyAction = new SNC.NotifyAction();
// Call addDial() to connect to another party – this returns an object of type DialAction
var dialAction = notifyAction.addDial();
// Call setPhoneNumber(String phoneNumber)in DialAction.java to specify the phone number to dial
dialAction.setPhoneNumber('+919765xxxxxxx');
// Set the caller ID
dialAction.setCallerID('Planning Conf Call');
알림 작업 - addDial.setClientRecord(String tableName, String sysID)
알림 호출자 기록을 찾을 테이블과 호출자의 고유 식별자를 지정하여 현재 호출자를 알림 호출자로 설정합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| tableName | 문자열 | 원하는 호출자의 정보가 들어 있는 테이블의 이름입니다. |
| sysID | 문자열 | 원하는 알림 호출자의 고유 식별자(sys_id)입니다. |
| 유형 | 설명 |
|---|---|
| void |
이 예제는 setClientRecord()를 사용하여 현재 호출자를 Notify 호출자로 설정하는 방법을 보여줍니다.
// set up a dial action to forward the
// call to the specified client
var action = new SNC.NotifyAction();
var dial = action.addDial();
dial.setClientRecord(notifyClientRecord.getTableName(), notifyClientRecord.getUniqueValue());
dial.setTimeout(activity.vars.timeout);
dial.setRecord(activity.vars.record);
알림 작업 - addDial.setDTMF(문자열 값)
콜이 연결될 때 재생할 DTMF 신호음을 정의합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 값 | 문자열 | 통화가 연결될 때 재생할 유효한 DTMF 숫자입니다. |
| 유형 | 설명 |
|---|---|
| void |
이 예에서는 아웃바운드 전화를 거는 방법을 보여주고 통화가 연결될 때 재생할 DTMF 신호음을 정의합니다.
// Initialize NotifyAction
var notifyAction = new SNC.NotifyAction();
// Call addDial() to connect to another party - this returns an object of type DialAction
var dialAction = notifyAction.addDial();
// Call setPhoneNumber(String phoneNumber)in DialAction.java to specify the phone number to dial
dialAction.setPhoneNumber('+919765xxxxxxx');
// DTMF tones to play when call connects
dialAction.setDTMF("1246AF");
알림 작업 - addDial.setHangupOnStar(Boolean hangupOnStar)
별표(*) 키를 누를 때 콜을 종료할지 여부를 정의합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 행업온스타 | 부울 | 별표(*) 키를 누를 때 콜을 종료해야 하는지 여부를 나타내는 플래그입니다.
|
| 유형 | 설명 |
|---|---|
| void |
이 예에서는 아웃바운드 전화를 걸고 끊기 키를 별표로 설정하는 방법을 보여줍니다.
// Initialize NotifyAction
var notifyAction = new SNC.NotifyAction();
// Call addDial() to connect to another party – this returns an object of type DialAction
var dialAction = notifyAction.addDial();
// Call setPhoneNumber(String phoneNumber)in DialAction.java to specify the phone number to dial
dialAction.setPhoneNumber('+919765xxxxxxx');
// End call by pressing star
dialAction.setHangupOnStar(true);
알림 작업 - addDial.setPhoneNumber(String phoneNumber)
호출할 전화 번호를 정의합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| phoneNumber | 문자열 | E.164에 따라 발신 가능한 전화 번호입니다. |
| 유형 | 설명 |
|---|---|
| void |
이 예제에서는 아웃바운드 호출을 수행하고 호출 시간 제한을 설정하는 방법을 보여 줍니다.
// Initialize NotifyAction
var notifyAction = new SNC.NotifyAction();
// Call addDial() to connect to another party – this returns an object of type DialAction
var dialAction = notifyAction.addDial();
// Call setPhoneNumber(String phoneNumber)in DialAction.java to specify the phone number to dial
dialAction.setPhoneNumber('+919765xxxxxxx');
알림 작업 - addDial.setRecord(부울 기록)
발신 콜을 기록할지 여부를 정의합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 기록 | 발신 콜을 기록해야 하는지 여부를 나타내는 플래그입니다. 유효한 값은 다음과 같습니다.
|
| 유형 | 설명 |
|---|---|
| void |
이 예시에서는 아웃바운드 전화를 걸고 통화를 녹음하는 방법을 보여줍니다.
// Initialize NotifyAction
var notifyAction = new SNC.NotifyAction();
// Call addDial() to connect to another party – this returns an object of type DialAction
var dialAction = notifyAction.addDial();
// Call setPhoneNumber(String phoneNumber)in DialAction.java to specify the phone number to dial
dialAction.setPhoneNumber('+919765xxxxxxx');
// Record the call
dialAction.setRecord(true);
알림 작업 - addDial.setTimeout(정수 시간 제한)
발신 콜의 시간 초과까지 걸리는 시간(초)을 설정합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 시간 제한 | 정수 | 발신 콜이 시간 초과될 때까지의 시간(초)입니다. 기본값: 30 |
| 유형 | 설명 |
|---|---|
| void |
이 예제에서는 아웃바운드 호출을 수행하고 호출 시간 제한을 설정하는 방법을 보여 줍니다.
// Initialize NotifyAction
var notifyAction = new SNC.NotifyAction();
// Call addDial() to connect to another party – this returns an object of type DialAction
var dialAction = notifyAction.addDial();
// Call setPhoneNumber(String phoneNumber)in DialAction.java to specify the phone number to dial
dialAction.setPhoneNumber('+919765xxxxxxx');
// Set the number of seconds to wait before timing out
dialAction.setTimeout(45);
알림 작업 - addGather()
호출자에게 지정된 대화형 전화 메뉴를 제공합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 없음 |
| 유형 | 설명 |
|---|---|
| 수집 동작 | NotifyAction 객체에 추가된 작업입니다. GatherAction 개체를 사용하여 사용자에게 표시할 메뉴 설정과 옵션을 정의합니다. |
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// present the user with a menu
var gather = notifyAction.addGather();
gather.setNumberOfDigits(1); // the user can type 1 digit
gather.setFinishKey('#'); // # or *, useful for > 1 digit
gather.setTimeout(10); // time to enter answer, in seconds
// add first menu item
var usSay = gather.addSay();
usSay.setText('Press 1 for english');
usSay.setLanguage('en-US');
// add second menu item
var nlSay = gather.addSay();
nlSay.setText('Kies 2 voor Nederlands');
nlSay.setLanguage('nl-NL');
// add third menu item
var frSay = gather.addSay();
frSay.setText('Choisissez 3 pour le français.');
frSay.setLanguage('fr-FR');
// and finish off with an applause
var play = gather.addPlay();
play.setURL('http://www.wavsource.com/snds_2015-04-12_5971820382841326/sfx/applause_y.wav');
알림 작업 - addGather.addPlay()
통화 시 오디오 파일을 재생합니다.
지원되는 자식 메서드에 대한 설명은 NotifyAction addPlay() 메서드를 참조하십시오.
| 이름 | 유형 | 설명 |
|---|---|---|
| 없음 |
| 유형 | 설명 |
|---|---|
| 플레이 액션 | NotifyAction 객체에 추가된 작업입니다. PlayAction 객체를 사용하여 오디오 파일 URL과 오디오를 반복하는 횟수를 정의합니다. |
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// Create the gather action object
var gather = notifyAction.addGather();
// Play an audio file
var play = gather.addPlay();
play.setURL('http://www.wavsource.com/snds_2015-04-12_5971820382841326/sfx/applause_y.wav');
알림 작업 - addGather.addSay()
통화 시 읽을 텍스트 음성 변환을 정의합니다.
지원되는 자식 메서드에 대한 설명은 NotifyAction addSay() 메서드를 참조하십시오.
| 이름 | 유형 | 설명 |
|---|---|---|
| 없음 |
| 유형 | 설명 |
|---|---|
| SayAction | NotifyAction 객체에 추가된 작업입니다. SayAction 객체를 사용하여 읽을 텍스트와 언어를 정의합니다. |
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// present the user with a menu
var gather = notifyAction.addGather();
gather.setNumberOfDigits(1); // the user can type 1 digit
gather.setTimeout(20); // time to enter answer, in seconds
// add first menu item
var gatherSay = gather.addSay();
gatherSay.setText('Press 1 for english');
gatherSay.setLanguage('en-US');
알림 작업 - addGather.setFinishKey(String finishKey)
호출자가 입력의 끝을 나타내기 위해 입력하는 키를 정의합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| finish키 | 문자열 | 호출자 입력의 끝을 나타내는 키입니다. 유효한 값은 다음과 같습니다.
|
| 유형 | 설명 |
|---|---|
| void |
이 예제에서는 수집 작업을 추가하고 호출자 입력의 끝을 나타내는 키를 정의하는 방법을 보여 줍니다.
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
var gather = notifyAction.addGather();
gather.setNumberOfDigits(4); // the user can type four digit
gather.setFinishKey('#'); // # or *, useful for > 1 digit
알림 작업 - addGather.setNumberOfDigits(Integer numberOfDigits)
수집할 자릿수를 정의합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 자릿수 | 정수 | 수집할 자릿수입니다. 0은 잘못된 값입니다. |
| 유형 | 설명 |
|---|---|
| void |
이 예시에서는 수집 작업을 추가하고 수집할 키 입력 수를 정의하는 방법을 보여줍니다.
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// present the user with a menu
var gather = notifyAction.addGather();
gather.setNumberOfDigits(4); // the user can type four digit
gather.setFinishKey('#'); // # or *, useful for > 1 digits
gather.setTimeout(20); // time to enter answer, in seconds
알림 작업 - addGather.setTimeout(정수 시간 초과)
입력 수집 시간이 초과되는 시간을 정의합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 시간 제한 | 정수 | 시간이 초과되기 전에 호출자 입력을 기다리는 시간(초)입니다. 기본값: 10 |
| 유형 | 설명 |
|---|---|
| void |
이 예에서는 수집 작업을 추가하고 입력 시간 제한 값을 정의하는 방법을 보여줍니다.
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// present the user with a menu
var gather = notifyAction.addGather();
gather.setNumberOfDigits(4); // the user can type 1 digit
gather.setFinishKey('#'); // # or *, useful for > 1 digits
gather.setTimeout(20); // time to enter answer, in seconds
알림 작업 - addHangUp()
활성 전화 통화를 종료합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 없음 |
| 유형 | 설명 |
|---|---|
| HangUpAction | NotifyAction 객체에 추가된 작업입니다. |
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// hang up
notifyAction.addHangUp();
알림 작업 - addQueue()
호출을 대기시켜 호출을 보류합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 없음 |
| 유형 | 설명 |
|---|---|
| 큐액션 | NotifyAction 객체에 추가된 작업입니다. QueueAction 객체를 사용하여 큐 이름 및 큐 대기 또는 큐 제거 동작을 정의합니다. |
이 예제에서는 지정된 큐에 호출을 추가하는 방법을 보여 줍니다.
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// queue the call
var queue = notifyAction.addQueue();
queue.setName('my queue');
이 예제에서는 큐에서 호출을 제거하는 방법을 보여 줍니다.
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// dequeue the call
var queue = notifyAction.addQueue();
queue.setDequeue(true);
알림 작업 - addQueue.setDequeue(부울 큐에서 제거)
현재 통화 큐에서 호출을 제거합니다("보류 중"에서 해제됨).
| 이름 | 유형 | 설명 |
|---|---|---|
| 큐 | 부울 | 큐에서 현재 호출을 제거할지 여부를 나타내는 플래그입니다.
|
| 유형 | 설명 |
|---|---|
| void |
이 예제에서는 큐에서 호출을 제거하는 방법을 보여 줍니다.
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// dequeue the call
var queue = notifyAction.addQueue();
queue.setDequeue(true);
알림 작업 - addQueue.setName(문자열 이름)
큐와 관련된 이름을 정의합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 이름 | 문자열 | 큐와 연결할 이름입니다. |
| 유형 | 설명 |
|---|---|
| void |
이 예제는 큐의 이름을 정의하는 방법을 보여줍니다.
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// queue the call
var queue = notifyAction.addQueue();
queue.setName('my queue');
알림 작업 - addPlay()
통화 시 오디오 파일을 재생합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 없음 |
| 유형 | 설명 |
|---|---|
| 플레이 액션 | NotifyAction 객체에 추가된 작업입니다. PlayAction 객체를 사용하여 오디오 파일 URL과 오디오를 반복하는 횟수를 정의합니다. |
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// add a play action
var play = notifyAction.addPlay();
play.setURL('http://www.moviesounds.com/2001/imsorry.wav');
play.setLoop(1);
알림 작업 - addPlay.setLoop(정수 루프)
오디오 파일을 재생(반복)하는 횟수를 정의합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 루프 | 정수 | 오디오 파일을 재생하는 횟수입니다. |
| 유형 | 설명 |
|---|---|
| void |
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// add a play action
var play = notifyAction.addPlay();
play.setURL('http://www.moviesounds.com/2001/imsorry.wav');
play.setLoop(2);
알림 작업 - addPlay.setURL(문자열 URL)
재생할 오디오 파일을 가져올 URL을 정의합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| URL | 문자열 | 재생할 오디오 파일의 URL입니다. |
| 유형 | 설명 |
|---|---|
| void |
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// add a play action
var play = notifyAction.addPlay();
play.setURL('http://www.moviesounds.com/2001/imsorry.wav');
play.setLoop(1);
알림 작업 - addRecord()
현재 NotifyAction 개체에 호출을 기록하는 작업을 추가합니다.
호출이 완료되거나 지정된 종료를 누르면(setFinishKey()) 녹음이 자동으로 종료됩니다. 그런 다음 녹음은 연결된 통화에 대한 notify_record 테이블에 배치됩니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 없음 |
| 유형 | 설명 |
|---|---|
| void |
이 예제에서는 통화를 녹음하는 방법을 보여 줍니다.
// First we initialize NotifyAction
var notifyAction = new SNC.NotifyAction();
// Call addRecord() of NotifyAction – This returns an object of type RecordAction
var recordAction = notifyAction.addRecord();
// Optional. Define the key that callers use to stop the recording
recordAction.setFinishKey('#'); // Stop the call recording when caller presses the '#' key.
알림 작업 - addRecord.setFinishKey(String finishKey)
기록을 종료하는 키를 정의합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| finish키 | 문자열 | 기록을 종료하는 키입니다. 유효한 값은 다음과 같습니다.
|
| 유형 | 설명 |
|---|---|
| void |
이 예에서는 통화를 녹음하고 통화 종료 키를 설정하는 방법을 보여 줍니다.
// First we initialize NotifyAction
var notifyAction = new SNC.NotifyAction();
// Then we call addRecord() of NotifyAction
var recordAction = notifyAction.addRecord();
// Set the key that terminates the recording
recordAction.setFinishKey('#'); // This means that we stop the call recording when user presses the '#' key.
알림 작업 - addRecord.setMaxDuration(정수, 초)
녹화의 최대 길이를 정의합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 초 | 정수 | 기록의 최대 길이(초)입니다. 기본값: 3600 |
| 유형 | 설명 |
|---|---|
| void |
이 예에서는 통화를 녹음하고 통화 종료 키를 설정하는 방법을 보여 줍니다.
// First we initialize NotifyAction
var notifyAction = new SNC.NotifyAction();
// Then we call addRecord() of NotifyAction
var recordAction = notifyAction.addRecord();
// Set the maximum length of the recording
recordAction.setMaxDuration(4800);
알림 작업 - addRecord.setTimeout(정수 시간 제한)
녹음이 종료되는 무음 시간(초)을 설정합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 시간 제한 | 정수 | 기록이 종료된 후 통화가 무음인 시간(초)입니다. 기본값: 10 |
| 유형 | 설명 |
|---|---|
| void |
이 예에서는 통화를 녹음하고 녹음 시간 제한 값을 설정하는 방법을 보여 줍니다.
// First we initialize NotifyAction
var notifyAction = new SNC.NotifyAction();
// Then we call addRecord() of NotifyAction
var recordAction = notifyAction.addRecord();
// Set the recoding timeout value
recordAction.setTimeout(360);
알림 작업 - addReject()
수신 콜을 거부합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 없음 |
| 유형 | 설명 |
|---|---|
| RejectAction | NotifyAction 객체에 추가된 작업입니다. RejectAction 개체를 사용하여 호출을 거부하는 이유를 정의합니다. |
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// reject the call
var rejectAction = notifyAction.addReject();
rejectAction.setReason('busy'); // 'busy' or 'rejected'
알림 동작 - addReject.setReason(String reason)
호출이 거부된 이유를 정의합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 이유 | 문자열 | 호출이 거부된 이유입니다. 유효한 값은 다음과 같습니다.
|
| 유형 | 설명 |
|---|---|
| void |
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// reject the call
var rejectAction = notifyAction.addReject();
rejectAction.setReason('busy'); // 'busy' or 'rejected'
알림 작업 - addSay()
통화 시 읽을 텍스트 음성 변환을 정의합니다.
텍스트 음성 변환에는 여러 언어가 지원됩니다. 사용 가능한 언어는 전화 통신 공급자에 따라 다릅니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 없음 |
| 유형 | 설명 |
|---|---|
| SayAction | NotifyAction 객체에 추가된 작업입니다. SayAction 객체를 사용하여 읽을 텍스트와 언어를 정의합니다. |
이 예제에서는 여러 언어로 텍스트를 읽는 방법을 보여 줍니다.
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// add a say action to say something in US English
var usSay = notifyAction.addSay();
usSay.setText('Welcome. I can speak english');
usSay.setLanguage('en-US');
// add a say action to say something in Dutch
var nlSay = notifyAction.addSay();
nlSay.setText('Ik spreek ook vloeiend nederlands');
nlSay.setLanguage('nl-NL');
// and german
var deSay = notifyAction.addSay();
deSay.setText('Und ich kan auch deutsch sprechen');
deSay.setLanguage('de-DE');
알림 작업 - addSay.setLanguage(문자열 언어)
텍스트를 말하는 데 사용할 언어를 정의합니다.
이 메서드를 setText() 메서드와 함께 사용하면 말할 표현을 정의할 수 있습니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 언어 | 문자열 | 관련 텍스트를 말하는 데 사용할 언어를 정의하는 ISO 3166 언어 코드입니다. 예: "en-US" 또는 "nl-NL". |
| 유형 | 설명 |
|---|---|
| void |
이 예제에서는 여러 언어로 텍스트를 읽는 방법을 보여 줍니다.
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// add a say action to say something in US English
var usSay = notifyAction.addSay();
usSay.setText('Welcome. I can speak english');
usSay.setLanguage('en-US');
// add a say action to say something in Dutch
var nlSay = notifyAction.addSay();
nlSay.setText('Ik spreek ook vloeiend nederlands');
nlSay.setLanguage('nl-NL');
// and german
var deSay = notifyAction.addSay();
deSay.setText('Und ich kan auch deutsch sprechen');
deSay.setLanguage('de-DE');
알림 작업 - addSay.setText(문자열 텍스트)
현재 호출 내에서 읽을 텍스트를 정의합니다.
이 메서드를 setLanguage() 메서드와 함께 사용하면 제공된 텍스트를 말하는 데 사용할 언어를 정의할 수 있습니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 텍스트 | 문자열 | 현재 통화 내에서 소리내어 읽을 텍스트입니다. |
| 유형 | 설명 |
|---|---|
| void |
이 예제에서는 여러 언어로 텍스트를 읽는 방법을 보여 줍니다.
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// add a say action to say something in US English
var usSay = notifyAction.addSay();
usSay.setText('Welcome. I can speak english');
usSay.setLanguage('en-US');
// add a say action to say something in Dutch
var nlSay = notifyAction.addSay();
nlSay.setText('Ik spreek ook vloeiend nederlands');
nlSay.setLanguage('nl-NL');
// and german
var deSay = notifyAction.addSay();
deSay.setText('Und ich kan auch deutsch sprechen');
deSay.setLanguage('de-DE');
알림 작업 - addSMS()
SMS 메시지를 보냅니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 없음 |
| 유형 | 설명 |
|---|---|
| SMSAction | NotifyAction 객체에 추가된 작업입니다. SMSAction 개체를 사용하여 메시지 텍스트와 메시지를 보낼 전화 번호를 정의합니다. |
// Instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// Define where to send the SMS to
var number = new GlideElementPhoneNumber();
number.setPhoneNumber('+31612345678', true);
// Add an SMS action
var sms = notifyAction.addSMS();
sms.setMessage('Lorem ipsum dolor sit amet, consectetur adipiscing elit.');
sms.setTo(number);
알림 작업 - addSMS.setMessage(문자열 메시지)
보낼 SMS 메시지의 텍스트를 정의합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 메시지 | 문자열 | 보낼 SMS 메시지의 텍스트입니다. |
| 유형 | 설명 |
|---|---|
| void |
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// define where to send the sms to
var number = new GlideElementPhoneNumber();
number.setPhoneNumber('+31612345678', true);
// add a SMS action
var sms = notifyAction.addSMS();
sms.setMessage('Lorem ipsum dolor sit amet, consectetur adipiscing elit.');
sms.setTo(number);
알림 작업 - addSMS.setTo(String to)
SMS 메시지를 보낼 전화 번호를 설정합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 대상 | 문자열 | SMS 메시지를 보낼 E.164 호환 전화 번호입니다. |
| 유형 | 설명 |
|---|---|
| void |
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// define where to send the sms to
var number = new GlideElementPhoneNumber();
number.setPhoneNumber('+31612345678', true);
// add a SMS action
var sms = notifyAction.addSMS();
sms.setMessage('Lorem ipsum dolor sit amet, consectetur adipiscing elit.');
sms.setTo(number);
NotifyAction - 추가(NotifyAction 작업)
지정된 NotifyAction 개체를 현재 클라이언트의 NotifyAction 개체에 추가합니다.
- 플레이 액션
- 레코드 동작
- SayAction
- SMSAction
다른 모든 NotifyActions는 터미널입니다. 터미널 작업 후에 다른 NotifyAction을 추가하려고 하면 호출이 실패합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 작업 | 알림 작업 | 현재 호출자의 NotifyAction 개체에 추가할 NotifyAction 개체입니다. |
| 유형 | 설명 |
|---|---|
| void |
알림 작업 - fromJson(String json)
JSON 문자열에서 NotifyAction 개체를 역직렬화합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| JSON | 문자열 | NotifyAction 개체의 JSON 문자열 표현입니다. |
| 유형 | 설명 |
|---|---|
| void |
이 예제에서는 NotifyAction 개체를 역직렬화하는 방법을 보여 줍니다.
var json = ".... some json obtained from toJson ....";
// instantiate notify action
var notifyAction = new SNC.NotifyAction();
// deserialize and reconstruct the notify action instance
notifyAction.fromJson(json);
이 예제에서는 NotifyAction 개체의 직렬화 및 역직렬화를 보여 줍니다.
// instantiate notify action
var notifyAction = new SNC.NotifyAction();
// add a queue
var queue = notifyAction.addQueue();
queue.setName('myQueueName');
queue.setDequeue(false);
// serialize to json
var json = notifyAction.toJson();
gs.log('serialization result: ' + json);
// instantiate a new notify action
var newAction = new SNC.NotifyAction();
// deserialize the json generated above
newAction.fromJson(json);
// serialize the new object and log the result
newJson = newAction.toJson();
gs.log('new serialization result: ' + newJson);
gs.log('the same: ' + (json == newJson));
출력: *** 스크립트: serialization 결과: {"fClassName":"NotifyAction","fActions":[{"fClassName":"QueueAction","fDequeue":true,"fQueueName":"myQueueName"}]} *** 스크립트: 새 serialization 결과: {"fClassName":"NotifyAction","fActions":[{"fClassName":"QueueAction","fDequeue":true,"fQueueName":"myQueueName""}]} *** 스크립트: 동일: 참
알림 작업 - setCallRecord(GlideRecord callRecord)
후속 작업을 추가할 알림 통화 기록을 정의합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 호출 기록 | GlideRecord | 작업을 추가할 호출자(notify_call 테이블 내)의 기록을 포함하는 GlideRecord입니다. 이 호출자는 이 메서드가 다른 호출자를 사용하여 다시 호출될 때까지 영향을 받습니다. |
| 유형 | 설명 |
|---|---|
| void |
이 예제에서는 작업을 추가할 호출자를 설정하는 방법을 보여 줍니다.
public NotifyAction runIncomingCallWorkflow(NotifyPhoneNumber notifyPhoneNumber, GlideRecord callRecord) throws NoWorkflowConfiguredException, NoSuchNotifyGroupRecordException {
NotifyAction notifyAction = runWorkflow(notifyPhoneNumber, COL_INCOMING_CALL_WF, callRecord);
notifyAction.setCallRecord(callRecord);
return notifyAction;
}
알림 작업 - toJson()
NotifyAction 객체를 JSON 문자열로 직렬화합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 없음 |
| 유형 | 설명 |
|---|---|
| 문자열 | 이 NotifyAction 개체의 JSON 표현입니다. |
이 예제에서는 NotifyAction 개체를 serialize하는 방법을 보여 줍니다.
// instantiate notify action
var notifyAction = new SNC.NotifyAction();
// add one or more notify actions
// ...
// and serialize to json
var json = notifyAction.toJson();
이 예제에서는 NotifyAction 개체의 직렬화 및 역직렬화를 보여 줍니다.
// instantiate notify action
var notifyAction = new SNC.NotifyAction();
// add a queue
var queue = notifyAction.addQueue();
queue.setName('myQueueName');
queue.setDequeue(false);
// serialize to json
var json = notifyAction.toJson();
gs.log('serialization result: ' + json);
// instantiate a new notify action
var newAction = new SNC.NotifyAction();
// deserialize the json generated above
newAction.fromJson(json);
// serialize the new object and log the result
newJson = newAction.toJson();
gs.log('new serialization result: ' + newJson);
gs.log('the same: ' + (json == newJson));
출력: *** 스크립트: serialization 결과: {"fClassName":"NotifyAction","fActions":[{"fClassName":"QueueAction","fDequeue":true,"fQueueName":"myQueueName"}]} *** 스크립트: 새 serialization 결과: {"fClassName":"NotifyAction","fActions":[{"fClassName":"QueueAction","fDequeue":true,"fQueueName":"myQueueName""}]} *** 스크립트: 동일: 참