Cannot contact sip trunk

<--- Received SIP request (1049 bytes) from UDP:10.10.10.249:57318 --->
INVITE sip:+594594272200@192.255.255.251;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.10.10.249:57318;branch=z9hG4bK-524287-1---33ae86333fc36b61;rport
Max-Forwards: 70
Contact: <sip:vromain@10.10.10.249:57318;transport=UDP>
To: <sip:+594594272200@192.255.255.251>
From: <sip:vromain@192.255.255.251;transport=UDP>;tag=71c95a17
Call-ID: D8hr1xSWV46CMgnQhSirWA..
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, sec-agree, outbound, path, X-cisco-serviceuri
User-Agent: Z 5.5.15 v2.10.19.5
Allow-Events: presence, kpml, talk, as-feature-event
Content-Length: 341

v=0
o=Z 0 623695994 IN IP4 10.10.10.249
s=Z
c=IN IP4 10.10.10.249
t=0 0
m=audio 57229 RTP/AVP 106 9 98 101 0 8 3
a=rtpmap:106 opus/48000/2
a=fmtp:106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
a=rtcp-mux
<--- Transmitting SIP response (519 bytes) to UDP:10.10.10.249:57318 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.10.10.249:57318;rport=57318;received=10.10.10.249;branch=z9hG4bK-524287-1---33ae86333fc36b61
Call-ID: D8hr1xSWV46CMgnQhSirWA..
From: <sip:vromain@192.255.255.251>;tag=71c95a17
To: <sip:+594594272200@192.255.255.251>;tag=z9hG4bK-524287-1---33ae86333fc36b61
CSeq: 1 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1725979614/0a5b91e1489c94fd52bd679974ac2c71",opaque="35d63750228b1d14",algorithm=MD5,qop="auth"
Server: Asterisk PBX 20.9.2
Content-Length: 0
<--- Received SIP request (379 bytes) from UDP:10.10.10.249:57318 --->
ACK sip:+594594272200@192.255.255.251;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.10.10.249:57318;branch=z9hG4bK-524287-1---33ae86333fc36b61;rport
Max-Forwards: 70
To: <sip:+594594272200@192.255.255.251>;tag=z9hG4bK-524287-1---33ae86333fc36b61
From: <sip:vromain@192.255.255.251;transport=UDP>;tag=71c95a17
Call-ID: D8hr1xSWV46CMgnQhSirWA..
CSeq: 1 ACK
Content-Length: 0
<--- Received SIP request (1361 bytes) from UDP:10.10.10.249:57318 --->
INVITE sip:+594594272200@192.255.255.251;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.10.10.249:57318;branch=z9hG4bK-524287-1---f8ba10d86dbb268d;rport
Max-Forwards: 70
Contact: <sip:vromain@10.10.10.249:57318;transport=UDP>
To: <sip:+594594272200@192.255.255.251>
From: <sip:vromain@192.255.255.251;transport=UDP>;tag=71c95a17
Call-ID: D8hr1xSWV46CMgnQhSirWA..
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, sec-agree, outbound, path, X-cisco-serviceuri
User-Agent: Z 5.5.15 v2.10.19.5
Authorization: Digest username="vromain",realm="asterisk",nonce="1725979614/0a5b91e1489c94fd52bd679974ac2c71",uri="sip:+594594272200@192.255.255.251;transport=UDP",response="bce567b3dc1aa40353a98a7ee55e5557",cnonce="ebc1817b6b23ffc8be3ee1787ac6bb31",nc=00000001,qop=auth,algorithm=MD5,opaque="35d63750228b1d14"
Allow-Events: presence, kpml, talk, as-feature-event
Content-Length: 341

