스마트폰앱

오늘:
1,970
어제:
2,178
전체:
2,982,785

고객센타 : 070-7752-2000
팩스 : 070-7752-2001
휴대폰 : 010-9513-0019
email : voipkorea@yahoo.co.kr

국민은행
(주)제이에스솔루션
047101-04-155519

Flag Counter
■ 무료 : 유선 집전화 휴대폰 ( 한국 미국 중국 카나다) ↔ (국내 해외 여행자 상사 주재원 유학생) / 가입무 무제한무료■


https://www.linphone.org/docs/liblinphone-javadoc/org/linphone/core/package-summary.html


void setProxy(String proxyUri)
              throws LinphoneCoreException
Sets the proxy address Examples of valid sip proxy address are:
  • IP address: sip:87.98.157.38
  • IP address with port: sip:87.98.157.38:5062
  • hostnames : sip:sip.example.net

Managing proxies

User registration is controled by LinphoneProxyConfig settings. 
Each LinphoneProxyConfig object can be configured with registration informations like proxy address user id, and so on. 
A created proxy config using org.linphone.core.LinphoneCoreFactory#createProxyConfig , once configured, must be added to LinphoneCore using function LinphoneCore.addProxyConfig(org.linphone.core.LinphoneProxyConfig)
It is recommended to set a default proxy config using function LinphoneCore.setDefaultProxyConfig(org.linphone.core.LinphoneProxyConfig). Once done, if a proxy config has been configured with attribute enable register , next call to LinphoneCore.iterate() triggers a SIP register. 
Registration status is reported by registration listener

This pseudo code demonstrates basic registration operations: 


        
        LinphoneProxyConfig proxy_cfg;
        /*create proxy config*/
        proxy_cfg = LinphoneCoreFactory.instance().createProxyConfig();
        /*parse identity*/
        LinphoneAddress from = LinphoneCoreFactory.instance().createAddress("sip:toto@sip.titi.com");
        LinphoneAuthInfo info;
        if (password!=NULL){
                info=LinphoneCoreFactory.instance().createAuthInfo(from.getUsername(),null,"secret",null,null); /*create authentication structure from identity*/
                lc.addAuthInfo(info); /*add authentication info to LinphoneCore*/
        }       
        // configure proxy entries
        proxy_cfg.setIdenty(identity); /*set identity with user name and domain*/
        String server_addr = from.getDomain(); /*extract domain address from identity*/
        proxy_cfg.setProxy(server_addr); /* we assume domain = proxy server address*/
        proxy_cfg.enableRegister(true); /*activate registration for this proxy config*/
        
        lc.addProxyConfig(proxy_cfg); /*add proxy config to linphone core*/
        lc.setDefaultProxyconfig(proxy_cfg); /*set to default proxy*/ 


