Skip to content

Instantly share code, notes, and snippets.

View fagnersilva's full-sized avatar
🏠
Working from home

Fagner Silva fagnersilva

🏠
Working from home
  • Trix Systems
  • Campinas | São Paulo | Brasil
  • 01:28 (UTC -03:00)
View GitHub Profile
@fagnersilva
fagnersilva / kamailio.cfg
Created July 18, 2016 18:13
kamailio.cfg
#!KAMAILIO
#
# Kamailio (OpenSER) SIP Server v4.2 - default configuration script
# - web: http://www.kamailio.org
# - git: http://sip-router.org
#
# Direct your questions about this file to: <[email protected]>
#
# Refer to the Core CookBook at http://www.kamailio.org/wiki/
# for an explanation of possible statements, functions and parameters.
@fagnersilva
fagnersilva / func_odbc.conf
Created April 28, 2016 19:04
Pendulo e Conferencia a três ou mais
context pendulo {
_* =>{answer;
set(ODBC_CRIASALA(3${CALLERID(num)},${CALLERID(num)})=1);
meetme(3${CALLERID(num)});
}
}
e em func_odbc.conf
[CRIASALA]
@fagnersilva
fagnersilva / tcpdump-udp
Created March 28, 2016 19:31
tcpdump-udp
tcpdump -w - -p -n -s 0 udp > /tmp/capture-asterisk.pcap
-w = output file
-p = dont start in promiscuous mode
-n = no name resolution
-s 0 = full frame, not only first bytes
udp = only capture udp packets
@fagnersilva
fagnersilva / fluxo de atendimento com feriados e horario
Last active February 2, 2018 07:58
feriados e horario atendimento
[inbound-call]
exten => s,1,Answer()
same => n,Set(TELLER=0)
same => n,Set(TIMEOUT(digit=1)
same => n,Set(TIMEOUT(response=6)
same => n,NoOp(Controle de Horario e Dias de Atendimento)
same => n,NoOp(=========================================)
same => n,NoOp(===== Validando Feriados Federais =======)
same => n,GotoIfTime(*,*,1,jan?lb_fnac); Confraternização Universal
same => n,GotoIfTime(*,*,12,jan?lb_fnac) ; Carnaval
@fagnersilva
fagnersilva / estrutura arquivos
Created February 16, 2016 16:53
estrutura arquivos
documentos = google doc's
e-book = mega
código = github
fotos e videos = google fotos
vídeo aula = storage (plex)
musica = storage (plex)
dicas/tutoria = blog/gist
vagrant@estoque:/var/www$ laravel new estoque
Crafting application...
PHP Warning: file_put_contents(/var/www/laravel_71a79cdc6f7ee5e598d68ceab2f5a8ad.zip): failed to open stream: Permission denied in /home/vagrant/.composer/vendor/laravel/installer/src/NewCommand.php on line 96
PHP Warning: ZipArchive::extractTo(): Permission denied in /home/vagrant/.composer/vendor/laravel/installer/src/NewCommand.php on line 114
PHP Warning: ZipArchive::close(): Invalid or uninitialized Zip object in /home/vagrant/.composer/vendor/laravel/installer/src/NewCommand.php on line 116
Warning: This development build of composer is over 60 days old. It is recommended to update it by running "/usr/local/bin/composer self-update" to get the latest version.
Composer could not find a composer.json file in /var/www
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Application ready! Build something amazing.
Nikhil,
This is how I would implement '3 way conference' in Asterisk with the help
of dynamic features.
Assume 3 SIP friends 1110,1111 and 1112 in sip.conf. For 1110 in sip.conf,
context=test3way
Add following in applicationmap section of features.conf....
[applicationmap]
http://www.maujor.com/railsgirlsguide/
Read(variable[,filename[,maxDigits[,option[,attempts[,timeout]]]]])
; Read a 4 digit number, allowing up to 3 attempts, and say this number back to the caller:
exten => 123,1,Read(NUMBER,,4,3)
exten => 123,n,SayNumber(${NUMBER})
exten => 123,n,Goto(1)
ou
exten=>6123,1,Read(Digits,enter-ext-of-person)
export vi=vim
export PS1='\[\033[01;31m\][\[\033[01;36m\]\t\[\033[01;31m\]]\[\033[01;32m\]\u\[\033[01;31m\]@\[\033[01;32m\]\h \[\033[01;31m\][\[\033[01;35m\]\w\[\033[01;31m\]]\[\033[01;34m\]# \[\033[00m\]'