Last active
August 29, 2015 14:06
-
-
Save hiroeorz/a97159c1b0af8b090f3e to your computer and use it in GitHub Desktop.
クラウドにAsterisk立てて[SIPクライアント-(WebRTC)-WEBブラウザ]間でビデオ通話した時のメモ ref: http://qiita.com/hiroeorz@github/items/1092b0ee2503be30792f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ apt-get install make automake gcc g++ ncurses-dev openssl libssl-dev | |
$ apt-get install libxml2 libxml2-dev sqlite3 libsqlite3-dev pkg-config | |
$ apt-get install libsrtp0 libsrtp0-dev | |
$ apt-get install libjansson4 libjansson-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ apt-get install uuid uuid-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ /etc/init.d/asterisk start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
icesupport = yes | |
allowguest=no | |
realm=sip.hogetara.co.jp | |
videosupport=yes | |
disallow=all | |
allow=gsm | |
allow=ulaw | |
allow=ilbc | |
allow=vp8 ; Video codec from here. | |
allow=h264 | |
allow=h263 | |
allow=h263p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2001] | |
type=friend | |
defaultuser=2001 | |
secret=pass | |
canreinvite=no | |
host=dynamic | |
context=sip.hogetara.co.jp | |
allow=vp8,h264 | |
nat=yes | |
[2002] | |
type=friend | |
defaultuser=SOMEI Yoshino | |
secret=pass | |
canreinvite=no | |
host=dynamic | |
context=sip.hogetara.co.jp | |
allow=vp8,h264 | |
nat=yes | |
[2003] | |
type=friend | |
defaultuser=2003 | |
secret=pass | |
canreinvite=no | |
host=dynamic | |
context=sip.hogetara.co.jp | |
allow=vp8,h264 | |
nat=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2004] | |
type=friend | |
defaultuser=2004 | |
username=2004 ; The Auth user for SIP.js | |
host=dynamic ; Allows any host to register | |
secret=pass ; The SIP Password for SIP.js | |
encryption=yes ; Tell Asterisk to use encryption for this peer | |
avpf=yes ; Tell Asterisk to use AVPF for this peer | |
icesupport=yes ; Tell Asterisk to use ICE for this peer | |
context=sip.hogetara.co.jp ; Tell Asterisk which context to use when this peer is dialing | |
directmedia=no ; Asterisk will relay media for this peer | |
transport=udp,ws ; Asterisk will allow this peer to register on UDP or WebSockets | |
force_avp=yes ; Force Asterisk to use avp. Introduced in Asterisk 11.11 | |
dtlsenable=yes ; Tell Asterisk to enable DTLS for this peer | |
dtlsverify=no ; Tell Asterisk to not verify your DTLS certs | |
dtlscertfile=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your DTLS cert file is | |
dtlsprivatekey=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your DTLS private key is | |
dtlssetup=actpass ; Tell Asterisk to use actpass SDP parameter when setting up DTLS | |
allow=vp8,h264 | |
nat=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[sip.hogetara.co.jp] | |
exten => _200Z,1,Dial(SIP/${EXTEN},30) | |
exten => _200Z,2,Congestion | |
exten => _200Z,102,Busy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rtpstart=10000 | |
rtpend=20000 | |
icesupport=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[general] | |
enabled=yes | |
bindaddr=0.0.0.0 | |
bindport=8088 | |
prefix=asterisk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo mkdir -p /etc/asterisk/keys | |
$ sudo ./contrib/scripts/ast_tls_cert -C sip.hogetara.co.jp -O "HogeTara Company" -d /etc/asterisk/keys/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo /etc/init.d/asterisk restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ tar xvjf pjproject-2.3.tar.bz2 | |
$ cd pjproject-2.3 | |
$ ./configure --prefix=/usr --enable-shared --disable-sound --disable-resample --disable-video --disable-opencore-amr | |
$ make dep | |
$ make | |
$ sudo make install | |
$ ldconfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ldconfig -p | grep pj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./configure --prefix=/usr/local/asterisk/12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ make menuselect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[*] res_pjsip | |
[*] res_pjsip_acl | |
[*] res_pjsip_authenticator_digest | |
[*] res_pjsip_caller_id | |
[*] res_pjsip_dialog_info_body_generator | |
[*] res_pjsip_diversion | |
[*] res_pjsip_dtmf_info | |
[*] res_pjsip_endpoint_identifier_anonymous | |
[*] res_pjsip_endpoint_identifier_ip | |
[*] res_pjsip_endpoint_identifier_user | |
[*] res_pjsip_exten_state | |
[*] res_pjsip_header_funcs | |
[*] res_pjsip_log_forwarder | |
[*] res_pjsip_logger | |
[*] res_pjsip_messaging | |
[*] res_pjsip_multihomed [*] res_pjsip_mwi | |
... More ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ make | |
$ sudo make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo make samples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo make config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment