한국어

스마트폰앱

온누리070 플레이스토어 다운로드
    acrobits softphone
     온누리 070 카카오 프러스 친구추가온누리 070 카카오 프러스 친구추가친추
     카카오톡 채팅 상담 카카오톡 채팅 상담카톡
    
     라인상담
     라인으로 공유

     페북공유

   ◎위챗 : speedseoul


  
     PAYPAL
     
     PRICE
     

pixel.gif

    before pay call 0088 from app




This program is a very simple usage example of liblinphone. Desmonstrating how to initiate a SIP registration from a sip uri identity passed from the command line. first argument must be like sip:jehan@sip.linphone.org , second must be password . 
ex registration sip:jehan@sip.linphone.org secret 
Registration is cleared on SIGINT 

/*
linphone
Copyright (C) 2010 Belledonne Communications SARL
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "linphone/core.h"
#include <signal.h>
static bool_t running=TRUE;
static void stop(int signum){
running=FALSE;
}
static void registration_state_changed(struct _LinphoneCore *lc, LinphoneProxyConfig *cfg, LinphoneRegistrationState cstate, const char *message){
printf("New registration state %s for user id [%s] at proxy [%s]\n"
,linphone_proxy_config_get_addr(cfg));
}
int main(int argc, char *argv[]){
LinphoneCoreVTable vtable={0};
LinphoneProxyConfig* proxy_cfg;
char* identity=NULL;
char* password=NULL;
const char* server_addr;
/* takes sip uri identity from the command line arguments */
if (argc>1){
identity=argv[1];
}
/* takes password from the command line arguments */
if (argc>2){
password=argv[2];
}
signal(SIGINT,stop);
#ifdef DEBUG
linphone_core_enable_logs(NULL); /*enable liblinphone logs.*/
#endif
/*
Fill the LinphoneCoreVTable with application callbacks.
All are optional. Here we only use the registration_state_changed callbacks
in order to get notifications about the progress of the registration.
*/
vtable.registration_state_changed=registration_state_changed;
/*
Instanciate a LinphoneCore object given the LinphoneCoreVTable
*/
lc=linphone_core_new(&vtable,NULL,NULL,NULL);
/*create proxy config*/
/*parse identity*/
from = linphone_address_new(identity);
if (from==NULL){
printf("%s not a valid sip uri, must be like sip:toto@sip.linphone.org \n",identity);
goto end;
}
if (password!=NULL){
info=linphone_auth_info_new(linphone_address_get_username(from),NULL,password,NULL,NULL,NULL); /*create authentication structure from identity*/
linphone_core_add_auth_info(lc,info); /*add authentication info to LinphoneCore*/
}
// configure proxy entries
linphone_proxy_config_set_identity(proxy_cfg,identity); /*set identity with user name and domain*/
server_addr = linphone_address_get_domain(from); /*extract domain address from identity*/
linphone_proxy_config_set_server_addr(proxy_cfg,server_addr); /* we assume domain = proxy server address*/
linphone_proxy_config_enable_register(proxy_cfg,TRUE); /*activate registration for this proxy config*/
linphone_address_unref(from); /*release resource*/
linphone_core_add_proxy_config(lc,proxy_cfg); /*add proxy config to linphone core*/
linphone_core_set_default_proxy(lc,proxy_cfg); /*set to default proxy*/
/* main loop for receiving notifications and doing background linphonecore work: */
while(running){
linphone_core_iterate(lc); /* first iterate initiates registration */
ms_usleep(50000);
}
proxy_cfg = linphone_core_get_default_proxy_config(lc); /* get default proxy config*/
linphone_proxy_config_edit(proxy_cfg); /*start editing proxy configuration*/
linphone_proxy_config_enable_register(proxy_cfg,FALSE); /*de-activate registration for this proxy config*/
linphone_proxy_config_done(proxy_cfg); /*initiate REGISTER with expire = 0*/
linphone_core_iterate(lc); /*to make sure we receive call backs before shutting down*/
ms_usleep(50000);
}
end:
printf("Shutting down...\n");
printf("Exited\n");
return 0;
}
조회 수 :
345
등록일 :
2019.05.06
19:57:08 (*.214.125.21)
엮인글 :
http://webs.co.kr/index.php?document_srl=3319809&act=trackback&key=7a1
게시글 주소 :
http://webs.co.kr/index.php?document_srl=3319809
List of Articles
번호 제목 글쓴이 날짜 조회 수
67 Pjsip 설명 정리 동작 함수 admin 2019-09-09 30
» Basic registration test sourec code admin 2019-05-06 345
65 acrobits softphone 아크로비트 소프트폰 문제 해결 수신 발신 아크로빗 포럼 admin 2019-01-10 1320
64 acrobits softphone 아크로비트 소프트폰 문제 해결 수신 발신 아크로빗 한글설명 admin 2019-01-10 1186
63 acrobits softphone 아크로비트 소프트폰 문제 해결 수신 발신 아크로빗 admin 2019-01-10 1547
62 mDNS 덕분에 SIP 네트워크 배포가 쉬워졌습니다. admin 2018-09-01 2196
61 Pjsip datasheet OS SIP Media Video NAT admin 2018-07-03 2917
60 How to save battery power on the Samsung Galaxy S9 and S9+ admin 2018-06-09 2509
59 CSipSimple, sRTP and SIP-TLS with Asterisk 11 admin 2018-06-05 3188
58 스마트폰 070 장점 국내전화 국제전화 로밍요금 해결 꼭 사용해보세요 admin 2018-01-07 3963
57 안드로이드 7.0 빳데리 최적화에서 온누리070 제외 방법 수신향상 방법 인터넷전화 admin 2018-01-01 4250
56 카카오톡PC에서 사용하는 오픈소스 라이브러리 admin 2017-12-03 4284
55 카카오톡PC에서 사용하는 오픈소스 라이브러리 admin 2017-12-01 4753
54 Using the raspberry pi for video monitoring Compiling linphone on the rasberry pi admin 2017-09-26 5520
53 iphone 아이폰 Linphone 070번호 설정 방법 발신 음질매우좋음 수신잘안됨 file admin 2016-01-30 9957
52 해외 로잉 무료 스마트폰 휴대폰 070 인터넷폰 인터넷전화 국내 해외 가입 상사 주재원 교민 유학생 여행 등 file admin 2015-02-28 23266
51 070가입 않고 국내 유선 무선 집전화 휴대폰 전화 해외 국내에서 전화 수신 받는 방법 admin 2015-02-28 219799
50 using a g729 codec in SipDroid Add G729 to Sipdroid admin 2014-12-28 13283
49 compile linphone android ubuntu 안드로이드 개발환경 구축 eclipse admin 2014-12-25 13456
48 How to add ID / Password for payment user ? file admin 2014-11-24 14989
47 SIP 샘플 소스 분석 - oSIP, Linphone - file admin 2014-10-21 20892
46 pjsip softphone 컴파일 방법 admin 2014-10-21 19154
45 GCM 서버 구현 예제(3)_JAVA를 이용한 푸시 서버 admin 2014-10-21 16036
44 Linphone 오픈소스 컴파일 admin 2014-10-21 42077
43 Install and configure Linphone admin 2014-10-21 13524
42 Compiling linphone 3.7.0 on Debian Wheezy admin 2014-10-21 15016
41 Jitsi Videobridge meets WebRTC admin 2014-10-18 15073
40 Compiling PJSIP for IOS : To specify the target platform is iOS admin 2014-10-10 15076
39 opus-codec Opus Interactive Audio Codec admin 2014-10-10 12428
38 HD-Voice의 정체 admin 2014-10-09 14614