v=0
o=Z 0 623695994 IN IP4 10.10.10.249
s=Z
c=IN IP4 10.10.10.249
t=0 0
m=audio 57229 RTP/AVP 106 9 98 101 0 8 3
a=rtpmap:106 opus/48000/2
a=fmtp:106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
a=rtcp-mux
<--- Transmitting SIP response (327 bytes) to UDP:10.10.10.249:57318 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.10.10.249:57318;rport=57318;received=10.10.10.249;branch=z9hG4bK-524287-1---f8ba10d86dbb268d
Call-ID: D8hr1xSWV46CMgnQhSirWA..
From: <sip:vromain@192.255.255.251>;tag=71c95a17
To: <sip:+594594272200@192.255.255.251>
CSeq: 2 INVITE
Server: Asterisk PBX 20.9.2
Content-Length: 0
-- Executing [+594594272200@assistance:1] NoOp("PJSIP/vromain-00000001", "External number ! Typed call to +594594272200") in new stack
-- Executing [+594594272200@assistance:2] Set("PJSIP/vromain-00000001", "EXTENSION=+594594272200") in new stack
-- Executing [+594594272200@assistance:3] Dial("PJSIP/vromain-00000001", "PJSIP/+594594140950/+594594272200") in new stack
[Sep 10 14:46:55] ERROR[76411]: res_pjsip.c:993 ast_sip_create_dialog_uac: Endpoint '+594594140950': Could not create dialog to invalid URI '+594594272200'. Is endpoint registered and reachable?
[Sep 10 14:46:55] ERROR[76411]: chan_pjsip.c:2698 request: Failed to create outgoing session to endpoint '+594594140950'
[Sep 10 14:46:55] NOTICE[76483][C-00000002]: app_dial.c:2766 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
== Everyone is busy/congested at this time (1:0/0/1)
-- Auto fallthrough, channel 'PJSIP/vromain-00000001' status is 'CHANUNAVAIL'
<--- Transmitting SIP response (404 bytes) to UDP:10.10.10.249:57318 --->
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP 10.10.10.249:57318;rport=57318;received=10.10.10.249;branch=z9hG4bK-524287-1---f8ba10d86dbb268d
Call-ID: D8hr1xSWV46CMgnQhSirWA..
From: <sip:vromain@192.255.255.251>;tag=71c95a17
To: <sip:+594594272200@192.255.255.251>;tag=955e1992-a02a-47ef-837e-a279d98a8cde
CSeq: 2 INVITE
Server: Asterisk PBX 20.9.2
Reason: Q.850;cause=3
Content-Length: 0
<--- Received SIP request (380 bytes) from UDP:10.10.10.249:57318 --->
ACK sip:+594594272200@192.255.255.251;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.10.10.249:57318;branch=z9hG4bK-524287-1---f8ba10d86dbb268d;rport
Max-Forwards: 70
To: <sip:+594594272200@192.255.255.251>;tag=955e1992-a02a-47ef-837e-a279d98a8cde
From: <sip:vromain@192.255.255.251;transport=UDP>;tag=71c95a17
Call-ID: D8hr1xSWV46CMgnQhSirWA..
CSeq: 2 ACK
Content-Length: 0

The diagnostic is correct; there is no such endpoint. There are no endpoints starting with + and no endpoints formed mainly of numbers.

