PDA

Voir la version complète : S.O.S avec asterisk 1.8



davlefou
18/01/2012, 01h17
lu,
j'ai installé mon asterisk, mais il fonctionne plus ou moins.
J'ai des problèmes de son quand je me connecte à d'autre lignes.
Je n'arrive pas non plus à activé le trunk iax de mon fournisseur, mais tout marche chez ovh. Enfin au probléme de son prés! J'ai aussi des problémes parfois à la connection!! C'est pas vraiment stable.

voici mon sip.conf :


[general]
context=default ; Default context for incoming calls

udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
; Optionally add a port number, 192.168.1.1:5062 (default is port 5060)


tcpenable=no ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
; Optionally add a port number, 192.168.1.1:5062 (default is port 5060)

;

srvlookup=yes ; Enable DNS SRV lookups on outbound calls


register=0033422130111:code1@sip.ovh.net/0033422130111
register=0033422130211:code2@sip.ovh.net/0033422130211

disallow=all ; First disallow all codecs
allow=g729
allow=ulaw ; Allow codecs in order of preference
allow=ilbc ; see https://wiki.asterisk.org/wiki/display/AST/RTP+Packetization
; for framing options

[basic-options](!) ; a template
dtmfmode=rfc2833
context=from-office
type=friend

[natted-phone](!,basic-options) ; another template inheriting basic-options
directmedia=no
host=dynamic

[public-phone](!,basic-options) ; another template inheriting basic-options
directmedia=yes

[my-codecs](!) ; a template for my preferred codecs
disallow=all
allow=ilbc
allow=g729
allow=ulaw
allow=gsm
allow=g723

[ulaw-phone](!) ; and another one for ulaw-only
disallow=all
allow=ulaw


[sarah]
username=sarah
secret=Teste
type=friend
host=dynamic
mailbox=sabi.nounette@reveyo.com
context=direction
callerid=Sarah <103>
disallow=all
allow=ulaw
allow=alaw


[amira]
username=amira
secret=Teste
type=friend
host=dynamic
mailbox=sabi.nounette@reveyo.com
context=direction
callerid=Amira <0422130211>
disallow=all
allow=ulaw
allow=alaw


[ovh-0033484251111]
disallow=all
username=0033484251111
type=friend
secret=code0
qualify=yes
insecure=port,invite
host=sip.ovh.net
fromuser=0033484251111
fromdomain=sip.ovh.net
dtmfmode=inband
context=ovh-sip
dtmfmode=auto
allow=g729
;allow=ulaw
;allow=alaw


[ovh-0033422130111]
disallow=all
username=0033422130111
type=friend
secret=code1
qualify=yes
insecure=port,invite
host=sip.ovh.net
fromuser=0033422130139
fromdomain=sip.ovh.net
dtmfmode=inband
context=ovh-sip
dtmfmode=auto
allow=g729
;allow=ulaw
;allow=alaw

[ovh-0033422130211]
disallow=all
username=0033422130211
type=friend
secret=code2
qualify=yes
insecure=port,invite
host=sip.ovh.net
fromuser=0033422130211
fromdomain=sip.ovh.net
dtmfmode=inband
context=ovh-sip
dtmfmode=auto
allow=g729
allow=ulaw
allow=alaw



et mon iax.conf



[general]
bindport=4569 ; bindport and bindaddr may be specified

bindaddr=0.0.0.0

language=fr

bandwidth=low

;allow=all ; same as bandwidth=high
disallow=all
;disallow=g723.1 ; Hm... Proprietary, don't use it...
disallow=lpc10 ; Icky sound quality... Mr. Roboto.
allow=g729
allow=ulaw
allow=ilbc
;allow=gsm ; Always allow GSM, it's cool :)
;


jitterbuffer=no
forcejitterbuffer=no
;maxjitterbuffer=1000
;maxjitterinterps=10
;resyncthreshold=1000
;jittertargetextra=40

autokill=yes

