PJSIP.conf Try to call out

Iam so close to fix outgoing call from Asterisk 18 to Trunk with pjsip.conf.
IP in Contact is wrong 83.17*.., should been: 217.28*..
Someone have a good ide?

<— Transmitting SIP request (1111 bytes) to TLS:193.12*..:5061 —>
INVITE sip:+4685511*****@193.12*..:5061 SIP/2.0
Via: SIP/2.0/TLS 83.17*.**.*:5061;rport;branch=z9hG4bKPj83f92e11-c21d-480c-b367-e354460ccda1;alias
From: sip:00461018*****@217.28*.**.**;tag=d6bb7ab7-a5b8-4ac0-ae07-b0cb532461c2
To: sip:+4685511*****@193.12.31.28
Contact: sip:asterisk@83.17:5061*.**.**;transport=TLS

Goal:
Contact: sip:asterisk@217.28:5061*.**.**;transport=TLS

Network topology and pjsip configuration?

TRUNK ip:
83.17*..70
83.17*.
.78
193...28

My local ip: 217.28*…
My internet ip: 217.28*…
Same IP both place


[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0:5061

[transport-tcp]
type = transport
protocol = tcp
bind = 0.0.0.0

[simpletrans]
type=transport
protocol=tls
bind = 0.0.0.0:5061
method = tlsv1_2
local_net = 217.28*…
;allow_reload=yes
ca_list_file=/etc/asterisk/keys/usertrust-rsa-certification-authority.crt
cert_file = /etc/asterisk/keys/asterisk.pem
priv_key_file = /etc/asterisk/keys/business-trunk-private-key.pem
external_media_address=83.17*..70
external_signaling_address=83.17*.
.70

[tele2ut]
type=peer
outbound_auth=tele2ut
media_encryption=sdes
dtmf_mode=rfc3261
;server_uri = sip:193.12*:5061
;client_uri = sip:myaccountid@193.12*:5061
server_uri = sip:siptrunk.tnet.tele.se:5061
client_uri = sip:myaccountid.siptrunk.tele.net:5061
outbound_proxy = 83.17*.**.70
endpoint=tele2ut
line=yes
direct_media=yes
force_rport=no
rtp_symmetric=no
rewrite_contact=yes

[tele2ut]
type=auth
auth_type=userpass
username = myaccountid
password = password*
realm = myaccountid.siptrunk.tele2.net

[tele2ut]
type=endpoint
send_rpid=no
trust_id_outbound=yes
;transport = 0.0.0.0:5061
transport=simpletrans
context=trunk20-in
disallow=all
allow=ulaw
allow=gsm
allow=alaw
allow=g722
dtmf_mode=rfc4733
media_encryption=sdes
outbound_auth=tele2ut
aors=tele2ut
direct_media=no

[tele2ut]
type=identify
endpoint=tele2ut
match=83.17*..70
match=83.17*.
.78
match=193...28

[tele2ut]
type=aor
contact=sip:193.12*:5061

This is not a valid private network number. If you are doing NAT between two different public addresses, you can expect problems.

I can’t be sure from the obfuscation,m but real local nets should be networks, i.e. they should have non-trivial netmasks, not the implied 255.255.255.255 if it is the same as your IP address.

Please properly describe your network topology, which seems to be unusual and non-trivial.

The reason it is using the 83 adedress is that the ITSP address cannot be within your localnet, because your localnet only contains one address and that address already taken up for what you call your IP address.


Trunk server on Internet
3 ip to connect or sip:siptrunk.tnet.tele.se
83.17*…70 | 83.17*…78 | 193…28


Firewall severhosting


217.28*
My server have same local IP and public IP, strange but true…
217.28*

No. They don’t have a local IP.

ok, do you think it is possible to solve or should I ask the server provider to convert to regular local ip?

It’s probably doable, but I still don’t understand your configuration, and you still seem to be using “local” in a strange way.

At a guess, you have what I call a broken multi-homed configuration (multiple IP addresses, but no border gateway protocol and autonomous system number). I believe that chan_pjsip can normally cope with that, as it allows multiple transports, each with their own IP address. However I’m not at all convinced that I’ve really undestood what you are doing.

I’m not convinced I did the right thing.
You can call in, hear sounds prompting but can not call out.
So something works anyway but I do not know at all how to proceed …

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