I have an Asterisk hosted in private IP behind the NAT and when Asterisk making an INVITE request to one of the endpoints he put his private IP in header “From” like here:
From: “softphone” sip:softphone@172.17.0.2; tag=aeccbaf7-456a-4045-a611-409b49ae1cde
It’s a little bit confusing the users when they see an incoming call from that IP. I want substitute this for something i-love-asterisk.com
Full INVITE request with header “From” from pjsip log:
<--- Transmitting SIP request (909 bytes) to UDP:172.17.0.1:42851 --->
INVITE sip:mobile@172.17.0.1:42851 SIP/2.0
Via: SIP/2.0/UDP 192.168.12.100:5060;rport;branch=z9hG4bKPj31027f66-ca14-4a7a-9e36-ec508c730a15
From: "softphone" <sip:softphone@172.17.0.2>;tag=aeccbaf7-456a-4045-a611-409b49ae1cde
To: <sip:mobile@172.17.0.1>
Contact: <sip:asterisk@192.168.12.100:5060>
Call-ID: 7b45b371-21dc-4b8c-8415-b331d2319df0
CSeq: 10751 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 16.7.0
Content-Type: application/sdp
Content-Length: 239
I found that this value can be substituted by option “from_domain” in section type “endpoint”. But for avoid duplications can it be substituted not on each endpoint section but globally?
Section “transport” has an option “domain”:
domain - Domain the transport comes from
But when I put example value and restart asterisk “core restart now” for apply changes and making a test call I didn’t see any mentions of my example value in output of enabled pjsip log, also I saw on my device old domain (private IP Asterisk 172.17.0.2) value when asterisk call it.
Can Asterisk domain (which now is private ip 172.17.0.2) be substitutes on the global level but not on each endpoint section?
Thank you.