PHP 7.1 이상 및 json 확장자.
composer require innoscripta/ sipgate sipgate 클래스를 초기화합니다.
$ sipgate = Orkhanahmadov sipgate sipgate ();기본인증
클래스를 초기화할 때 기본 인증 사용자 이름과 비밀번호를 전달할 수 있습니다.
$ sipgate = Orkhanahmadov sipgate sipgate ( ' [email protected] ' , ' secret ' ); 또는 setBasicAuthCredentials() 메소드를 사용하여 기본 인증을 설정할 수 있습니다.
$ sipgate = Orkhanahmadov sipgate sipgate ();
$ sipgate -> setBasicAuthCredentials ( ' [email protected] ' , ' secret ' );계정 정보:
$ sipgate -> account ();계정 세부정보 배열을 반환합니다.
사용자 확보:
$ sipgate -> users (); 계정에 등록된 사용자의 배열을 반환합니다. 배열의 각 항목은 Orkhanahmadov sipgate ResourcesUser 의 인스턴스이며 다음과 같은 속성을 갖습니다.
$ user -> id ; // string
$ user -> firstname ; // string
$ user -> lastname ; // string
$ user -> email ; // string
$ user -> defaultDevice ; // string
$ user -> busyOnBusy ; // bool
$ user -> addressId ; // string
$ user -> directDialIds ; // array
$ user -> admin ; // bool사용자 장치 가져오기:
사용자의 장치를 얻으려면 devices() 메소드를 사용하고 사용자 인스턴스 또는 사용자 ID를 전달하십시오.
$ sipgate -> devices ( $ user );
// or
$ sipgate -> devices ( ' ABC-123 ' ); 특정 사용자에 대해 등록된 장치 배열을 반환합니다. 배열의 각 항목은 Orkhanahmadov sipgate ResourcesDevice 의 인스턴스이며 다음과 같은 속성을 갖습니다.
$ device -> id ; // string
$ device -> alias ; // string
$ device -> type ; // string
$ device -> online ; // bool
$ device -> dnd ; // bool
$ device -> activePhonelines ; // array
$ device -> activeGroups ; // array
$ device -> credentials ; // array
$ device -> registered ; // array
$ device -> emergencyAddressId ; // string
$ device -> addressUrl ; // string활성 통화:
현재 설정된 통화 목록을 얻으려면 calls() 메소드를 사용하십시오.
$ sipgate -> calls (); 현재 설정된 호출의 배열을 반환합니다. 배열의 각 항목은 Orkhanahmadov sipgate ResourcesCall 의 인스턴스이며 다음과 같은 속성을 갖습니다.
$ call -> id ; // string
$ call -> firstname ; // string
$ call -> lastname ; // string
$ call -> email ; // string
$ call -> defaultDevice ; // string
$ call -> busyOnBusy ; // bool
$ call -> addressId ; // string
$ call -> directDialIds ; // array
$ call -> admin ; // bool새 통화 시작:
새로운 통화를 시작하려면 call() 메서드를 사용하세요. 메소드는 3개의 매개변수를 허용합니다:
$device - 장치 또는 장치 ID의 인스턴스를 허용합니다. 이는 전화를 걸 때 사용할 장치를 정의합니다.$callee - 통화하려는 전화번호입니다.$callerId (선택 사항) - 수신자에게 다른 번호를 표시하려면 이 매개변수를 설정합니다. 건너뛰면 $device 번호가 사용됩니다. $ sipgate -> call ( $ device , $ callee , $ callerId );통화의 세션 ID를 반환합니다.
끊기 진행 중인 통화:
진행 중인 통화를 끊으려면 hangup() 메소드를 사용하십시오. 메소드는 호출 ID를 매개변수로 허용합니다.
$ sipgate -> hangup ( ' ABC-123 ' );진행 중인 통화를 녹음하세요.
진행 중인 통화를 녹음하려면 record() 메서드를 사용하세요. 메소드는 3개의 매개변수를 허용합니다:
$callId - 고유한 통화 ID입니다.$value - true 또는 false , 녹음 시작 또는 중지를 정의합니다.$announcement - true 또는 false , 녹음 중인 통화에 대한 알림을 재생할지 여부를 정의합니다. $ sipgate -> record ( $ callId , $ value , $ announcement );통화 기록:
통화 기록을 얻으려면 history() 메소드를 사용하십시오. 메소드는 다음과 같은 옵션 배열을 허용합니다.
connectionIds - array , 확장 목록을 정의합니다.types - array 내역에서 수신하려는 유형 목록을 정의하며 "CALL", "VOICEMAIL", "SMS", "FAX" 값 중 하나를 포함할 수 있습니다.directions - array 내역에서 수신하려는 통화 방향 목록을 정의하며 "INCOMING", "OUTGOING", "MISSED_INCOMING", "MISSED_OUTGOING" 값 중 하나를 포함할 수 있습니다.archived - bool , 보관된 기록 항목만 받으려면 true 설정하세요.starred - 별표가 없는 기록 항목 중 별표가 있는 항목을 수신하려는 경우 "STARRED", "UNSTARRED" 중 하나를 정의합니다.from - 기록의 시작 날짜를 정의합니다. ISO8601 형식이어야 합니다.to - 기록의 종료 날짜를 정의합니다. ISO8601 형식이어야 합니다.phonenumber - 기록에서 검색할 전화번호를 정의합니다.limit - 기록 항목의 "페이지당" 값을 정의합니다.offset - 기록 항목의 "오프셋" 값을 정의합니다. $ sipgate -> history ([ ' from ' => ' 2019-07-10T19:32:18Z ' , ' to ' => ' 2019-07-22T19:32:18Z ' ]); 기록 항목의 배열을 반환합니다. 배열의 각 항목은 Orkhanahmadov sipgate ResourcesHistory 의 인스턴스이며 다음과 같은 속성을 갖습니다.
$ history -> id ; // string
$ history -> source ; // string
$ history -> target ; // string
$ history -> sourceAlias ; // string
$ history -> targetAlias ; // string
$ history -> type ; // string
$ history -> created ; // string
$ history -> lastModified ; // string
$ history -> direction ; // string
$ history -> incoming ; // bool
$ history -> status ; // string
$ history -> connectionIds ; // array
$ history -> read ; // bool
$ history -> archived ; // bool
$ history -> note ; // string
$ history -> endpoints ; // array
$ history -> starred ; // bool
$ history -> labels ; // array
$ history -> callId ; // string
$ history -> recordingUrl ; // string
$ history -> recordings ; // array
$ history -> duration ; // int
$ history -> responder ; // string
$ history -> responderAlias ; // string composer test 최근 변경된 사항에 대한 자세한 내용은 CHANGELOG를 참조하세요.
자세한 내용은 CONTRIBUTING을 참조하세요.
보안 관련 문제를 발견한 경우 문제 추적기를 사용하는 대신 [email protected]으로 이메일을 보내주세요.
MIT 라이센스(MIT). 자세한 내용은 라이센스 파일을 참조하십시오.