Ok thanks for the help. Here it goes a the configuration and logs.
I also forget to say. If I disable Inbound the call get reach my can my server, since the operator says “The number you dial is unavailable…” and then Hang up the call.
Trunk Configuration
Trunk Endpoint
[+351XXXXXXXXX]
type=endpoint
transport=0.0.0.0-udp
context=from-ims
disallow=all
allow=ulaw,alaw,gsm,g726,g722,opus
aors=+351XXXXXXXXX
send_connected_line=no
rtp_keepalive=0
language=en_GB
outbound_proxy=sip:proxythomson.ims.vodafone.pt:5060
outbound_auth=+351XXXXXXXXX
auth=+351XXXXXXXXX
from_domain=ims.vodafone.pt
from_user=+351XXXXXXXXX
user_eq_phone=yes
t38_udptl=no
t38_udptl_ec=none
fax_detect=yes
trust_id_inbound=no
t38_udptl_nat=no
identify_by=auth_username
direct_media=no
rtp_symmetric=yes
dtmf_mode=auto
Aor
[+351XXXXXXXXX]
type=aor
qualify_frequency=60
contact=sip:[email protected]:5060
outbound_proxy=sip:proxythomson.ims.vodafone.pt:5060
Auth
[+351XXXXXXXXX]
type=auth
auth_type=userpass
password=access_id
username=+351XXXXXXXXX
Registration
[+351XXXXXXXXX]
type=registration
transport=0.0.0.0-udp
outbound_auth=+351XXXXXXXXX
retry_interval=90
fatal_retry_interval=30
forbidden_retry_interval=30
max_retries=10000
expiration=3600
auth_rejection_permanent=no
line=yes
endpoint=+351XXXXXXXXX
server_uri=sip:ims.vodafone.pt:5060
client_uri=sip:[email protected]:5060
outbound_proxy=sip:proxythomson.ims.vodafone.pt:5060
Indentify
[+351XXXXXXXXX]
type=identify
endpoint=+351XXXXXXXXX
match=ims.vodafone.pt
Full Logs from a Call
My phone try to establish a call 2 time beforing giving any error (Called Failed).
<--- Transmitting SIP request (573 bytes) to UDP:ip_redated:5060 --->
OPTIONS sip:proxythomson.ims.vodafone.pt:5060 SIP/2.0
Via: SIP/2.0/UDP publicip_redated:5060;rport;branch=z9hG4bKPja8b07b44-1f0a-4631-9f3f-46885a22949f
From: <sip:[email protected]>;tag=a59006dc-557d-4f16-9501-941d35ce7c0b
To: <sip:[email protected]>
Contact: <sip:+351XXXXXXXXX@publicip_redated:5060>
Call-ID: c2aad30a-85ca-4d95-87e7-952531b20990
CSeq: 45970 OPTIONS
Route: <sip:proxythomson.ims.vodafone.pt:5060>
Route: <sip:[email protected]:5060;user=phone>
Max-Forwards: 70
User-Agent: FPBX-17.0.21(22.5.2)
Content-Length: 0
<--- Received SIP response (421 bytes) from UDP:ip_redated:5060 --->
SIP/2.0 405 Method Not Allowed
Via: SIP/2.0/UDP publicip_redated:5060;received=10.7.25.14;branch=z9hG4bKPja8b07b44-1f0a-4631-9f3f-46885a22949f;rport=14601
From: <sip:[email protected]>;tag=a59006dc-557d-4f16-9501-941d35ce7c0b
To: <sip:[email protected]>;tag=aprqngfrt-54b2ub000oc59
Call-ID: c2aad30a-85ca-4d95-87e7-952531b20990
CSeq: 45970 OPTIONS
Allow: INVITE,ACK,BYE,REGISTER,CANCEL,PRACK
<--- Received SIP request (1535 bytes) from UDP:ip_redated:5060 --->
INVITE sip:s@publicip_redated:5060;line=owtmoga SIP/2.0
Via: SIP/2.0/UDP ip_redated:5060;branch=z9hG4bK9r9vaj30e873lur7lq80.1
To: <sip:[email protected]>
From: <sip:<my_number>@ims.vodafone.pt>;tag=SDe8hq301-688df101-175986788238121932757
Call-ID: SDe8hq301-7c7b36929021dcc21646e178952ce3cf-lm7mjd2
CSeq: 1 INVITE
Max-Forwards: 68
Content-Length: 463
Contact: <sip:B2BUA@ip_redated:5060;transport=udp>;+g.3gpp.accesstype="cellular";+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel";+sip.instance="<urn:gsma:imei:35784685-053139-0>"
Content-Type: application/sdp
Allow: ACK, BYE, CANCEL, INFO, INVITE, MESSAGE, NOTIFY, OPTIONS, PRACK, REFER, REGISTER, SUBSCRIBE, UPDATE
Accept-Contact: *;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel"
Supported: 100rel, path, precondition, replaces, timer
P-Asserted-Identity: <sip:<my_number>@ims.mnc001.mcc268.3gppnetwork.org>
P-Asserted-Identity: <tel:<my_number>>
Session-Expires: 21720
Min-SE: 21720
P-Called-Party-ID: <sip:[email protected]>
P-Early-Media: supported
v=0
o=- 697374990 103278277 IN IP4 ip_redated
s=-
c=IN IP4 ip_redated
t=0 0
a=sendrecv
m=audio 21268 RTP/AVP 9 8 18 100
b=AS:128
b=RS:525
b=RR:1575
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=yes
a=rtpmap:100 telephone-event/8000
a=fmtp:100 0-15
a=maxptime:40
a=sendrecv
a=des:qos mandatory local sendrecv
a=curr:qos local none
a=des:qos optional remote sendrecv
a=curr:qos remote none
a=ptime:20
<--- Transmitting SIP response (568 bytes) to UDP:ip_redated:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP ip_redated:5060;rport=5060;received=ip_redated;branch=z9hG4bK9r9vaj30e873lur7lq80.1
Call-ID: SDe8hq301-7c7b36929021dcc21646e178952ce3cf-lm7mjd2
From: <sip:<my_number>@ims.vodafone.pt>;tag=SDe8hq301-688df101-175986788238121932757
To: <sip:[email protected]>;tag=z9hG4bK9r9vaj30e873lur7lq80.1
CSeq: 1 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1759867882/ddccd69e17d1220de697d39335de478b",opaque="002667bb55668ac3",algorithm=MD5,qop="auth"
Server: FPBX-17.0.21(22.5.2)
Content-Length: 0
<--- Received SIP request (396 bytes) from UDP:ip_redated:5060 --->
ACK sip:s@publicip_redated:5060;line=owtmoga SIP/2.0
Via: SIP/2.0/UDP ip_redated:5060;branch=z9hG4bK9r9vaj30e873lur7lq80.1
CSeq: 1 ACK
To: <sip:[email protected]>;tag=z9hG4bK9r9vaj30e873lur7lq80.1
From: <sip:<my_number>@ims.vodafone.pt>;tag=SDe8hq301-688df101-175986788238121932757
Call-ID: SDe8hq301-7c7b36929021dcc21646e178952ce3cf-lm7mjd2
Max-Forwards: 68
Content-Length: 0
<--- Received SIP request (1369 bytes) from UDP:ip_redated:5060 --->
INVITE sip:s@publicip_redated:5060;line=owtmoga SIP/2.0
Via: SIP/2.0/UDP ip_redated:5060;branch=z9hG4bK37g1d9004862v0pp6qg0.1
To: <sip:[email protected]>
From: <sip:<my_number>@ims.vodafone.pt>;tag=SDegi8401-688df101-175986788569435432762
Call-ID: SDegi8401-bb9676505ccf6c37ab8305c66b4ed27f-lm7mjd2
CSeq: 1 INVITE
Max-Forwards: 68
Content-Length: 345
Contact: <sip:B2BUA@ip_redated:5060;transport=udp>;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel"
Content-Type: application/sdp
Allow: ACK, BYE, CANCEL, INVITE, NOTIFY, OPTIONS, PRACK, REFER, REGISTER, SUBSCRIBE, UPDATE
Accept: application/sdp
Accept-Contact: *;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel"
Supported: 100rel, histinfo, timer
P-Asserted-Identity: <sip:<my_number>@ims.mnc001.mcc268.3gppnetwork.org>
P-Asserted-Identity: <tel:<my_number>>
Resource-Priority: q735.4
Privacy: none
Session-Expires: 21720
Min-SE: 21720
P-Called-Party-ID: <sip:[email protected]>
P-Early-Media: supported
v=0
o=- 569211161 103608298 IN IP4 ip_redated
s=-
c=IN IP4 ip_redated
t=0 0
a=sendrecv
m=audio 29902 RTP/AVP 9 8 18 100
c=IN IP4 ip_redated
b=RR:1125
b=RS:375
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:100 telephone-event/8000
a=fmtp:100 0-15
a=maxptime:40
a=ptime:20
<--- Transmitting SIP response (568 bytes) to UDP:ip_redated:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP ip_redated:5060;rport=5060;received=ip_redated;branch=z9hG4bK37g1d9004862v0pp6qg0.1
Call-ID: SDegi8401-bb9676505ccf6c37ab8305c66b4ed27f-lm7mjd2
From: <sip:<my_number>@ims.vodafone.pt>;tag=SDegi8401-688df101-175986788569435432762
To: <sip:[email protected]>;tag=z9hG4bK37g1d9004862v0pp6qg0.1
CSeq: 1 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1759867885/a845a9c246a8822b34fd0d7d32319b9f",opaque="486651ae2c4bf5d7",algorithm=MD5,qop="auth"
Server: FPBX-17.0.21(22.5.2)
Content-Length: 0
<--- Received SIP request (396 bytes) from UDP:ip_redated:5060 --->
ACK sip:s@publicip_redated:5060;line=owtmoga SIP/2.0
Via: SIP/2.0/UDP ip_redated:5060;branch=z9hG4bK37g1d9004862v0pp6qg0.1
CSeq: 1 ACK
To: <sip:[email protected]>;tag=z9hG4bK37g1d9004862v0pp6qg0.1
From: <sip:<my_number>@ims.vodafone.pt>;tag=SDegi8401-688df101-175986788569435432762
Call-ID: SDegi8401-bb9676505ccf6c37ab8305c66b4ed27f-lm7mjd2
Max-Forwards: 68
Content-Length: 0