L’evento più importante per il mondo VoIP si svolgerà nelle giornate del 26/27 Settembre a Roma, ma solo per gli operatori del settore.
Io ci sarò giovedì 27, e consiglio a tutti questa data perchè si parlerà anche di Asterisk e VoIP Open Source, con la graditissima presenza di Jon “Mad Dog” Hall, presidente di Linux International, e si parlerà di come Asterisk può uscire dall’area “naif” e diventare un punto di forza rispetto ad altri prodotti commerciali.
Inoltre si parlerà del futuribile mVoIP, ovvero il voice over ip sulle reti mobile.
Che dire…magari ci vediamo!
Piccolo aggiornamento sul post precedente, ho dovuto fare una piccola correzione alla configurazione postata in precedenza, in quanto non era necessario dtmf-dialing, ed il sintomo che dava era curioso, ovvero il numero di telefono digitato da alcuni apparecchi collegati al PBX classico, erano “storpiati”.
Ad esempio se io digitavo 0577123456 questo mi diventava 0505777711223345455656 ad esempio!!!
Togliendolo tutto ok, inoltre ho creato un nuovo utente per usarlo come “friend” lato pbx ed inoltre ho aggiunto delle rotte per chiamare i cellulari, 8XX e 7XX
#—————————————————————-#
# #
# SN4638/5BIS/UI #
# R3.20 2006-11-17 H323 SIP BRI #
# 2007-07-27T06:39:21 #
# Generated configuration file #
# #
#—————————————————————-#cli version 3.20
dns-client server 88.149.128.12
webserver port 80 language en
snmp community public rosystem
ic voice 0
profile ppp default
profile call-progress-tone IT_Dialtone
play 1 200 425 -12
pause 2 200
play 3 600 425 -12
pause 4 1000profile call-progress-tone IT_Alertingtone
play 1 1000 425 -12
pause 2 4000profile call-progress-tone IT_Busytone
play 1 500 425 -12
pause 2 500profile tone-set default
profile tone-set IT
map call-progress-tone dial-tone IT_Dialtone
map call-progress-tone ringback-tone IT_Alertingtone
map call-progress-tone busy-tone IT_Busytone
map call-progress-tone release-tone IT_Busytone
map call-progress-tone congestion-tone IT_Busytoneprofile voip default
codec 1 g711alaw64k rx-length 20 tx-length 20
codec 2 g711ulaw64k rx-length 20 tx-length 20profile voip ASTERISK
codec 1 g729 rx-length 20 tx-length 20
codec 2 g711ulaw64k rx-length 20 tx-length 20
codec 3 g711alaw64k rx-length 20 tx-length 20profile pstn default
profile sip default
profile sip asterisk
profile aaa default
method 1 local
method 2 nonecontext ip router
interface IF_IP_WAN
ipaddress 192.168.1.101 255.255.255.0
no napt-insideinterface IF_IP_LAN
ipaddress 192.168.1.1 255.255.255.0
no napt-insidecontext cs switch
digit-collection timeout 4
national-prefix 0
international-prefix 00routing-table called-e164 RT_2_ISDN
route .%T dest-service HUNTING MT_ITCrouting-table called-e164 RT_ISDN_2_SIP
route 99[1-9].T3 dest-interface IF_S0_PSTN
route 1[1-9].T3 dest-service SER_HUNT_OUT
route 0[1-9].T3 dest-service SER_HUNT_OUT
route 00[1-9].T3 dest-service SER_HUNT_OUT
route 8[0-9].T3 dest-service SER_HUNT_OUT
route 7[0-9].T3 dest-service SER_HUNT_OUT
route 3[0-9].T3 dest-service SER_HUNT_OUT
route default dest-service SER_HUNT_OUTmapping-table itc to itc MT_ITC
map default to speechinterface isdn IF_S0_PSTN
route call dest-interface IF_S0_PHONE
dtmf-dialinginterface isdn IF_S0_PHONE1
route call dest-table RT_ISDN_2_SIP
use profile tone-set ITinterface isdn IF_S0_PHONE2
route call dest-table RT_ISDN_2_SIP
use profile tone-set ITinterface isdn IF_S0_PHONE3
route call dest-table RT_ISDN_2_SIP
use profile tone-set ITinterface isdn IF_S0_PHONE4
route call dest-table RT_ISDN_2_SIP
use profile tone-set ITinterface sip IF_SIP_ASTERISK
bind gateway GW-ASTERISK
service default
route call dest-table RT_2_ISDN
early-disconnect
remote-party-id called-party
remote-party-id calling-party
address-translation outgoing-call from-header user-part fix 210 host-part call
use profile voip ASTERISKservice hunt-group SER_HUNT_OUT
timeout 6
drop-cause normal-unspecified
drop-cause no-circuit-channel-available
drop-cause network-out-of-order
drop-cause temporary-failure
drop-cause switching-equipment-congestion
drop-cause access-info-discarded
drop-cause circuit-channel-not-available
drop-cause resources-unavailable
route call 1 dest-interface IF_SIP_ASTERISK
route call 2 dest-interface IF_S0_PSTNservice hunt-group HUNTING
drop-cause normal-unspecified
drop-cause no-circuit-channel-available
drop-cause network-out-of-order
drop-cause temporary-failure
drop-cause switching-equipment-congestion
drop-cause access-info-discarded
drop-cause circuit-channel-not-available
drop-cause resources-unavailable
drop-cause user-busy
route call 1 dest-interface IF_S0_PHONE1
route call 2 dest-interface IF_S0_PHONE2
route call 3 dest-interface IF_S0_PHONE3
route call 4 dest-interface IF_S0_PHONE4context cs switch
no shutdowngateway sip GW-ASTERISK
bind interface IF_IP_WAN routerservice default
domain 192.168.1.00
realm 192.168.1.100
authentication 210 password 210
default-server 192.168.1.100 loose-router
registrar 192.168.1.100 5060
user 210
session-timer 1800gateway sip GW-ASTERISK
no shutdownport ethernet 0 0
medium auto
encapsulation ip
bind interface IF_IP_WAN router
no shutdownport ethernet 0 1
medium auto
encapsulation ip
bind interface IF_IP_LAN router
no shutdownport bri 0 0
clock auto
encapsulation q921
power-feedq921
protocol pp
uni-side auto
encapsulation q931q931
protocol dss1
uni-side net
encapsulation cc-isdn
bind interface IF_S0_PHONE1 switchport bri 0 0
no shutdownport bri 0 1
clock auto
encapsulation q921
power-feedq921
protocol pp
uni-side auto
encapsulation q931q931
protocol dss1
uni-side net
encapsulation cc-isdn
bind interface IF_S0_PHONE2 switchport bri 0 1
no shutdownport bri 0 2
clock auto
encapsulation q921
power-feedq921
protocol pp
uni-side auto
encapsulation q931q931
protocol dss1
uni-side net
encapsulation cc-isdn
bind interface IF_S0_PHONE3 switchport bri 0 2
no shutdownport bri 0 3
clock auto
encapsulation q921
power-feedq921
protocol pp
uni-side auto
encapsulation q931q931
protocol dss1
uni-side net
encapsulation cc-isdn
bind interface IF_S0_PHONE4 switchport bri 0 3
no shutdownport bri 0 4
clock auto
encapsulation q921q921
protocol pmp
uni-side auto
encapsulation q931q931
protocol dss1
uni-side user
encapsulation cc-isdn
bind interface IF_S0_PSTN switchport bri 0 4
no shutdown
Lo username 210 in sip.conf[210]
username=210
type=friend
secret=210
record_out=Adhoc
record_in=Adhoc
qualify=no
port=5060
nat=never
mailbox=210@device
host=dynamic
dtmfmode=inband
context=from-internal
canreinvite=no
disallow=all
allow=alaw
Tempo addietro ho fatto un post in cui parlavo dell’uso dei Patton SmartNode 4638 con Trixbox, in particolare una configurazione che prevedeva un 4638 collegato a borchie Telecom, un TRixbox in mezzo con funzioni di IVR ed un altro 4638 a valle collegato al vecchio PBX, con le porte in modalità NT.
Bene, la seconda parte della configurazione era errata, o meglio in parte, perchè è vero che le telefonate potevano transitare, ma solo impegnando la linea e poi alzando la cornetta, facendo subito il numero.
Mi spiego meglio…come voi saprete una periferica isdn, un TA con funzioni voce invia direttamente la stringa del numero impegnando il canale D, andando poi ad occupare il canale B al momento della risposta, mentre un telefono ISDN o un PBX si aspettano un tono libero, continuo o ritmato.
Per questo i toni italiani sono importanti nella configurazione, ma io non avevo tenuto conto di creare le tabelle di routing e i service di hunt group, quindi documentandomi sul sito Patton sono riuscito a fare una configurazione adeguata per questo 4638 a monte del centralino classico, ed eccola qua
#—————————————————————-#
# #
# SN4638/5BIS/UI #
# R3.20 2006-11-17 H323 SIP BRI #
# 2007-07-27T06:39:21 #
# Generated configuration file #
# #
#—————————————————————-#cli version 3.20
dns-client server 88.149.128.12
webserver port 80 language en
snmp community public rosystem
ic voice 0
profile ppp default
profile call-progress-tone IT_Dialtone
play 1 200 425 -12
pause 2 200
play 3 600 425 -12
pause 4 1000profile call-progress-tone IT_Alertingtone
play 1 1000 425 -12
pause 2 4000profile call-progress-tone IT_Busytone
play 1 500 425 -12
pause 2 500profile tone-set default
profile tone-set IT
map call-progress-tone dial-tone IT_Dialtone
map call-progress-tone ringback-tone IT_Alertingtone
map call-progress-tone busy-tone IT_Busytone
map call-progress-tone release-tone IT_Busytone
map call-progress-tone congestion-tone IT_Busytoneprofile voip default
codec 1 g711alaw64k rx-length 20 tx-length 20
codec 2 g711ulaw64k rx-length 20 tx-length 20profile voip ASTERISK
codec 1 g729 rx-length 20 tx-length 20
codec 2 g711ulaw64k rx-length 20 tx-length 20
codec 3 g711alaw64k rx-length 20 tx-length 20profile pstn default
profile sip default
profile sip asterisk
profile aaa default
method 1 local
method 2 nonecontext ip router
interface IF_IP_WAN
ipaddress dhcp
no napt-insideinterface IF_IP_LAN
ipaddress 192.168.1.1 255.255.255.0
no napt-insidecontext cs switch
digit-collection timeout 4
national-prefix 0
international-prefix 00routing-table called-e164 RT_2_ISDN
route .%T dest-service HUNTING MT_ITCrouting-table called-e164 RT_ISDN_2_SIP
route 99[1-9].T3 dest-interface IF_S0_PSTN
route 0[1-9].T3 dest-service SER_HUNT_OUT
route 00[1-9].T3 dest-service SER_HUNT_OUT
route default dest-service SER_HUNT_OUTmapping-table itc to itc MT_ITC
map default to speechinterface isdn IF_S0_PSTN
route call dest-interface IF_S0_PHONE
dtmf-dialinginterface isdn IF_S0_PHONE1
route call dest-table RT_ISDN_2_SIP
dtmf-dialing
use profile tone-set ITinterface isdn IF_S0_PHONE2
route call dest-table RT_ISDN_2_SIP
dtmf-dialing
use profile tone-set ITinterface isdn IF_S0_PHONE3
route call dest-table RT_ISDN_2_SIP
dtmf-dialing
use profile tone-set ITinterface isdn IF_S0_PHONE4
route call dest-table RT_ISDN_2_SIP
dtmf-dialing
use profile tone-set ITinterface sip IF_SIP_ASTERISK
bind gateway GW-ASTERISK
service default
route call dest-table RT_2_ISDN
early-disconnect
remote-party-id called-party
remote-party-id calling-party
address-translation outgoing-call from-header user-part fix 210 host-part call
use profile voip ASTERISKservice hunt-group SER_HUNT_OUT
timeout 6
drop-cause normal-unspecified
drop-cause no-circuit-channel-available
drop-cause network-out-of-order
drop-cause temporary-failure
drop-cause switching-equipment-congestion
drop-cause access-info-discarded
drop-cause circuit-channel-not-available
drop-cause resources-unavailable
route call 1 dest-interface IF_SIP_ASTERISK
route call 2 dest-interface IF_S0_PSTNservice hunt-group HUNTING
drop-cause normal-unspecified
drop-cause no-circuit-channel-available
drop-cause network-out-of-order
drop-cause temporary-failure
drop-cause switching-equipment-congestion
drop-cause access-info-discarded
drop-cause circuit-channel-not-available
drop-cause resources-unavailable
drop-cause user-busy
route call 1 dest-interface IF_S0_PHONE1
route call 2 dest-interface IF_S0_PHONE2
route call 3 dest-interface IF_S0_PHONE3
route call 4 dest-interface IF_S0_PHONE4context cs switch
no shutdowngateway sip GW-ASTERISK
bind interface IF_IP_WAN routerservice default
domain 192.168.0.25
realm 192.168.0.25
authentication 210 password t6knzpUB0cY= encrypted
default-server 192.168.0.25 loose-router
registrar 192.168.0.25 5060
user 210
session-timer 1800gateway sip GW-ASTERISK
no shutdownport ethernet 0 0
medium auto
encapsulation ip
bind interface IF_IP_WAN router
no shutdownport ethernet 0 1
medium auto
encapsulation ip
bind interface IF_IP_LAN router
no shutdownport bri 0 0
clock auto
encapsulation q921
power-feedq921
protocol pp
uni-side auto
encapsulation q931q931
protocol dss1
uni-side net
encapsulation cc-isdn
bind interface IF_S0_PHONE1 switchport bri 0 0
no shutdownport bri 0 1
clock auto
encapsulation q921
power-feedq921
protocol pp
uni-side auto
encapsulation q931q931
protocol dss1
uni-side net
encapsulation cc-isdn
bind interface IF_S0_PHONE2 switchport bri 0 1
no shutdownport bri 0 2
clock auto
encapsulation q921
power-feedq921
protocol pp
uni-side auto
encapsulation q931q931
protocol dss1
uni-side net
encapsulation cc-isdn
bind interface IF_S0_PHONE3 switchport bri 0 2
no shutdownport bri 0 3
clock auto
encapsulation q921
power-feedq921
protocol pp
uni-side auto
encapsulation q931q931
protocol dss1
uni-side net
encapsulation cc-isdn
bind interface IF_S0_PHONE4 switchport bri 0 3
no shutdownport bri 0 4
clock auto
encapsulation q921q921
protocol pmp
uni-side auto
encapsulation q931q931
protocol dss1
uni-side user
encapsulation cc-isdn
bind interface IF_S0_PSTN switchport bri 0 4
no shutdown
Data la penuria su Intenet di esempi di configurazione funzionanti, propongo qui la configurazione di uno Smartnode 4552 presente nella sede remota di un mio cliente, quindi capirete il perchè delle regole di routing nel contesto router.
Di seguito la conf
#—————————————————————-#
# #
# SN4552/2BIS/EUI #
# R3.20 2006-11-17 SIP #
# 2007-07-04T18:53:09 #
# Generated configuration file #
# #
#—————————————————————-#cli version 3.20
dns-relay
webserver port 80 language en
sntp-client
sntp-client server primary 129.132.2.21 port 123 version 4
system hostname Montariososystem
ic voice 0
profile napt NAPT_WAN
profile ppp default
profile call-progress-tone IT_DialTone
play 1 200 425 -12
pause 2 200
play 3 600 425 -12
pause 4 1000profile call-progress-tone IT_Alertingtone
play 1 1000 425 -12
pause 2 4000profile call-progress-tone IT_Busytone
play 1 500 425 -12
pause 2 500profile call-progress-tone IT_Congestion
play 1 200 425 -12
pause 2 200profile tone-set default
profile tone-set IT
map call-progress-tone dial-tone IT_DialTone
map call-progress-tone ringback-tone IT_Alertingtone
map call-progress-tone busy-tone IT_Busytone
map call-progress-tone release-tone IT_Busytone
map call-progress-tone congestion-tone IT_Congestionprofile voip default
codec 1 g711ulaw64k rx-length 20 tx-length 20
codec 2 g711alaw64k rx-length 20 tx-length 20
dejitter-max-delay 200profile pstn default
profile sip default
profile aaa default
method 1 local
method 2 nonecontext ip router
interface WAN
ipaddress 192.168.3.96 255.255.255.0
use profile napt NAPT_WAN
tcp adjust-mss rx mtu
tcp adjust-mss tx mtuinterface LAN
ipaddress 192.168.1.1 255.255.255.0
tcp adjust-mss rx mtu
tcp adjust-mss tx mtucontext ip router
route 192.168.2.100 255.255.255.255 192.168.3.1 1
route 0.0.0.0 0.0.0.0 192.168.3.1 1context cs switch
national-prefix 0
international-prefix 00interface isdn IF-TELCO
route call dest-interface IF_ASTERISK
use profile tone-set ITinterface sip IF_ASTERISK
bind gateway GW_ASTERISK
service default
route call dest-interface IF-TELCO
early-disconnect
remote-party-id called-party
remote-party-id calling-partycontext cs switch
no shutdowngateway sip GW_ASTERISK
bind interface WAN routerservice default
domain 192.168.2.100
realm 192.168.2.100
authentication 1004 password 36ocYTYpKxk= encrypted
default-server 192.168.2.100 loose-router
registration-lifetime 500
registrar 192.168.2.100 5060
user 1004
session-timer 1800gateway sip GW_ASTERISK
no shutdownport ethernet 0 0
encapsulation ip
bind interface WAN router
no shutdownport ethernet 0 1
bind interface LAN router
no shutdownport bri 0 0
clock auto
encapsulation q921q921
permanent-layer2
protocol pp
uni-side user
encapsulation q931q931
protocol dss1
uni-side user
encapsulation cc-isdn
bind interface IF-TELCO switchport bri 0 0
no shutdownport bri 0 1
clock auto
encapsulation q921q921
protocol pmp
uni-side auto
encapsulation q931q931
protocol dss1
uni-side net
encapsulation cc-isdnport bri 0 1
shutdown
Mentre lato Asterisk solo questo
[1004]
type=friend
username=1004
fromuser=1004
secret=1234
context=from-pstn
qualify=yes
insecure=very
host=192.168.3.96
disallow=all
allow=ulaw
allow=alaw
Ho provato e configurato per un cliente un buon gateway GSM VoIP, il Portech MV-372.
Ha gli slot per due schede GSM ed in linea di massima si usa come un qualsiasi altro gateway, ovvero con utenti registrati su Asterisk/Trixbox quanti sono i canali disponibili, in questo caso due, e con una dial rule del tipo IP/USER/${EXTEN}
Inoltre è possibile sia il LAN to MOBILE, che il MOBILE to LAN, in questo ultimo caso le applicazioni sono molteplici, dalla chiamata automatica verso certe destinazioni, al DISA, al callback.
Inoltre supporta sia lo one stage che il two stage dialing.
Ho impiegato un pò a creare uno user funzionante, ma documentandomi un pò ecco il risultato
[1004]
type=friend
username=1004
fromuser=1004
regexten=1004
secret=1004
context=from-pstn
dtmfmode=inband
call-limit=1
host=dynamic
nat=no
canreinvite=no
insecure=very
qualify=yes
disallow=all
allow=ulaw
allow=alaw
Se vi interesserà qualcosa di più in particolare, postate qualche commento.
Inoltre credo che ho trovato un bug, anche se vi è l’opzione per inserire il codice pin, mi sa che non funziona, inserite le sim senza pin.
Con questo post voglio dare spunto a chi deve usare il Patton e Asterisk/Trixbox per creare applicazioni complesse.
Nel mio caso Trixbox sarà usato come frontend di un centralino 4 BRI privo di IVR, compito che sarà svolto da Asterisk.
Non entrerò nel merito della configurazione dell’IVR, tenuto solo come esempio.
La configurazione prevede 4 BRI Telecom Italia pmp, collegate a Trixbox tramite un Patton 4638 ed un classico PBX collegato ad un altro Patton 4638, porte pmp e in modalità net(NT).
La cosa più complessa sono le configurazioni degli SmartNode, riportate qui di seguito
Lato Telecom
#----------------------------------------------------------------# # # # SN4638/5BIS/UI # # R3.20 2006-11-17 H323 SIP BRI # # 2007-06-11T19:30:45 # # Generated configuration file # # # #----------------------------------------------------------------# cli version 3.20 dns-relay webserver port 80 language en sntp-client sntp-client server primary 129.132.2.21 port 123 version 4 system ic voice 0 low-bitrate-codec g729 profile napt NAPT_WAN profile ppp default profile call-progress-tone IT_Dialtone play 1 200 425 -12 pause 2 200 play 3 600 425 -12 pause 4 1000 profile call-progress-tone IT_Alertingtone play 1 1000 425 -12 pause 2 4000 profile call-progress-tone IT_Busytone play 1 500 425 -12 pause 2 500 profile tone-set default profile tone-set IT map call-progress-tone dial-tone IT_Dialtone map call-progress-tone ringback-tone IT_Alertingtone map call-progress-tone busy-tone IT_Busytone map call-progress-tone release-tone IT_Busytone map call-progress-tone congestion-tone IT_Busytone profile voip default codec 1 g711alaw64k rx-length 20 tx-length 20 codec 2 g711ulaw64k rx-length 20 tx-length 20 profile voip VOIP-ASTERISK codec 1 g729 rx-length 20 tx-length 20 codec 2 g711ulaw64k rx-length 20 tx-length 20 codec 3 g711alaw64k rx-length 20 tx-length 20 codec 4 g723-6k3 rx-length 30 tx-length 30 dejitter-max-delay 200 profile pstn default profile sip default profile aaa default method 1 local method 2 none context ip router interface WAN ipaddress dhcp use profile napt NAPT_WAN tcp adjust-mss rx mtu tcp adjust-mss tx mtu interface LAN ipaddress 192.168.1.1 255.255.255.0 tcp adjust-mss rx mtu tcp adjust-mss tx mtu context cs switch national-prefix 0 international-prefix 00 interface isdn IF-PBX route call dest-interface IF-ASTERISK use profile tone-set IT interface isdn IF-PBX-2 route call dest-interface IF-ASTERISK-2 use profile tone-set IT interface isdn IF-PBX-3 route call dest-interface IF-ASTERISK-3 use profile tone-set IT interface isdn IF-PBX-4 route call dest-interface IF-ASTERISK-4 use profile tone-set IT interface sip IF-ASTERISK bind gateway ASTERISK service default route call dest-interface IF-PBX early-disconnect privacy interface sip IF-ASTERISK-2 bind gateway ASTERISK-2 service default route call dest-interface IF-PBX-2 early-disconnect privacy interface sip IF-ASTERISK-3 bind gateway ASTERISK-3 service default route call dest-interface IF-PBX-3 early-disconnect privacy interface sip IF-ASTERISK-4 bind gateway ASTERISK-4 service default route call dest-interface IF-PBX-4 early-disconnect privacy context cs switch no shutdown gateway sip ASTERISK bind interface WAN router service default domain 192.168.0.153 realm 192.168.0.153 authentication patton password 36ocYTYpKxk= encrypted default default-server 192.168.0.153 loose-router registrar 192.168.0.153 5060 user patton session-timer 1800 gateway sip ASTERISK no shutdown gateway sip ASTERISK-2 call-signaling-port 5062 bind interface WAN router service default domain 192.168.0.153 realm 192.168.0.153 authentication patton-2 password 36ocYTYpKxk= encrypted default default-server 192.168.0.153 loose-router registrar 192.168.0.153 5060 user patton-2 session-timer 1800 gateway sip ASTERISK-2 no shutdown gateway sip ASTERISK-3 call-signaling-port 5064 bind interface WAN router service default domain 192.168.0.153 realm 192.168.0.153 authentication patton-3 password 36ocYTYpKxk= encrypted default default-server 192.168.0.153 loose-router registrar 192.168.0.153 5060 user patton-3 session-timer 1800 gateway sip ASTERISK-3 no shutdown gateway sip ASTERISK-4 call-signaling-port 5066 bind interface WAN router service default domain 192.168.0.153 realm 192.168.0.153 authentication patton-4 password 36ocYTYpKxk= encrypted default default-server 192.168.0.153 loose-router registrar 192.168.0.153 5060 user patton-4 session-timer 1800 gateway sip ASTERISK-4 no shutdown port ethernet 0 0 medium auto encapsulation ip bind interface WAN router no shutdown port ethernet 0 1 medium auto encapsulation ip bind interface LAN router no shutdown port bri 0 0 clock auto encapsulation q921 q921 protocol pp uni-side user encapsulation q931 q931 protocol dss1 uni-side user encapsulation cc-isdn bind interface IF-PBX switch port bri 0 0 no shutdown port bri 0 1 clock auto encapsulation q921 q921 protocol pp uni-side user encapsulation q931 q931 protocol dss1 uni-side user encapsulation cc-isdn bind interface IF-PBX-2 switch port bri 0 1 no shutdown port bri 0 2 clock auto encapsulation q921 q921 protocol pp uni-side user encapsulation q931 q931 protocol dss1 uni-side user encapsulation cc-isdn bind interface IF-PBX-3 switch port bri 0 2 no shutdown port bri 0 3 clock auto encapsulation q921 q921 protocol pp uni-side user encapsulation q931 q931 protocol dss1 uni-side user encapsulation cc-isdn bind interface IF-PBX-4 switch port bri 0 3 no shutdown port bri 0 4 clock auto encapsulation q921 q921 protocol pp uni-side user encapsulation q931 q931 protocol dss1 uni-side user port bri 0 4 shutdownLato PBX
#----------------------------------------------------------------# # # # SN4638/5BIS/UI # # R3.20 2006-11-17 H323 SIP BRI # # 2007-06-11T19:32:41 # # Generated configuration file # # # #----------------------------------------------------------------# cli version 3.20 dns-relay webserver port 80 language en sntp-client sntp-client server primary 129.132.2.21 port 123 version 4 system ic voice 0 low-bitrate-codec g729 profile napt NAPT_WAN profile ppp default profile call-progress-tone IT_Dialtone play 1 200 425 -12 pause 2 200 play 3 600 425 -12 pause 4 1000 profile call-progress-tone IT_Alertingtone play 1 1000 425 -12 pause 2 4000 profile call-progress-tone IT_Busytone play 1 500 425 -12 pause 2 500 profile tone-set default profile tone-set IT map call-progress-tone dial-tone IT_Dialtone map call-progress-tone ringback-tone IT_Alertingtone map call-progress-tone busy-tone IT_Busytone map call-progress-tone release-tone IT_Busytone map call-progress-tone congestion-tone IT_Busytone profile voip default codec 1 g711alaw64k rx-length 20 tx-length 20 codec 2 g711ulaw64k rx-length 20 tx-length 20 profile voip VOIP-ASTERISK codec 1 g729 rx-length 20 tx-length 20 codec 2 g711ulaw64k rx-length 20 tx-length 20 codec 3 g711alaw64k rx-length 20 tx-length 20 codec 4 g723-6k3 rx-length 30 tx-length 30 dejitter-max-delay 200 profile pstn default profile sip default profile aaa default method 1 local method 2 none context ip router interface WAN ipaddress dhcp use profile napt NAPT_WAN tcp adjust-mss rx mtu tcp adjust-mss tx mtu interface LAN ipaddress 192.168.1.1 255.255.255.0 tcp adjust-mss rx mtu tcp adjust-mss tx mtu context cs switch national-prefix 0 international-prefix 00 interface isdn IF-PBX route call dest-interface IF-ASTERISK use profile tone-set IT interface isdn IF-PBX-2 route call dest-interface IF-ASTERISK-2 use profile tone-set IT interface isdn IF-PBX-3 route call dest-interface IF-ASTERISK-3 use profile tone-set IT interface isdn IF-PBX-4 route call dest-interface IF-ASTERISK-4 use profile tone-set IT interface sip IF-ASTERISK bind gateway ASTERISK service default route call dest-interface IF-PBX early-disconnect privacy interface sip IF-ASTERISK-2 bind gateway ASTERISK-2 service default route call dest-interface IF-PBX-2 early-disconnect privacy interface sip IF-ASTERISK-3 bind gateway ASTERISK-3 service default route call dest-interface IF-PBX-3 early-disconnect privacy interface sip IF-ASTERISK-4 bind gateway ASTERISK-4 service default route call dest-interface IF-PBX-4 early-disconnect privacy context cs switch no shutdown gateway sip ASTERISK bind interface WAN router service default domain 192.168.0.153 realm 192.168.0.153 authentication patton-5 password 36ocYTYpKxk= encrypted default default-server 192.168.0.153 loose-router registrar 192.168.0.153 5060 user patton-5 session-timer 1800 gateway sip ASTERISK no shutdown gateway sip ASTERISK-2 call-signaling-port 5062 bind interface WAN router service default domain 192.168.0.153 realm 192.168.0.153 authentication patton-6 password 36ocYTYpKxk= encrypted default default-server 192.168.0.153 loose-router registrar 192.168.0.153 5060 user patton-6 session-timer 1800 gateway sip ASTERISK-2 no shutdown gateway sip ASTERISK-3 call-signaling-port 5064 bind interface WAN router service default domain 192.168.0.153 realm 192.168.0.153 authentication patton-7 password 36ocYTYpKxk= encrypted default default-server 192.168.0.153 loose-router registrar 192.168.0.153 5060 user patton-7 session-timer 1800 gateway sip ASTERISK-3 no shutdown gateway sip ASTERISK-4 call-signaling-port 5066 bind interface WAN router service default domain 192.168.0.153 realm 192.168.0.153 authentication patton-8 password 36ocYTYpKxk= encrypted default default-server 192.168.0.153 loose-router registrar 192.168.0.153 5060 user patton-8 session-timer 1800 gateway sip ASTERISK-4 no shutdown port ethernet 0 0 medium auto encapsulation ip bind interface WAN router no shutdown port ethernet 0 1 medium auto encapsulation ip bind interface LAN router no shutdown port bri 0 0 clock auto encapsulation q921 power-feed q921 protocol pmp uni-side net encapsulation q931 q931 protocol dss1 uni-side net encapsulation cc-isdn bind interface IF-PBX switch port bri 0 0 no shutdown port bri 0 1 clock auto encapsulation q921 power-feed q921 protocol pmp uni-side net encapsulation q931 q931 protocol dss1 uni-side net encapsulation cc-isdn bind interface IF-PBX-2 switch port bri 0 1 no shutdown port bri 0 2 clock auto encapsulation q921 power-feed q921 protocol pmp uni-side net encapsulation q931 q931 protocol dss1 uni-side net encapsulation cc-isdn bind interface IF-PBX-3 switch port bri 0 2 no shutdown port bri 0 3 clock auto encapsulation q921 power-feed q921 protocol pmp uni-side net encapsulation q931 q931 protocol dss1 uni-side net encapsulation cc-isdn bind interface IF-PBX-4 switch port bri 0 3 no shutdown port bri 0 4 clock auto encapsulation q921 q921 protocol pmp uni-side net encapsulation q931 q931 protocol dss1 uni-side net port bri 0 4 shutdown
Questo per tutto quello che riguarda i Patton, mentre su Trixbox, in sip_custom.conf creeremo 4 utenti nel contesto from-internal e 4 from-pstn (per ricevere telefonate dal Patton)
[patton]
type=friend
user=patton
username=patton
secret=1234
port=5060
host=dynamic
context=from-pstn[patton-2]
type=friend
user=patton
username=patton-2
secret=1234
port=5060
host=dynamic
context=from-pstn[patton-3]
type=friend
user=patton
username=patton-3
secret=1234
port=5060
host=dynamic
context=from-pstn[patton-4]
type=friend
user=patton
username=patton-4
secret=1234
port=5060
host=dynamic
context=from-pstn[patton-5]
type=friend
user=patton
username=patton-5
secret=1234
port=5060
host=dynamic
context=from-internal[patton-6]
type=friend
user=patton
username=patton-6
secret=1234
port=5060
host=dynamic
context=from-internal[patton-7]
type=friend
user=patton
username=patton-7
secret=1234
port=5060
host=dynamic
context=from-internal[patton-8]
type=friend
user=patton
username=patton-8
secret=1234
port=5060
host=dynamic
context=from-internal
Adesso dovremmo creare i trunk opportuni per instradare le chiamate verso il pbx e evrso telecom, ovvero creeremo 8 trunk custom, che avranno una dial nella forma
SIP/patton/$OUTNUM$
ovvero l’account sarà utilizzato come vero e proprio canale sip.
Dovrete mettere i vari patton, patton-1,patton-2 e patton-3 in sequenza, in modo che chi tenta di chiamare in uscita userà il primo cnale libero, la stessa cosa va fatta per le chiamate da instradare in automatico verso il centralino.
Potremo fare uso delle Misc. Destination in modo da avere una sequenza automatica del tipo TELECOM–>PATTON–>TRIXBOX–>PATTON–>PBX, ovviamente la outgoing route lato pbx dovrà avere una dial rule del tipo 0577XXX. che avrà come trunks i vari utenti patton del contesto from-internal, mentre le varie inbound route saranno “servite” dagli users nel contesto from-pstn, così come la route verso tutti le destinazioni che vorremmo.
Non è così complesso come sembra!!!
Molte volte erroneamente quanto viene calcolata la banda necessaria per effettuare chiamate VoIP, viene tenuto conto solo del codec utilizzato ed un numero molto empirico di chiamate contemporanee.
Mi spiego meglio, se utilizziamo il codec G.729 per la voce vengono utilizzati 8k, ma il pacchetto complessivo tcp/ip sarà quanto meno 28k, comprensivi di overhead del pacchetto, flags ed altro.
Inoltre è importante tenere conto anche del “mezzo” dove passa la chiamata, ovvero rete Ethernet, Frame relay, ATM..
Come fare allora?
Per prima cosa dobbiamo calcolare l’Erlang!
Cosa si nasconde dietro questo strano nome? Bhe semplicemente un valore che rappresenta il numero complessivo (in minuti) di chiamate in un ora, che passano dal nostro sistema.
Un Erlang si misura in ore, quindi divideremo i minuti di chiamata per 60 ed otterremmo i minuti di chiamate in Erlang.
Per esempio se 4 dipendenti fanno 30 minuti durante la stessa ora, avremo 120 minuti complessivi, che corrispondono a 2 Erlang.
Però un calcolo più fino deve tenere conto che le giornate lavorative sono grossomodo 22 giorni, ed il 15 percento delle telefonate si concentra nell’ora di punta.
Quindi per vedere il valore di Erlang del nostro sistema nell’ora di punta sarà calcolato dividendo il numero di minuti effettuati in un mese (MM), diviso per 22 giorni e moltiplicati per 0,15 (15%), infine diviso 60 per ottenere l’Erlang.
Mettiamo che il nostro sistema effettuti 50.000 minuti al mese, il valore di in Erlang sarà 5,7.
Cosa ci facciamo con questo valore? Bhe lo utilizzeremo per calcolare il numero di trunks, quindi di canali occupabili contemporaneamente, cosa che in VoIP ci permetterà poi di calcolare la banda necessaria.
C’è da tenere conto di un altro fattore, ovvero il GoS, Grade of Services, ovvero una percentuale accettabile di quante chiamate possono essere “rifiutate” nell’ora di intenso traffico. Un valore accettabile è sicuramente 0,01, ovvero l’un per cento di possibilità che una chiamata venga rifiutata.
Per calcolare il numero di linee (trunks) utilizzando Erlang andiamo sul sito http://erlang.com/calculator/erlb/
Ad esempio nel mio caso, nel mese di Maggio abbiamo avuto 31977 minuti di chiamate, quindi un valore Erlang di 3.64 corrisponderà a 9 linee (trunks)
Ad esempio, noi abbiamo per default un flusso E1 Telecom, quindi siamo molto al di sopra dell’effettivo bisogno…
Ma se volessimo far passare tutto da voip, quanta banda sarebbe necessaria? Collegandosi a http://erlang.com/calculator/eipb, oltre a scrivere il valore di GoS, di Erlang ed il codec utilizzato, ci verrà riportata il valore della banda necessaria. Un altro calcolatore è quello Cisco al sito http://tools.cisco.com/Support/VBC/do/CodecCalc1.do
Che è più specifico, in quanto ha molti più valori, come ad esempio il protocollo di Layer 2, se è un tunnel, se ci sono algoritmi di cifratura e così via..
Tornando al mio valore, 9 linee corrispondono a 216 kbps con il G.729A, mentre ad esempio 720kbps in PCM G.711.
Ovviamente qui ci riferiamo all’orario di punta, quindi non necessariamente dovremmo disporre SEMPRE di tutta questa banda, sarà quella massima utilizzata dal nostro sistema, ina base a quei calcoli di minuti mensili; è opportuno magari fare una media fra 3 o 4 mesi per avere un valore più vicino alla realtà!
Vi propongo qui un piccolo sistema, un banale “proof-of-concept”, ovvero come farsi chiamare da Asterisk attraverso una pagina web e una volta risposto sentire il menù di un IVR.
Tutto chiaro no? ![]()
Questo potrebbe essere usato da un azienda per non far pagare i propri clienti, magari sprovvisti di banda larga o telefonia ip in genere.
Con un qualsiasi editor creiamo una pagina php, ad esempio chiamami.php
<html>
<head>
<title> Silog ti chiama!</title>
</head>
<body>
<?$strHost = “127.0.0.1″;
$strUser = “admin”;
$strSecret = “amp111″;
$strContext = “from-internal”;
$strWaitTime = “30″;
$strPriority = “1″;
$strMaxRetry = “2″;
$strExten = $_POST['txtphonenumber'];
$callNumber = $strExten;
$strCallerId = “Web Call <$callNumber> “;
$length = strlen($strExten);
if ($length == 10 && is_numeric($strExten))
{
$oSocket = fsockopen($strHost, 5038, $errnum, $errdesc) or die(“Connection to host failed”);
fputs($oSocket, “Action: login\r\n”);
fputs($oSocket, “Events: off\r\n”);
fputs($oSocket, “Username: $strUser\r\n”);
fputs($oSocket, “Secret: $strSecret\r\n\r\n”);
fputs($oSocket, “Action: originate\r\n”);
fputs($oSocket, “Channel: Local/$callNumber@from-internal\r\n”);
fputs($oSocket, “WaitTime: $strWaitTime\r\n”);
fputs($oSocket, “CallerId: $strCallerId\r\n”);
fputs($oSocket, “Exten: 699\r\n”);
fputs($oSocket, “Context: $strContext\r\n”);
fputs($oSocket, “Priority: 1\r\n\r\n”);
fputs($oSocket, “Action: Logoff\r\n\r\n”);
sleep(3);
fclose($oSocket);
?>
<p>
<table width=”300″ border=”1″ bordercolor=”#0f0f0f” cellpadding=”3″ cellspacing=”0″><tr>
<td> <p> <font color=”#000000″ size=”2″ face=”verdana,georgia”> Stiamo processando
la tua chiamata, entro pochi secondi squillerà il telefono al numero
che hai inserito.<br>
Sarai messo in contatto con il nostro call center gratuitamente!</font> </p>
<p> <font color=”#000000″ size=”2″ face=”verdana,georgia”> Silog Srl. – Divisione
VoIP <br>
<a xhref=”javascript:history.go(-1)” mce_href=”javascript:history.go(-1)” > riprova.</a> </font> </p> </td>
</tr>
</table>
<p>
<h3> <a xhref=”javascript:history.go(-1)” mce_href=”javascript:history.go(-1)” > Indietro</a> </h3>
</p><?
}
else
{
?>
<p>
<table width=”300″ border=”1″ bordercolor=”#0f0f0f” cellpadding=”3″ cellspacing=”0″>
<tr>
<td> <font size=”2″ face=”verdana,arial,georgia”
color=”#000000″> Inserisci il tuo numero di telefono, comprensivo di prefisso (es.
0577XXXXXX) sul quale vuoi ricevere la chiamata dal nostro sistema automatico.</font>
<form action=”<? echo $_SERVER['PHP_SELF'] ?> ” method=”post”><input type=”text” size=”20″ maxlength=”10″ name=”txtphonenumber”> <br>
<input type=”submit”
value=”Telefonami”>
</form>
</td> </tr>
</table>
</p>
<?
}
?>
</body>
</html>
Il codice praticamente si spiega da solo, andranno customizzati i parametri per il manager.conf, in questo caso admin ed amp111 (una classica Trixbox) e la voce Extension, che nel mio caso 669 rappresenta il numero, nel contesto from-internal, dell’IVR.
Direi di una semplicità estrema!
PS. Silog è l’azienda dove attualmente lavoro, un pò pubblicità gratis ci vuole!
Volete le facilitazioni di FreePBX senza usare Trixbox?
Bene io ho provato ad installare su una Gentoo con Asterisk 1.2.17 e FreePBX 2.2.1, e devo dire che ci sono riuscito senza problemi!!
Tutto questo semplicemente utilizzando questo wiki
Stavo cercando qualche clients software per windows che supportasse IAX, e ce ne sono a bizzeffe, però o sono molto scarni graficamente (e però anche l’occhio vuole la sua parte), ma soprattutto non supportano le varie “cornette” usb, molto più comode di cuffie e microfono.
Un ottimo prodotto free era Firefly, non sviluppato più da tempo ed inoltre ha cambiato nome ed è diventato commerciale, però si trovano su internet anche le vecchie versioni “thirdpart” che hanno tutto.
Fino ad adesso però avevo trovato la versione 1.9.6, che sotto XP aveva il vizietto di crashare dopo una chiamata…non roba da poco!
Però ieri sera ho “rimediato” la versione 1.9.9, con lo skin telefonico carino e oltrettutto sembrerebbe stabile!!!
Ci sarebbe anche la DLL per il supporto G729, ma non posso fornirvela per ovvie ragioni di licenza, ma se cercate bene! ![]()
Potete scaricare il file eseguibile qui

Categories
Tag Cloud
Blog RSS
Comments RSS
Last 50 Posts
Back
Void « Default
Life
Earth
Wind
Water
Fire
Light 