Ribbit 에서 개발자등록을 하면 개발용 flex SDK 를 공짜로 받을 수 있다길래 예전에 아이디어를 등록하고 가입승인을 받았었습니다만, API Beta 2 가 나왔다고 하길래 오늘에서야 프로젝트 등록을 마저 완료하고 ( evaluation only 로) SDK를 받았습니다.
RibbitDeveloperComponent_Beta2.zip 이라는 이름으로 제공해주는군요. 언뜻 파란색으로 "Requires Adobe Flex Builder" 라는 항목이 보여서 쫄았는데 다행히도 회사에서 구입해 둔 Adobe Flex Builder 3 의 정식 라이센스가 있는 관계로 즐겁게 놀아볼 생각입니다.
압축을 풀어보니 swc 1개와 sample, 그리고 beta 2 컴포넌트의 향상된 기능에 대해 설명하는 txt 파일이 있네요.
향상된 기능들
- Improved Firewall compatibility
- Improved voice performance
- Improved calling stability
Ribbit 클래스들의 namespace 변경
- com.ribbit.api.*
그 외 변경사항들
- The method getCallLogs replaces getAllMessageIDs and getAllCallLogIDs.
- The method getCallLogs now returns an Array of CallLogDetails.
- The method getCallLog replaces getMessage.
- A new object CallLogTags, is used in getCallLogs to request All calls, Missed calls, Voice Mail, Urgent Voice, Deleted Voice Mail and Sent Voice Mail.
- The object CallLogDetails replaces MessageDetails.
- The object CallLogIndex replaces MessageIndex.
- The method getContacts replaces getAllContactIDs.
- The existing event callLogLoaded replaces the use of messageLoaded
- the existing event callLogsLoaded replaces the use of messageLoaded
베타2에서 추가된 기능들
- A new method getUserSummary, gets the total calls, missed calls, total voice messages and total contacts. - A new event userSummaryLoaded, returns a UserSummary object with total calls, missed calls, total voice messages and total contacts.
- A new method getAPIversion, returns the current version of the API.
- A new method getCallTalkVolume, returns the microphone gain level of the input volume for calls.
- A new method setCallTalVolume, sets the microphone gain level of the input volume for calls.
- A new method getMessageRecordVolume, returns the microphone gain level of the input volume for recording messages.
- A new method setMessageRecordVolume, sets the microphone gain level of the input volume for recording messages.
- A new method sendDTMF, allows you to send digits during a call.
- The method makeCall, in addition to a phone number, now accepts an email address to place a call to.
- The object ContactIndex now includes jobTitle and photoURL, linked to the PersonalPhotoURL property of ContactDetails.
- A new class RibbitAccountRequest, will allow certain settings of Ribbit Account properties.
- A new method changePassword, allows the changing of the user's login password.
- A new method enableTranscription, allows toggling the user's ability to receive transcribed messages.
- A new method getAccountInfo, gets the account info of a user.
- A new event accountInfoLoaded, returns a RibbitUser object for the requested user.
- A new method getNotificationStatus, gets the setting for whether a user can receive email alerts for new voicemail.
- A new method setNotificationStatus, sets the setting for whether a user can receive email alerts for new voicemail.
- A new method saveRecordedGreeting, accepts a CallLogDetails object as a new recorded greeting.
- A new method saveRecordedName, accepts a CallLogDetails object as a new recorded name.
- A new method setFirstName, accepts a new first name for the user.
- A new method setLastName, accepts a new last name for the user.
- A new method setNickName, accpets a new nickname for the user.
- A new method uploadImage, accepts a FileReference to an image and sets the user's photo.
- A new event photoUploadcomplte is sent when a photo upload is complete.
- A new event photoUploadError is sent when there is an error uploading a photo.
압축을 풀고 나면 RibbitAPI_beta2-01.swc 파일이 보이는데 이걸 Flex Builder 3 가 설치된 경로 아래의 sdks/3.0.0/frameworks/libs 에다가 복사합니다.
그 후 Flex Builder 3 를 실행하면 ribbit 관련 API들을 사용할 수가 있습니다.
기본적으로 ribbit 으로 통화를 연결하기 위해서는 RibbitRequest 라는 걸 사용하면 되는데, RibbitRequest 객체를 만들고 login 을 호출해서 서버에 접속한 다음에 실제 call 을 호출하면 됩니다.
코드로 작성한다면( 구글링해서 하나 긁었습니다)
private var ribbitRequest:RibbitRequest;
private function doLogin():void {
ribbitRequest = RibbitRequest.getInstance();
ribbitRequest.addEventListener(RibbitResponseEvent.LOGGED_IN, handleLoggedIn);
ribbitRequest.addEventListener(RibbitResponseEvent.ERROR, handleError);
ribbitRequest.addEventListener(RibbitResponseEvent.RIBBIT_SERVER_CONNECTED, handleRibbitServerConnected);
ribbitRequest.login('user', 'password', 'devID', 'appID');}
private function handleRibbitServerConnected(event:RibbitResponseEvent):void {
ribbitRequest.makeCall('555-555-5555');
}
와 같은 식으로 만들어 두고 doLogin 을 적당한 컴포넌트의 click 이벤트에다가 붙여넣으면 ribbit 을 이용한 전화걸기 끝.
Ribbit API 와 함께 즐거운 VoIP app 제작을 향해 고고싱~
오옹 voip.. +_+
답글삭제@rath - 2008/07/19 20:21
답글삭제오우~ 장호님 하이용 ㅎㅎ 깨는 많이 볶고 계신가요?