[david]
username=david
secret=Teste
type=friend
host=dynamic
mailbox=david@X.com
context=direction
callerid=David Bieder <0484251111>
requirecalltoken=no
permit=192.168.0.0/255.255.0.0
;permit=0.0.0.0/0.0.0.0
requirecalltoken=auto

[sabi]
username=sabi
secret=Teste
type=friend
host=dynamic
mailbox=sabi.nounette@X.com
context=direction
callerid=Sabrine <0422130111>
;permit=0.0.0.0/0.0.0.0
permit=192.168.0.0/255.255.0.0
requirecalltoken=auto

[souahaib]
username=souahaib
secret=Teste
type=friend
host=dynamic
mailbox=sabi.nounette@X.com
context=direction
callerid=souahaib <0422130311>
;permit=0.0.0.0/0.0.0.0
permit=192.168.0.0/255.255.0.0
requirecalltoken=no


[to-selfone]
type=peer
username=identifant
secret=pass
trunk=yes
disallow=all
allow=g729
host=119.217.253.6



et mon extension.conf




[general]

static=yes

writeprotect=no


clearglobalvars=yes

[globals]

[ovh-sip] ;nom du plan

exten => 0033484251111,1,Dial(IAX2/david)
exten => 0033484251111,n,Hangup()
exten => 0033422130111,Dial(IAX2/sabi)
exten => 0033422130111,n,Hangup()
exten => 0033422130211,1,Dial(SIP/amira,5)
exten => 0033422130211,n,Playback(vm-reachoper)
exten => 0033422130211,n,Echo()
exten => 0033422130211,n,Hangup()


[appel-sortant]
;Cette partie gere les appels sortants allons appeler en passant par la section [forfait-ovh] du fichier sip.conf
;exten = _04XXX.,1,Dial(SIP/ovh-0033484251111/${EXTEN})
exten = _1ZXXX.,1,Dial(SIP/ovh-0033484251111/0${EXTEN:1})
exten = _1ZXXX.,n,Hangup()
exten = _2ZXXX.,1,Dial(SIP/ovh-0033422130111/0${EXTEN:1})
exten = _2ZXXX.,n,Hangup()
exten = _3ZXXX.,1,Dial(SIP/ovh-0033422130211/0${EXTEN:1})
exten = _3ZXXX.,n,Hangup()
;exten = _00XX.,1,Dial(IAX2/${EXTEN}@to-selfone)
;exten => _0XX.,1,Dial(IAX2/to-selfone/${EXTEN})
exten => _0ZXXXX.,1,Dial(IAX2/to-selfone/0033${EXTEN:1})
exten => _0033XXX.,1,Dial(IAX2/to-selfone/${EXTEN})
exten => _0032XXX.,1,Dial(IAX2/to-selfone/${EXTEN})
exten => _0041XXX.,1,Dial(IAX2/to-selfone/${EXTEN})

[direction]
include => appel-sortant
exten => 202,1,Dial(IAX2/david)
exten => 203,1,Dial(IAX2/sabi)
exten => 103,1,Dial(SIP/sarah)
exten => 104,1,Dial(SIP/amira)
exten => 101,1,Dial(IAX2/david/&IAX2/sabi&SIP/sarah)
exten => 102,1,Dial(SIP/david)


J'ai installé un liscence et un codec g729, j'ai besoin de bande passante!!!
voici un appels avec le trunk :


-- Accepting AUTHENTICATED call from 192.168.1.120:
> requested format = ulaw,
> requested prefs = (),
> actual format = ulaw,
> host prefs = (g729|ulaw|ilbc),
> priority = mine
-- Executing [0493546444@direction:1] Dial("IAX2/sabi-4608", "IAX2/to-selfone/0033493546444") in new stack
-- Called IAX2/to-selfone/0033493549424
[Jan 18 00:14:40] WARNING[1820]: chan_iax2.c:10672 socket_process: Call rejected by 119.217.253.6: No authority found
-- Hungup 'IAX2/to-selfone-21810'
== Everyone is busy/congested at this time (1:0/0/1)
-- Auto fallthrough, channel 'IAX2/sabi-4608' status is 'CHANUNAVAIL'


