Le 03/07/2023 à 13:44, BERTRAND Joël a écrit :
NoSpam a écrit :
Le 03/07/2023 à 12:57, BERTRAND Joël a écrit :
NoSpam a écrit :
Le 03/07/2023 à 12:07, BERTRAND Joël a écrit :
NoSpam a écrit :
Stop: n'as tu pas dit que les postes en interne arrivent à s'appeler ?
Si c'est le cas, cela veut dire qu'asterisk ne sait pas comment
traiter
l'appel.
34. No circuit/channel available
Renvois STP le context internal
Je réponds à toutes les questions dans le même mail pour qu'on s'y
retrouve plus facilement.
[internal]
exten => 6001,1,Dial(PJSIP/6001)
exten => 6002,1,Dial(PJSIP/6002)
exten => _00[1-79]XXXXXXXX,1,Dial(PJSIP/${EXTEN:1}@SBSR)
Ca c'est OK
rayleigh*CLI> pjsip show endpoint SBSR
...
Endpoint: SBSR
Not in
use 0 of inf
OutAuth: SBSR_auth/trunk-sip
Aor: SBSR 1
Contact: SBSR/sip:[email protected]. 5551fa2b78
NonQual nan
Transport: udp-transport udp 0 0
0.0.0.0:5060
Identify: SBSR/SBSR
Match: 37.97.65.186/32
udp-transport sur port 5060 ? Ca coince déjà ;) Le Contact est
également mauvais, il devrait ressembler à
SBSR/sip:<sip domain provider>:5070
Dans [aor] rajoute
contact=sip:<sip domain provider>:5070
Identify ne sert à rien puisque tu t'enregistre
Règle les deux premiers problèmes, cela devrait faire avancer les choses
[SBSR]
type=aor
contact=sip:trunk-sip@<domain>:5070
max_contacts=1
remove_existing=yes
Es tu sur que trunk-sip est ton contact chez le provider ? J'ai des
doutes ... au mieux c'est ton username mais en général pas besoin
sip:domain:5070 doit suffire. Mets max_contacts=10 pour le moment
Déjà, il y a un point que je ne saisis pas.
La signalisation du trunk SIP se fait en 5070/TCP, mais les paquets RTP
associés sont bien en UDP :
13:38:49.281101 IP rayleigh.systella.fr.17056 > 37.97.65.116.50458: UDP,
length 172
13:38:49.286130 IP 37.97.65.116.50458 > rayleigh.systella.fr.17056: UDP,
length 172
Quand je lance
rayleigh*CLI> pjsip show endpoint SBSR
...
Endpoint: SBSR Not in
use 0 of inf
OutAuth: SBSR_auth/trunk-sip
Aor: SBSR 1
Contact: SBSR/sip:[email protected]. 5551fa2b78
NonQual nan
Transport: udp-transport udp 0 0 0.0.0.0:5060
Identify: SBSR/SBSR
Match: 37.97.65.186/32
à quoi correspond udp-transport ? À la signalisation (auquel cas on
devrait être en 5070/TCP) ou aux paquets RTP ?
Signalisation. Ce que je ne comprends pas c'est
systella2.buroticstore.eu qui est ton hostname alors que domain devrait
être celui du provider et le port celui pour joindre le provider.
Remplace le contact dans [aor] par
contact=sip:37.97.65.186:5070
J'ai l'impression qu'il s'agit de la signalisation mais je n'en suis
pas sûr. Je vais tout de même essayer de trouver le moyen de forcer un
transport en TCP sur le port 5070.
Comme identifiant, le fournisseur m'a juste donné trunk-sip@domaine,
rien d'autre.
OK mais le @domain ne me parait pas être le bon, rectifie comme donné ci
dessus
A primary feature of AOR objects (Address of Record) is to tell Asterisk
where an endpoint can be contacted. Without an associated AOR section,
an endpoint cannot be contacted. AOR objects also store associations to
mailboxes for MWI requests and other data that might relate to the whole
group of contacts such as expiration and qualify settings.
When Asterisk receives an inbound registration, it'll look to match
against available AORs
pjsip show aors te donnera plus d'infos
rayleigh*CLI> pjsip show aors
Aor: <Aor..............................................>
<MaxContact>
Contact: <Aor/ContactUri............................> <Hash....>
<Status> <RTT(ms)..>
==========================================================================================
Aor: 6001 1
Contact: 6001/sip:[email protected]:5060 a0a76d4acb
NonQual nan
Aor: 6002 1
Contact: 6002/sip:[email protected]:5061 6a2a034b2c
NonQual nan
Aor: SBSR 1
Contact: SBSR/sip:[email protected] 5551fa2b78
NonQual nan
Objects found: 3
rayleigh*CLI> pjsip list transports
Transport: <TransportId........> <Type> <cos> <tos>
<BindAddress....................>
==========================================================================================
Transport: tcp-transport tcp 0 0 192.168.15.18:5060
Transport: udp-transport udp 0 0 0.0.0.0:5060
Ton asterisk écoute en tcp sur l'ip 192.168.15.18 port 5060 et sur
toutes les IP locales en UDP port 5060
Ex de mon asterisk écoutant et connecté en TLS chez un provider en ipv4
Transport: transport-tls tls 0 0 0.0.0.0:5061
https://wiki.asterisk.org/wiki/display/AST/PJSIP+Transport+Selection