Asterisk problème d'appel entrant

Bonjour je suis entrain de mettre en place une configuration asterisk mais j’arrive pas a faire fonctionner les appelles entrant.

je vous met ci joint mon sip.conf:
[general]

nat=no
context=atmos-default-context
defaultexpiry=600
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
transport=udp
srvlookup=no
tos_sip=cs3
tos_audio=ef
insecure=port,invite
sendrpid=no
useragent=trunk-eqinoxe
usereqphone=yes
dtmfmode=rfc2833
use_q850_reason=yes
sipdebug=no
recordhistory=yes
dumphistory=yes

register => tcp ://TrunktestAsterisk61b88bcf3f519@pbx.eqinoxe.com:0uQWP6gnK9zP:TrunktestAsterisk61b88bcf3f519@sippbx.eqinoxe.com/TrunktestAsterisk61b88bcf3f519~3600

[trunk-eqinoxe]

type=friend
context=entrant-sip
defaultuser=TrunktestAsterisk61b88bcf3f519
secret=0uQWP6gnK9zP
outboundproxy=sippbx.eqinoxe.com
outboundproxyport=5060
todomain=pbx.eqinoxe.com
fromdomain=pbx.eqinoxe.com
host=pbx.eqinoxe.com
insecure=invite,port
qualify=no
qualifyfreq=30
nat=force_rport
dtmfmode=rfc2833
registertimeout=10
registerattempts=5
disallow=all
allow=g729
allow=alaw
allow=ulaw

[1001]
username=1001
type=friend
secret=GW1509!
callerid=“0322419818” <0322419818>
nat=no
host=dynamic
context=sortant-sip
language=fr

[1002]
username=1002
type=friend
secret=CA1509!
callerid=“0327413818” <0327413818>
nat=no
host=dynamic
context=sortant-sip
language=fr

[1003]
username=1003
type=friend
secret=SH1509!
callerid=“0327413818” <0327413818>
nat=no
host=dynamic
context=sortant-sip
language=fr

[1004]
username=1004
type=friend
secret=FD1509!
callerid=“0327413818” <0327413818>
nat=no
host=dynamic
context=sortant-sip
language=fr

Do your internal calls work? You need to provide a sip trace of the things that don’t work as expected.

That said, your are using the old chan_sip module, that is no longer supported. It would make sense to switch to the newer pjsip stack.

Vos appels internes fonctionnent-ils ? Vous devez fournir une trace de gorgée des choses qui ne fonctionnent pas comme prévu.

Cela dit, vous utilisez l’ancien module chan_sip, qui n’est plus pris en charge. Il serait logique de passer à la nouvelle pile pjsip.

I can’t tell you—it is a secret.

Please see https://wiki.asterisk.org. You have to spend some time to learn the concepts of pjsip. Then you can search for sample configurations.

Je ne peux pas vous dire — ç’est un secret.

Veuillez consulter https://wiki.asterisk.org. Vous devez passer un peu de temps pour apprendre les concepts de pjsip. Ensuite, vous pouvez rechercher des exemples de configurations.

As noted, you should be using chan_pjsip.

However, you are using defaultuser in association with an outgoing registration. That doesn’t make sense. Also you are calling username, in other places. As the documentation says, it is unlikely that you need it.

Not having a disallow for the phones will result in huge INVITE requests and breaks some versions of Asterisk.

Unless endpoints share IP addresses, type=friend should be type=peer.

Your service provider is broken, or you have not correctly provided your public IP address, if they need force_rport. The circumstances were nat=no, as against the default, auto, are exceedingly rare.

qualifyfreq makes no sense with qualify=no.

insecure=port isn’t normally needed for UDP.

As a matter of urgency, remove insecure=invite from the general section, as this allows anyone to masquerade as a local phone without knowing the phone’s password. (This assumes that insecure is recognized in the general section.)

There isn’t much point in using tcpbindaddr, if you don’t enable TCP.

Note that the tos_* options require that your routers be configured appropriately.

I’d be surprised if your register string works.

I’d suggest that the only codec that makes sense on a trunk to an EU based provider (looks like Germany) is alaw. I’d only expect g729 on a trunk if you were running a low wage call centre, where internet costs dominated wage costs.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.