et un prise avec un appel en boucle :



sip show channels
Peer User/ANR Call ID Format Hold Last Message Expiry Peer
91.121.129.17 0033422130211 1a04664a3cc683c 0x0 (nothing) No <guest>
91.121.129.17 0033484251111 10173-EO-01ec6f 0x100 (g729) No Rx: ACK ovh-003348
91.121.129.17 0422130211 67b96c07678757f 0x100 (g729) No Tx: ACK ovh-003348
192.168.1.120 amira ad36837d-7e2a-4 0x4 (ulaw) No Rx: ACK amira
91.121.129.17 0033422130111 1148ec7c467b0d4 0x0 (nothing) No <guest>
192.168.1.120 amira 4fc4e4a6-aa1b-4 0x0 (nothing) No Rx: BYE amira
6 active SIP dialogs



Pourriez vous m'aider?

davlefou
19/01/2012, 13h02
Cela marche avec mon opérateur! Mais j'ai toujours des problémes de qualité quand j'utilise de l'iax vers sip ou l'inverse!!!

ffossard
19/01/2012, 14h26
Il faut être plus précis sur ces problèmes de sons et les conditions dans lesquelles ils se produisent.

Faites des tests avec une configuration épurée, là vous avez trop d'éléments à la fois, le problème peut venir de la combinaison de plusieurs mauvais réglages. Commencez par une configuration "la plus simple du monde" utilisant le trunk ayant le problème audio.

davlefou
19/01/2012, 14h56
J'ai ce message quand j'appels :



-- Accepting AUTHENTICATED call from 192.168.1.120:
> requested format = alaw,
> requested prefs = (),
> actual format = ulaw,
> host prefs = (ulaw),
> priority = mine
-- Executing [0182880101@direction:1] Dial("IAX2/sabi-4570", "IAX2/to-iax-selfone/0033182880101") in new stack
-- Called IAX2/to-iax-selfone/0033182880101
-- Call accepted by 109.237.253.8 (format g729)
-- Format for call is g729
-- IAX2/to-iax-selfone-20041 is ringing
-- IAX2/to-iax-selfone-20041 is ringing
-- IAX2/to-iax-selfone-20041 stopped sounds
-- IAX2/to-iax-selfone-20041 answered IAX2/sabi-4570
-- Operating with different codecs [0x4 (ulaw)] [0x100 (g729)] , can't native bridge...
-- Operating with different codecs [0x4 (ulaw)] [0x100 (g729)] , can't native bridge...
-- Hungup 'IAX2/to-iax-selfone-20041'
== Spawn extension (direction, 0182880101, 1) exited non-zero on 'IAX2/sabi-4570'
-- Hungup 'IAX2/sabi-4570'
-- Accepting AUTHENTICATED call from 192.168.1.120:
> requested format = alaw,
> requested prefs = (),
> actual format = ulaw,
> host prefs = (ulaw),
> priority = mine
-- Executing [0182880101@direction:1] Dial("IAX2/sabi-9926", "IAX2/to-iax-selfone/0033182880101") in new stack
-- Called IAX2/to-iax-selfone/0033182880101
-- Call accepted by 109.237.253.8 (format g729)
-- Format for call is g729
-- IAX2/to-iax-selfone-16842 is ringing
-- IAX2/to-iax-selfone-16842 is ringing
-- IAX2/to-iax-selfone-16842 stopped sounds
-- IAX2/to-iax-selfone-16842 answered IAX2/sabi-9926
-- Operating with different codecs [0x4 (ulaw)] [0x100 (g729)] , can't native bridge...
-- Operating with different codecs [0x4 (ulaw)] [0x100 (g729)] , can't native bridge...
Asterisk32*CLI> iax2 show channels
Channel Peer Username ID (Lo/Rem) Seq (Tx/Rx) Lag Jitter JitBuf Format FirstMsg LastMsg
IAX2/sabi-9926 192.168.1.120 sabi 09926/04781 00012/00003 00000ms -0001ms 0000ms ulaw Rx:NEW Rx:ACK
IAX2/to-iax-selfone- 109.237.253.8 0003010 16842/02170 00006/00009 00000ms -0001ms 0000ms g729 Tx:NEW Tx:ACK
2 active IAX channels