Registration state listener :


 void registrationState(LinphoneCore lc, LinphoneProxyConfig cfg, LinphoneCore.RegistrationState cstate, String message){
                System.out.println(New registration state ["+cstate+"] for user id ["+cfg.getUserName()+"] at proxy ["+cfg.getProxy()+"]";
}


Authentication: 
Most of the time, registration requires authentication to succed. LinphoneAuthInfo info must be either added to LinphoneCore using method LinphoneCore.addAuthInfo(org.linphone.core.LinphoneAuthInfo) before LinphoneProxyConfig is added to Linphone core, or on demand from listener org.linphone.core.LinphoneCoreListener#authInfoRequested(LinphoneCore, String, String) . 

Unregistration: 
Unregistration or any changes to LinphoneProxyConfig must be first started by a call to function LinphoneProxyConfig.edit() and validated by function LinphoneProxyConfig.done() 
This pseudo code shows how to unregister a user associated to aLinphoneProxyConfig


        LinphoneProxyConfig proxy_cfg;
        lc.setDefaultProxyConfig(proxy_cfg); /* get default proxy config*/
        proxy_cfg.edit(); /*start editing proxy configuration*/
        proxy_cfg.enableRegister(false); /*de-activate registration for this proxy config*/
        proxy_cfg.done(); /*initiate REGISTER with expire = 0*/



Managing Buddies and buddy list and presence


Buddies and buddy list 
Each buddy is represented by a LinphoneFriend object created by function LinphoneCoreFactory.createLinphoneFriend(). Buddy configuration parameters like sip uri or status publication are configurable for each buddy. 
Here under a typical buddy creation: 


        LinphoneFriend my_friend=LinphoneFactory.instance().createFriend("sip:joe@sip.linphone.org"); /*creates friend object for buddy joe*/
        my_friend.enableSubscribes(true); /*configure this friend to emit SUBSCRIBE message after being added to LinphoneCore*/
        my_friend.setIncSubscribePolicy(LinphoneFriend.SubscribePolicy.Accept); /* accept Incoming subscription request for this friend*/

friends status changes are reported by LinphoneCoreListener.notifyPresenceReceived(LinphoneCore lc, LinphoneFriend lf) .


 void notifyPresenceReceived(LinphoneCore lc, LinphoneFriend lf){
        LinphoneAddress friend_address = lf.getAddress();
        System.out.println("New state ["+lf.getStatus()+"] for user id ["+friend_address+"] ");
}


Once created a buddy can be added to the buddy list using function LinphoneCore.addFriend(LinphoneFriend lf) . Added friends will be notified about local status changes 
Any subsequente modifications to LinphoneFriend must be first started by a call to function to LinphoneFriend.edit() and validated by function LinphoneFriend.done()


        my_friend.edit(); /* start editing friend */
        my_friend.enableSubscribes(true); /*disable subscription for this friend*/
        my_friend.done(); /*commit changes triggering an UNSUBSCRIBE message*/

Publishing presence status 
Local presence status can be changed using function LinphoneCore.setPresenceInfo(int, java.lang.String, org.linphone.core.OnlineStatus).New status is propagated to all friends previously added to LinphoneCore. 

Handling incoming subscription request 
New incoming subscription requests are process according tothe incoming subscription policy state for subscription initiated by members of the buddy list. 
For incoming request coming from an unknown buddy, the call back LinphoneCoreListener.newSubscriptionRequest(LinphoneCore lc, LinphoneFriend lf, String url)

Chat room and Messaging

Exchanging text messages 
Messages are sent using LinphoneChatRoom object. First step is to create a chat room from a peer sip uri.


        LinphoneChatRoom chat_room = lc.createChatRoom("sip:joe@sip.linphone.org");


Once created, messages are sent using function LinphoneChatRoom.sendMessage(java.lang.String) .


        chat_room.sendMessage("Hello world"); /*sending message*/


Incoming message are received from a listener


        void textReceived(LinphoneCore lc, LinphoneChatRoom cr,LinphoneAddress from,String message) {
                System.out.println("Message ["+message+"] received from ["+from+"] ");
        }

Sound and echo cancellation settings

조회 수 :
685
등록일 :
2017.10.22
03:04:11 (*.160.88.18)
엮인글 :
http://webs.co.kr/index.php?document_srl=3312213&act=trackback&key=38b
게시글 주소 :
http://webs.co.kr/index.php?document_srl=3312213
List of Articles
번호 제목 글쓴이 날짜 조회 수
» Package org.linphone.core Description admin 2017-10-22 685
64 Sqlite detail easy tutorial. admin 2017-09-09 953
63 Change package name Linphone Android admin 2017-08-25 1053
62 Liblinphone - import Linphone library in Android Studio 2017 admin 2017-08-25 1041
61 I am able to build the limphone on mac by follow the steps describe here admin 2017-08-25 1026
60 To build liblinphone for Android, you must COMPILATION INSTRUCTIONS admin 2017-08-25 1062
59 sipdroid source code admin 2017-08-08 1137
58 안드로이드 주소록 전체가져오기 이름만가져오기 사진가져오기 코드 admin 2015-04-13 7267
57 the sipdroid Research Miscellaneous admin 2015-03-26 3601
56 HSS070 English Korean 무료 국제전화 미국 중국 카나다 무료 통화 제공 admin 2014-12-28 5306
55 Softphones admin 2014-09-20 5277
54 /xxxxx/gen already exists but is not a source folder. Convert to a source folder or rename it. admin 2014-09-03 5749
53 CSIPSimple building Rebuilding Detail on Eclips Good All is heare perfect admin 2014-08-15 5681
52 Improving QoE of SIP-based Automated Voice Interaction in Mobile Networks file admin 2014-03-20 6471
51 speex support in android admin 2014-03-19 6662
50 voxmobile Source and how to build admin 2014-02-18 7122
49 PJSIP hung the phone constantly corrected the problem admin 2014-02-09 7563
48 Csipsimple code rebuilding source sip 통신 Call Mechanism admin 2014-02-09 24485
47 Csipsimple code rebuilding source sip 통신 technical interviewer admin 2014-02-09 7426
46 Csipsimple code rebuilding source 주요인터페이스분석 admin 2014-02-09 47347
45 Csipsimple code rebuilding source 다운로드 구성 csipsimple 소스 프로젝트 admin 2014-02-09 8552
44 Android DialogFragment Tutorial admin 2014-02-09 7983
43 Creating a fullscreen DialogFragment with a custom background admin 2014-02-09 10532
42 [Android API] 네트워크 상태 체크하기 admin 2013-12-19 9320
41 [안드로이드] 네트워크 연결 상태 체크 함수. admin 2013-12-19 8415
40 안드로이드 인터넷연결체크 ( 3g/lte/wifi ) 메서드 admin 2013-12-19 15006
39 Android Get Phone Contacts details with Contact Image admin 2013-12-15 7765
38 안드로이드 커스텀 타이틀바 How to add custom title bar to android application admin 2013-10-02 10288
37 How to create a custom title bar admin 2013-07-15 10528
36 Rotary Dialer clip art admin 2013-04-20 18152
35 Java 프로그램 실행화일 만들기 : Launch4j admin 2013-02-21 11302
34 java network programming source code, learning socket programming admin 2012-12-04 11159
33 2X Client Configuration | Android Remote Desktop 안드로이드 PC 리모트 데스크탑 admin 2012-12-02 12991
32 WIFI 3G 인터넷 연결 실시간 체크 소스코드 Broadcast Receiver 사용 (Adnroid) admin 2012-10-31 17544
31 통신사별 와이파이 비밀번호 admin 2012-10-31 15506
30 팁, wifi 패스워드 모음집 password admin 2012-10-21 11509
29 Android User Session Management using Shared Preferences admin 2012-10-16 33632
28 Unicode Tables v4 admin 2012-10-16 23840
27 HTML Codes admin 2012-10-16 10463
26 IBM Scan Codes EBCDIC Codes admin 2012-10-16 12668
25 ASCII Table and Description admin 2012-10-16 11960
24 How to Show Alert Dialog in Android (간단하고 쉬운설명) admin 2012-10-15 23357
23 How to read contacts on Android 2.0 admin 2012-10-14 14153
22 WIFI 3G 인터넷 연결 체크 소스코드 직접 사용한 코드 android admin 2012-10-14 16021
21 Android Detect Internet Connection Status admin 2012-10-12 21744
20 JAVA + SSL (server and client examples) admin 2012-10-07 23024
19 Querying The Android Contact Database admin 2012-09-30 11345
18 Manage Contacts android admin 2012-09-30 13355
17 Android Contacts API 2 example admin 2012-09-30 14429
16 Android 2.0 주소록 동기화 기능 admin 2012-09-30 39945
15 안드로이드용 앱 개발 마켓등록 까지 해본거 샘플 무료국제전화 앱 FreeDialer admin 2012-09-27 15421
14 아이폰 IPhone 앱 개발 기본 admin 2012-09-27 12053
13 [안드로이드/개발] Intent admin 2012-09-23 18728
12 안드로이드 타이머 절적한 설명과 간단한소스코드 등 안드로이드 프로그램 설명 깔끔 admin 2012-09-23 29571
11 google voice source code admin 2012-09-22 11380
10 [안드로이드] 서버/클라이언트 소켓(Socket) 통신하기 admin 2012-09-20 21901
9 FreeDial 무료국제전화는 프리미엄 국제전화 다이렉트 회선사용 admin 2012-09-20 12466
8 Android SQlite 사용 admin 2012-09-04 12725
7 안드로이드마켓에 앱 등록하는 순서 admin 2012-08-19 43651
6 전화관련 안드로이드함수 admin 2012-08-18 16075
5 자바 ,이클립스,Android SDK, ADT 설치하여 무료국제전화 다이얼러를 만들어봅시다. admin 2012-08-06 16553
4 아이폰용 무료국제전화용 무료 다이얼러 Speedydialer 설치및 사용방법 file admin 2012-07-14 11962
3 접속번호 + 상대방번호 # 를 주소록에 전화번호로 저장하여 사용하면 편리하다 admin 2012-06-17 13862
2 App Store - ILD Dialer admin 2012-06-17 10437
1 한국휴대폰에서 미국 중국 카나다 무료 국제전화 서비스 admin 2012-04-27 10788