same => n,Dial(PJSIP/+594594140950/sip:${[EXTENSION}@sip.telcoz.eu](mailto:EXTENSION}@sip.telcoz.eu))
[...]
same => n,Dial(PJSIP/${EXTENSION}@+594594140950

Both commands are wrong

But isn’t there a +594594140950 endpoint in my asterisk ?
And how to proceed the call through the trunk if I don’t format correctly?

I don’t understand could you please explain ?

The endpoint seems to be missing on the destination side of the trunk.

(Note it is difficult to read the configurations with all the blank lines.)

Also I’ve never heard of an outbound_route section type in pjsip.conf, and providing max contacts and a specific contact is not a very sensible thing to do, even though it is probably harmless.

Sorry for the blank line, I just copy/paste from my terminal to the website and then I use the tag you told me. If there is a way to avoid blank line I’ll try.

The console were saying “no outbound_route”. I searched it on llm and it was saying that I missed this section… So I tried it…

So you mean that the [+594594140950] endpoint doesn’t exist on my provider side ?
Can you confirm with me that the request is instantiate with this number : +594594140950 ?
I am trying to use the distant endpoint [+594594140950] to call external number as this one for example : +594594272200

In part, I was confusing this with another issue, in which there was a trunk between two Asterisks. However the difficulty in reading the logs, and the fact that you have one log which does should the Dial actually sending an INVITE, made the confusion worse.

I’m not sure if the one that got past the Dial had a + in the section name, but I would have used a mnemonic name, not the address of record.

You need to transfer the actual files, rather than to scrape them from a screen, and I think you need to go back and replace the logs and configurations in the previous posts in the thread.

Where did you get the outbound_route suggestion from? This sounds like a ChatGPT hallucination, confusing FreePBX and Asterisk constructs.

Meanwhile, this is your configuration, although the blank lines may not have all been in the original, as I stripped them all out and then added them where they helped readability.

[general]
type=global
endpoint_identifier_order = header,auth_username

[transport-udp]
type=transport
protocol=udp ;udp,tcp,tls,ws,wss,flow
bind=0.0.0.0:5060
local_net=192.168.17.248/29
local_net=192.255.255.248/29
local_net=10.10.10.248/29
external_media_address=46.4.42.59
external_signaling_address=46.4.42.59

[registrar]
type=registrar
transport=transport-udp

[user_registration](!)
type=registration
server_uri=sip:192.255.255.251
transport=transport-udp

[assistance_endpoint](!)
type=endpoint
transport=transport-udp
context=assistance
disallow=all
allow=ulaw,alaw,g722,gsm
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
identify_by=auth_username
outbound_proxy=sip.telcoz.eu

[assistance_auth](!)
type=auth
auth_type=userpass

[assistance_aor](!)
type=aor
max_contacts=1
remove_existing=yes

[commercial_endpoint](!)
type=endpoint
transport=transport-udp
context=commercial
disallow=all
allow=ulaw,alaw,g722,gsm
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
identify_by=auth_username
outbound_proxy=sip.telcoz.eu

[commercial_auth](!)
type=auth
auth_type=userpass

[commercial_aor](!)
type=aor
max_contacts=1
remove_existing=yes

;;;;;;;;;;;;;;;;;;;;
;DEFINITION MANUELLE DES UTILISATEURS
;;;;;;;;;;;;;;;;;;;;

[vromain](assistance_endpoint)
auth=vromain
aors=vromain

[vromain](assistance_auth)
username=vromain
password=test

[vromain](assistance_aor)
contact=sip:vromain@192.168.2.34:5060

[vromain](user_registration)
client_uri=sip:vromain@192.255.255.251
contact_user=vromain
outbound_auth=vromain

[jandrena](assistance_endpoint)
auth=jandrena
aors=jandrena

[jandrena](assistance_auth)
username=jandrena
password=test

[jandrena](assistance_aor)
contact=sip:jandrena@192.168.2.34:5060

[jandrena](user_registration)
client_uri=sip:jandrena@192.255.255.251
contact_user=jandrena
outbound_auth=jandrena

[contact](commercial_endpoint)
auth=contact
aors=contact

[contact](commercial_auth)
username=contact
password=test

[contact](commercial_aor)
contact=sip:contact@192.168.2.34:5060
[contact](user_registration)
client_uri=sip:contact@192.255.255.251
contact_user=contact
outbound_auth=contact

[+594594140950]
type=outbound-proxy
proxy=sip.telcoz.eu
transport=transport-udp
send_dns_srv=yes

[+594594140950]
type=endpoint
transport=transport-udp
context=+594594140950
disallow=all
allow=ulaw,alaw,g722,gsm
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
identify_by=auth_username
aors=+594594140950
auth=+594594140950
outbound_auth=+594594140950

[+594594140950]
type=auth
auth_type=userpass
username=engineirie97300
password=P2zb6ymGSrQN9Bb

[+594594140950]
type=aor
max_contacts=1
remove_existing=yes
contact=sip:engineirie97300@sip.telcoz.eu

[+594594140950]
type=registration
server_uri=sip:sip.telcoz.eu
client_uri=sip:engineirie97300@sip.telcoz.eu
contact_user=+594594140950
outbound_auth=+594594140950
transport=transport-udp

[+594594140950]
type=outbound-route
endpoint=+594594140950
outbound_auth=+594594140950
outbound_proxy=sip:sip.telcoz.eu
transport=transport-udp

[+594594140950]
type=identify
endpoint=+594594140950
match=sip.telcoz.eu

yes the outbound_route idea comme from mistral and chatgpt.
Asterisk wasn’t throwing errors so I thought it was good.

I’m gonna delete this.

I think type=registrar is the same.

My provider doesn’t answer me when I asked them to check the endpoint on the sip.telcoz.eu server.

I’m sorry but I didn’t reach to edit the original post.
I now deleted the registrar section.

The provider only stated that the number of the editor must be +594594140950…
Do you think that sip.telcoz.eu see the request coming from the same endpoint but configured on my asterisk ? Or do you think that the request come from the vromain endpoint on my asterisk and so it block the whole process?

This one looks like it reached the provider,. judging by the User-Agent line.

how can we hide the password in this comment ? could you please edit the password that have been copy/pasted.
I just noticed it and I’m editing the post where I displayed it

To be certain you’d need to ask a moderator to do that. I think, if you delete the whole post, it will, eventually, be completely removed, but there is a delay.