Es ce que cela t'aide?
J'ai un son haché quand je suis en iax sur iax, mais pas quand je pars d'un compte sip!
J'utiise sflphone comme logiciel sous ubuntu.

jean
19/01/2012, 15h51
- est ce un VPS ?
- vérifier les IRQ, etc...
http://www.voip-info.org/wiki/view/Asterisk+PCI+bus+Troubleshooting
http://www.voip-info.org/wiki/index.php?page_id=1729

- vérifier les codecs utilisés en SIP et en IAX - pendant la comm, SIP SHOW CHANNELS et regarder s'il y a du transcodage

davlefou
19/01/2012, 23h01
Je suis sur un serveur local chez moi!
Je suis unique en iax dans ce cas, le compte utilisateur, saby est en iax avec un logiciel sflphone connecté à asterisk et je resort sur un trunk vers mon opérateur!!! Le sflphone fournie le signals en ulaw et il est transcodé en g729 vers mon opérateur.

jean
19/01/2012, 23h24
c'est étrange, l'iax ou le sip ne font que transporter la signalisation, et pas la voix. la seule différence que je vois, c'est le transcodage g729/alaw;

essaie de faire un appel en sip avec du alaw, et voir si ca se dégrade aussi

davlefou
19/01/2012, 23h36
lu,
j'ai des comptes de teste, sip et iax, quand je pars d'un compte sip en ulaw, cela marche très bien! Aussi bien vers le sip(ovh) que vers le trunk iax. Je ne comprend pas, c'est pas logique. Peut être une option ou bien le softphone.

davlefou
24/01/2012, 14h44
J'ai essayé avec gsm et ulaw, j'ai ce message :



-- Operating with different codecs [0x2 (gsm)] [0x100 (g729)] , can't native bridge...
-- Operating with different codecs [0x2 (gsm)] [0x100 (g729)] , can't native bridge...


et aussi la le format ulaw.
Pourtant, quand je pars de compte sip, j'ai pas de probléme, tout marche bien!
cas fonctionnant!:
compte sip --- trunk iax
ulaw g729

compte sip --- ligne sip extern
ulaw g729

cas ne fonctionnement ou son haché :
compte iax --- trunk iax
ulaw g729

compte sip --- ligne sip extern
ulaw g729

Dans tout les cas, j'utilise sflphone.

jean
24/01/2012, 19h25
es tu sur des codecs que tu utilises ?
par exemple, dans le code que tu montres, il n'arrive pas à bridger, vraisemblablement parce que il ne peut pas transcoder (peut etre parce qu'il n'y a pas de licence g729)
fais un core show translation recalc
pour voir les codecs
et vérifie pendant les appels avec sip show channels

davlefou
24/01/2012, 22h11
Voici les traces d'un appels:




== Using SIP RTP CoS mark 5
-- Executing [0145934478@direction:1] Dial("SIP/amira-00000003", "IAX2/to-iax-selfone/0033145934478") in new stack
-- Called IAX2/to-iax-selfone/00331xxxxxxx
-- Call accepted by x.x.x.x (format g729)
-- Format for call is g729
-- IAX2/to-iax-selfone-17694 is ringing









iax2 show channels
Channel Peer Username ID (Lo/Rem) Seq (Tx/Rx) Lag Jitter JitBuf Format FirstMsg LastMsg
IAX2/to-iax-selfone- x.x.x.x 0003010 17694/07459 00074/00076 00040ms -0001ms 0000ms g729 Tx:NEW Rx:ACK
1 active IAX channel
Asterisk32*CLI> sip show channels
Peer User/ANR Call ID Format Hold Last Message Expiry Peer
192.168.1.120 amira d99bdf0e-ba42-4 0x4 (ulaw) No Rx: ACK amira





g729 show licenses
0/0 encoders/decoders of 1 licensed channels are currently in use