NotifyNow - initiateConferenceCall(文字列[] conferenceCallParticipants, 文字列 conferenceCallTitle, GlideRecord sourceRecord, ブール private)

  • リリースバージョン: Washingtondc
  • 更新日 2024年02月01日
  • 読む3読むのに数分
  • 新しい電話会議を開始します。

    表 : 1. パラメーター
    名前 タイプ 説明
    conferenceCallParticipants 文字列 sys_user テーブルまたは E.164 準拠の電話番号から sys_ids によって識別される 1 人以上のユーザーである電話会議参加者です。
    conferenceCallTitle 文字列 電話会議のタイトルです。このパラメーターの最大長は 40 文字です。
    sourceRecord GlideRecord インシデントまたは問題番号などの電話会議に関連付けるソースレコード。
    private ブーリアン 電話会議が非公開であるかどうかをコントロールする値。この値のデフォルトは False です。
    表 : 2. 返される内容
    タイプ 説明
    GlideRecord 電話会議レコード、またはエラーがあった場合は nullです。

    これにより、E.164 に準拠した電話番号を持つ参加者と sys_user テーブルの参加者による電話会議が開始され、SMS および電子メールで電話会議の詳細がすべての参加者に送信されます。

    // define phone number participants
    var participants = ['+31205655548', '+31205655552', '+31652825393'];
     
    // we also want to add two Dutch sys_user participants
    var user = new GlideRecord('sys_user');
    user.addNotNullQuery('mobile_phone');
    user.addQuery('mobile_phone', 'STARTSWITH', '+316');
    user.setLimit(2);
    user.query();
     
    // add users to the participant array
    while (user.hasNext() && user.next()) {
    	gs.log('adding user ' + user.getValue('name') + ' with phone number ' + 
                 user.getValue('mobile_phone') + ' to the participant array');
    	participants.push(user.getUniqueValue());
    }
     
    // define a source record to associate with the conference call
    var source = new GlideRecord("cmdb_ci");
    source.query("asset_tag", "P1000167");
    if (source.hasNext() && source.next()) {
    	// set up conference call
    	var nn = new SNC.NotifyNow();
    	var conferenceCall = nn.initiateConferenceCall(participants, "testing 1 2", source);
     
    	// check if the conference call was successfully created
    	if (conferenceCall != null) {
    		gs.log('started conference call: ' + conferenceCall.getUniqueValue());
    	} else {
    		gs.log('could not start the conference call :(');
    	}
    }