Donc en gros je le fais comme ceci :
Code:
[general]
bindport=5060
bindaddr=0.0.0.0
disallow=all
allow=g729
allow=ulaw
allow=alaw
allow=gsm
allow=ilbc
language=fr
register => Ujonathan:*****@sip.ippi.com
;[ippi_entrant] ; configuration des appels entrants depuis ippi
;type=peer
;host=sip.ippi.com
;context=from_ippi
;nat=force_rport
;canreinvite=no
[ippi_entrant_sortant] ; configuration des appels sortants - entrants
context=entrant
type = peer
host = sip.ippi.com
defaultuser = Ujonathan
secret = *****
fromdomain = sip.ippi.com
nat = nat=force_rport,comedia
canreinvite = no
insecure=invite
[my_phone] ; configuration ompte SIP sur Asterisk avec identifiant my_phone et le mot de passe my_password
type=friend
secret=****
host=dynamic
context=peer
nat=no
Coter fichier extension voilà comment c'est aussi :
Code:
[general]
static=yes
writeprotect=no
clearglobalvars=no
autofallthrough=yes
[globals]
CONSOLE=Console/dsp ; Console interface for demo
IAXINFO=guest ; IAXtel username/password
TRUNK=DAHDI/G2 ; Trunk interface
TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)
[work]
exten => _6XXX,1,Dial(SIP/${EXTEN},20)
exten => _6XXX,2,VoiceMail(${EXTEN}@work)
;Numéro de la boite vocale
exten => 600,1,VoiceMailMain(${CALLERID(num)}@work,s)
[from_ippi] ; les appels entrants de ippi font sonner le compte SIP my_phone
exten => s,1,Dial(SIP/my_phone)
[home] ; tous les appels sortants du compte my_phone sont envoyés sur le réseau ippi
exten => _X.,1,Dial(SIP/ippi_entrant_sortant/${EXTEN})
[pbx_config]
exten => 6001,1,Dial(SIP/6001,10,tr)
;exten => 6001,2,Voicemail(6001)
exten => 6001,3,playBack(vm-goodbye)
exten => 6001,4,HangUp()
exten => 6002,1,Dial(SIP/6002,10,tr)
;exten => 6002,2,Voicemail(6002)
exten => 6002,3,playBack(vm-goodbye)
exten => 6002,4,HangUp()
exten => 6003,1,Dial(SIP/6003,10,tr)
;exten => 6003,2,Voicemail(6003)
exten => 6003,3,playBack(vm-goodbye)
exten => 6003,4,HangUp()
Lien image
https://imgur.com/a/vJmYh