Asterisk sending INVITE on behalf of my softphone (endpoint) and put own private IP in "From" header

I have an Asterisk behind the NAT with ip 172.17.0.2 and 2 endpoints connected to him 192.168.12.101 (softphone) and 192.168.12.100 (mobile). When I calling mobile from softphone I wondered because I see incoming call on mobile is:
softphone@172.17.0.2
What is my Asterisk private IP. I enabled “pjsip set logger on” and write down who actually doing what:

Softphone                     ASTERISK                        Mobile
192.168.12.101        192.168.12.101-nat-172.17.0.2       192.168.12.100      
+-------------------------------+------------------------------+
|                               |                              |
|INVITE mobile                  |                              |
+------------------------------>+                              |
|                               |                              |
| 401 Unathorized               |                              |
<-------------------------------+                              |
|                               |                              |
| ACK                           |                              |
+------------------------------>+                              |
|                               |                              |
| INVITE mobile                 |                              |
+------------------------------>+                              |
|                               |                              |
| 100 Trying                    |                              |
<-------------------------------+                              |
|                               |                              |
|                               | INVITE mobile                |
|                               +------------------------------>
|                               | FROM: softphone@172.17.0.2   |

There was another messages after, but I am intrested in last. Why Asterisk substitute the “From” header. Actually softphone has another ip 192.168.12.101, but Asterisk put in header his IP. Why? And how I can specify there at least Asterisk’s external IP, which can be seen by softphone and mobile (192.168.12.101)

Thank you for answer or pointing to the link what I can read to better understand this and answer by myself on this question.

Full log of pjsip:

INVITE sip:mobile@192.168.12.101 SIP/2.0
Via: SIP/2.0/UDP 192.168.12.101:63480;rport;branch=z9hG4bKPjTQ-HJ9lyTBUYgOFHXKZtR3Qs90s9wDVp
Max-Forwards: 70
From: "softphone" <sip:softphone@192.168.12.101>;tag=jPPIoHYF1MqQQgiFVlt74NmzvuXgv.bU
To: <sip:mobile@192.168.12.101>
Contact: "softphone" <sip:softphone@192.168.12.101:63480;ob>
Call-ID: irLJORPBUK1Chp5RLqFY9SK5f5HFfX0Y
CSeq: 32175 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, norefersub
User-Agent: Telephone 1.4
Content-Type: application/sdp
Content-Length:   304

v=0
o=- 3788197877 3788197877 IN IP4 192.168.12.101
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4022 RTP/AVP 8 0 101
c=IN IP4 192.168.12.101
b=TIAS:64000
a=rtcp:4023 IN IP4 192.168.12.101
a=sendrecv
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16

<--- Transmitting SIP response (572 bytes) to UDP:172.17.0.1:56465 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.12.101:63480;rport=56465;received=172.17.0.1;branch=z9hG4bKPjTQ-HJ9lyTBUYgOFHXKZtR3Qs90s9wDVp
Call-ID: irLJORPBUK1Chp5RLqFY9SK5f5HFfX0Y
From: "softphone" <sip:softphone@192.168.12.101>;tag=jPPIoHYF1MqQQgiFVlt74NmzvuXgv.bU
To: <sip:mobile@192.168.12.101>;tag=z9hG4bKPjTQ-HJ9lyTBUYgOFHXKZtR3Qs90s9wDVp
CSeq: 32175 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1579209077/ceda0f57d821d9621abb351e96b18498",opaque="5f76ab853b396ba2",algorithm=md5,qop="auth"
Server: Asterisk PBX 16.7.0
Content-Length:  0


<--- Received SIP request (399 bytes) from UDP:172.17.0.1:56465 --->
ACK sip:mobile@192.168.12.101 SIP/2.0
Via: SIP/2.0/UDP 192.168.12.101:63480;rport;branch=z9hG4bKPjTQ-HJ9lyTBUYgOFHXKZtR3Qs90s9wDVp
Max-Forwards: 70
From: "softphone" <sip:softphone@192.168.12.101>;tag=jPPIoHYF1MqQQgiFVlt74NmzvuXgv.bU
To: <sip:mobile@192.168.12.101>;tag=z9hG4bKPjTQ-HJ9lyTBUYgOFHXKZtR3Qs90s9wDVp
Call-ID: irLJORPBUK1Chp5RLqFY9SK5f5HFfX0Y
CSeq: 32175 ACK
Content-Length:  0


<--- Received SIP request (1226 bytes) from UDP:172.17.0.1:56465 --->
INVITE sip:mobile@192.168.12.101 SIP/2.0
Via: SIP/2.0/UDP 192.168.12.101:63480;rport;branch=z9hG4bKPjwkNRMrj3MyXbSlYVG6rGHoOPKonnMMlj
Max-Forwards: 70
From: "softphone" <sip:softphone@192.168.12.101>;tag=jPPIoHYF1MqQQgiFVlt74NmzvuXgv.bU
To: <sip:mobile@192.168.12.101>
Contact: "softphone" <sip:softphone@192.168.12.101:63480;ob>
Call-ID: irLJORPBUK1Chp5RLqFY9SK5f5HFfX0Y
CSeq: 32176 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, norefersub
User-Agent: Telephone 1.4
Authorization: Digest username="softphone", realm="asterisk", nonce="1579209077/ceda0f57d821d9621abb351e96b18498", uri="sip:mobile@192.168.12.101", response="6060304c6b6f8c10bb6aa3230b06ad99", algorithm=md5, cnonce="BNd-NwVaEt0NFlSZfK-T2-nK85wxmLxg", opaque="5f76ab853b396ba2", qop=auth, nc=00000001
Content-Type: application/sdp
Content-Length:   304

v=0
o=- 3788197877 3788197877 IN IP4 192.168.12.101
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4022 RTP/AVP 8 0 101
c=IN IP4 192.168.12.101
b=TIAS:64000
a=rtcp:4023 IN IP4 192.168.12.101
a=sendrecv
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16

  == Setting global variable 'SIPDOMAIN' to '192.168.12.101'
<--- Transmitting SIP response (374 bytes) to UDP:172.17.0.1:56465 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.12.101:63480;rport=56465;received=172.17.0.1;branch=z9hG4bKPjwkNRMrj3MyXbSlYVG6rGHoOPKonnMMlj
Call-ID: irLJORPBUK1Chp5RLqFY9SK5f5HFfX0Y
From: "softphone" <sip:softphone@192.168.12.101>;tag=jPPIoHYF1MqQQgiFVlt74NmzvuXgv.bU
To: <sip:mobile@192.168.12.101>
CSeq: 32176 INVITE
Server: Asterisk PBX 16.7.0
Content-Length:  0


    -- Executing [mobile@internal:1] Dial("PJSIP/softphone-00000006", "PJSIP/mobile") in new stack
    -- Called PJSIP/mobile
<--- Transmitting SIP request (908 bytes) to UDP:172.17.0.1:57846 --->
INVITE sip:mobile@172.17.0.1:57846 SIP/2.0
Via: SIP/2.0/UDP 192.168.12.101:5060;rport;branch=z9hG4bKPjddc57832-bcf5-4811-9185-8758e0a1ba2c
From: "softphone" <sip:softphone@172.17.0.2>;tag=7c53b704-62f9-48af-aaaa-68d4a297b88c
To: <sip:mobile@172.17.0.1>
Contact: <sip:asterisk@192.168.12.101:5060>
Call-ID: 51f6004b-0918-4d40-adc0-69a37683eaac
CSeq: 1165 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

v=0
o=- 719225989 719225989 IN IP4 192.168.12.101
s=Asterisk
c=IN IP4 192.168.12.101
t=0 0
m=audio 11904 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP response (365 bytes) from UDP:172.17.0.1:57846 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.12.101:5060;rport=5060;branch=z9hG4bKPjddc57832-bcf5-4811-9185-8758e0a1ba2c;received=192.168.12.101
From: "softphone" <sip:softphone@172.17.0.2>;tag=7c53b704-62f9-48af-aaaa-68d4a297b88c
To: <sip:mobile@172.17.0.1>;tag=2718536061
Call-ID: 51f6004b-0918-4d40-adc0-69a37683eaac
CSeq: 1165 INVITE
Content-Length: 0


    -- PJSIP/mobile-00000007 is ringing
    -- PJSIP/mobile-00000007 is ringing
<--- Transmitting SIP response (563 bytes) to UDP:172.17.0.1:56465 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.12.101:63480;rport=56465;received=172.17.0.1;branch=z9hG4bKPjwkNRMrj3MyXbSlYVG6rGHoOPKonnMMlj
Call-ID: irLJORPBUK1Chp5RLqFY9SK5f5HFfX0Y
From: "softphone" <sip:softphone@192.168.12.101>;tag=jPPIoHYF1MqQQgiFVlt74NmzvuXgv.bU
To: <sip:mobile@192.168.12.101>;tag=9fc2f597-3f0d-4713-bbbe-c96790a326ea
CSeq: 32176 INVITE
Server: Asterisk PBX 16.7.0
Contact: <sip:192.168.12.101:5060>
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Content-Length:  0


<--- Received SIP response (656 bytes) from UDP:172.17.0.1:57846 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.12.101:5060;rport=5060;branch=z9hG4bKPjddc57832-bcf5-4811-9185-8758e0a1ba2c;received=192.168.12.101
From: "softphone" <sip:softphone@172.17.0.2>;tag=7c53b704-62f9-48af-aaaa-68d4a297b88c
To: <sip:mobile@172.17.0.1>;tag=2718536061
Call-ID: 51f6004b-0918-4d40-adc0-69a37683eaac
CSeq: 1165 INVITE
Contact: "mobile" <sip:mobile@172.17.0.1:57846;transport=udp>
Content-Type: application/sdp
Content-Length: 200

v=0
o=- 1579209076347 1579209081946 IN IP4 192.168.12.100
s=-
c=IN IP4 192.168.12.100
t=0 0
m=audio 41194 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16

       > 0x7f96940233b0 -- Strict RTP learning after remote address set to: 192.168.12.100:41194
    -- PJSIP/mobile-00000007 answered PJSIP/softphone-00000006
<--- Transmitting SIP request (405 bytes) to UDP:172.17.0.1:57846 --->
ACK sip:mobile@172.17.0.1:57846 SIP/2.0
Via: SIP/2.0/UDP 192.168.12.101:5060;rport;branch=z9hG4bKPj42158528-3a57-4d44-b99e-d33c59a4d9c5
From: "softphone" <sip:softphone@172.17.0.2>;tag=7c53b704-62f9-48af-aaaa-68d4a297b88c
To: <sip:mobile@172.17.0.1>;tag=2718536061
Call-ID: 51f6004b-0918-4d40-adc0-69a37683eaac
CSeq: 1165 ACK
Max-Forwards: 70
User-Agent: Asterisk PBX 16.7.0
Content-Length:  0


       > 0x7f9694014d80 -- Strict RTP learning after remote address set to: 192.168.12.101:4022
<--- Transmitting SIP response (881 bytes) to UDP:172.17.0.1:56465 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.12.101:63480;rport=56465;received=172.17.0.1;branch=z9hG4bKPjwkNRMrj3MyXbSlYVG6rGHoOPKonnMMlj
Call-ID: irLJORPBUK1Chp5RLqFY9SK5f5HFfX0Y
From: "softphone" <sip:softphone@192.168.12.101>;tag=jPPIoHYF1MqQQgiFVlt74NmzvuXgv.bU
To: <sip:mobile@192.168.12.101>;tag=9fc2f597-3f0d-4713-bbbe-c96790a326ea
CSeq: 32176 INVITE
Server: Asterisk PBX 16.7.0
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Contact: <sip:192.168.12.101:5060>
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length:   241

v=0
o=- 3788197877 3788197879 IN IP4 192.168.12.101
s=Asterisk
c=IN IP4 192.168.12.101
t=0 0
m=audio 30336 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

    -- Channel PJSIP/mobile-00000007 joined 'simple_bridge' basic-bridge <115cd5c3-aaf1-43d7-9db3-df6480ef9864>
    -- Channel PJSIP/softphone-00000006 joined 'simple_bridge' basic-bridge <115cd5c3-aaf1-43d7-9db3-df6480ef9864>
       > Bridge 115cd5c3-aaf1-43d7-9db3-df6480ef9864: switching from simple_bridge technology to native_rtp
       > Remotely bridged 'PJSIP/softphone-00000006' and 'PJSIP/mobile-00000007' - media will flow directly between them
<--- Transmitting SIP request (922 bytes) to UDP:172.17.0.1:57846 --->
INVITE sip:mobile@172.17.0.1:57846 SIP/2.0
Via: SIP/2.0/UDP 192.168.12.101:5060;rport;branch=z9hG4bKPj991bbcd9-dcb8-424b-b364-48e70e8bafad
From: "softphone" <sip:softphone@172.17.0.2>;tag=7c53b704-62f9-48af-aaaa-68d4a297b88c
To: <sip:mobile@172.17.0.1>;tag=2718536061
Contact: <sip:asterisk@192.168.12.101:5060>
Call-ID: 51f6004b-0918-4d40-adc0-69a37683eaac
CSeq: 1166 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:   238

v=0
o=- 719225989 719225990 IN IP4 192.168.12.101
s=Asterisk
c=IN IP4 192.168.12.101
t=0 0
m=audio 4022 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP request (392 bytes) from UDP:172.17.0.1:56465 --->
ACK sip:192.168.12.101:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.12.101:63480;rport;branch=z9hG4bKPjbOSKVpBc8aFeK6.JigxSSJ6.DMakVkVp
Max-Forwards: 70
From: "softphone" <sip:softphone@192.168.12.101>;tag=jPPIoHYF1MqQQgiFVlt74NmzvuXgv.bU
To: <sip:mobile@192.168.12.101>;tag=9fc2f597-3f0d-4713-bbbe-c96790a326ea
Call-ID: irLJORPBUK1Chp5RLqFY9SK5f5HFfX0Y
CSeq: 32176 ACK
Content-Length:  0


<--- Transmitting SIP request (948 bytes) to UDP:172.17.0.1:56465 --->
INVITE sip:softphone@172.17.0.1:56465;ob SIP/2.0
Via: SIP/2.0/UDP 192.168.12.101:5060;rport;branch=z9hG4bKPj7f7e3c7f-53f4-4f54-a349-64359052d220
From: <sip:mobile@192.168.12.101>;tag=9fc2f597-3f0d-4713-bbbe-c96790a326ea
To: "softphone" <sip:softphone@192.168.12.101>;tag=jPPIoHYF1MqQQgiFVlt74NmzvuXgv.bU
Contact: <sip:192.168.12.101:5060>
Call-ID: irLJORPBUK1Chp5RLqFY9SK5f5HFfX0Y
CSeq: 4991 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:   241

v=0
o=- 3788197877 3788197880 IN IP4 192.168.12.101
s=Asterisk
c=IN IP4 192.168.12.101
t=0 0
m=audio 41194 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP response (656 bytes) from UDP:172.17.0.1:57846 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.12.101:5060;rport=5060;branch=z9hG4bKPj991bbcd9-dcb8-424b-b364-48e70e8bafad;received=192.168.12.101
From: "softphone" <sip:softphone@172.17.0.2>;tag=7c53b704-62f9-48af-aaaa-68d4a297b88c
To: <sip:mobile@172.17.0.1>;tag=2718536061
Call-ID: 51f6004b-0918-4d40-adc0-69a37683eaac
CSeq: 1166 INVITE
Contact: "mobile" <sip:mobile@172.17.0.1:57846;transport=udp>
Content-Type: application/sdp
Content-Length: 200

v=0
o=- 1579209076347 1579209081981 IN IP4 192.168.12.100
s=-
c=IN IP4 192.168.12.100
t=0 0
m=audio 41194 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16

       > 0x7f96940233b0 -- Strict RTP learning after remote address set to: 192.168.12.100:41194
<--- Transmitting SIP request (405 bytes) to UDP:172.17.0.1:57846 --->
ACK sip:mobile@172.17.0.1:57846 SIP/2.0
Via: SIP/2.0/UDP 192.168.12.101:5060;rport;branch=z9hG4bKPja259c592-0598-4720-93c2-7b4527557491
From: "softphone" <sip:softphone@172.17.0.2>;tag=7c53b704-62f9-48af-aaaa-68d4a297b88c
To: <sip:mobile@172.17.0.1>;tag=2718536061
Call-ID: 51f6004b-0918-4d40-adc0-69a37683eaac
CSeq: 1166 ACK
Max-Forwards: 70
User-Agent: Asterisk PBX 16.7.0
Content-Length:  0


<--- Received SIP response (909 bytes) from UDP:172.17.0.1:56465 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.12.101:5060;rport=5060;received=192.168.12.101;branch=z9hG4bKPj7f7e3c7f-53f4-4f54-a349-64359052d220
Call-ID: irLJORPBUK1Chp5RLqFY9SK5f5HFfX0Y
From: <sip:mobile@192.168.12.101>;tag=9fc2f597-3f0d-4713-bbbe-c96790a326ea
To: "softphone" <sip:softphone@192.168.12.101>;tag=jPPIoHYF1MqQQgiFVlt74NmzvuXgv.bU
CSeq: 4991 INVITE
Contact: "softphone" <sip:softphone@192.168.12.101:63480;ob>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Content-Type: application/sdp
Content-Length:   280

v=0
o=- 3788197877 3788197878 IN IP4 192.168.12.101
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4022 RTP/AVP 8 101
c=IN IP4 192.168.12.101
b=TIAS:64000
a=rtcp:4023 IN IP4 192.168.12.101
a=sendrecv
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16

       > 0x7f9694014d80 -- Strict RTP learning after remote address set to: 192.168.12.101:4022
<--- Transmitting SIP request (437 bytes) to UDP:172.17.0.1:56465 --->
ACK sip:softphone@172.17.0.1:56465;ob SIP/2.0
Via: SIP/2.0/UDP 192.168.12.101:5060;rport;branch=z9hG4bKPj0fc730fc-9798-4379-b6d1-bf75dba00d15
From: <sip:mobile@192.168.12.101>;tag=9fc2f597-3f0d-4713-bbbe-c96790a326ea
To: "softphone" <sip:softphone@192.168.12.101>;tag=jPPIoHYF1MqQQgiFVlt74NmzvuXgv.bU
Call-ID: irLJORPBUK1Chp5RLqFY9SK5f5HFfX0Y
CSeq: 4991 ACK
Max-Forwards: 70
User-Agent: Asterisk PBX 16.7.0
Content-Length:  0


<--- Received SIP request (379 bytes) from UDP:172.17.0.1:57846 --->
OPTIONS sip:192.168.12.101 SIP/2.0
Call-ID: 539f24109e0d1b6953c48fae214e28ed@192.168.12.100
CSeq: 1581 OPTIONS
From: "mobile" <sip:mobile@192.168.12.101>;tag=153936636
To: "mobile" <sip:mobile@192.168.12.101>
Via: SIP/2.0/UDP 192.168.12.100:48151;branch=z9hG4bKe1107dde8e7363491d155b39a6e98228363937;rport
Max-Forwards: 70
User-Agent: SIPAUA/0.1.001
Content-Length: 0


<--- Transmitting SIP response (575 bytes) to UDP:172.17.0.1:57846 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.12.100:48151;rport=57846;received=172.17.0.1;branch=z9hG4bKe1107dde8e7363491d155b39a6e98228363937
Call-ID: 539f24109e0d1b6953c48fae214e28ed@192.168.12.100
From: "mobile" <sip:mobile@192.168.12.101>;tag=153936636
To: "mobile" <sip:mobile@192.168.12.101>;tag=z9hG4bKe1107dde8e7363491d155b39a6e98228363937
CSeq: 1581 OPTIONS
WWW-Authenticate: Digest realm="asterisk",nonce="1579209085/6d794c530790d165345bad6c77e6e19c",opaque="1aeb99b701896855",algorithm=md5,qop="auth"
Server: Asterisk PBX 16.7.0
Content-Length:  0


<--- Received SIP request (419 bytes) from UDP:172.17.0.1:56465 --->
BYE sip:192.168.12.101:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.12.101:63480;rport;branch=z9hG4bKPjxVpl60YlpYpCkicq6OcD-cTz7uQOY8Sw
Max-Forwards: 70
From: "softphone" <sip:softphone@192.168.12.101>;tag=jPPIoHYF1MqQQgiFVlt74NmzvuXgv.bU
To: <sip:mobile@192.168.12.101>;tag=9fc2f597-3f0d-4713-bbbe-c96790a326ea
Call-ID: irLJORPBUK1Chp5RLqFY9SK5f5HFfX0Y
CSeq: 32177 BYE
User-Agent: Telephone 1.4
Content-Length:  0


<--- Transmitting SIP response (408 bytes) to UDP:172.17.0.1:56465 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.12.101:63480;rport=56465;received=172.17.0.1;branch=z9hG4bKPjxVpl60YlpYpCkicq6OcD-cTz7uQOY8Sw
Call-ID: irLJORPBUK1Chp5RLqFY9SK5f5HFfX0Y
From: "softphone" <sip:softphone@192.168.12.101>;tag=jPPIoHYF1MqQQgiFVlt74NmzvuXgv.bU
To: <sip:mobile@192.168.12.101>;tag=9fc2f597-3f0d-4713-bbbe-c96790a326ea
CSeq: 32177 BYE
Server: Asterisk PBX 16.7.0
Content-Length:  0


    -- Channel PJSIP/softphone-00000006 left 'native_rtp' basic-bridge <115cd5c3-aaf1-43d7-9db3-df6480ef9864>
    -- Channel PJSIP/mobile-00000007 left 'native_rtp' basic-bridge <115cd5c3-aaf1-43d7-9db3-df6480ef9864>
  == Spawn extension (internal, mobile, 1) exited non-zero on 'PJSIP/softphone-00000006'
    -- Executing [h@internal:1] Dial("PJSIP/softphone-00000006", "PJSIP/h") in new stack
    -- Caller hung up before dial.
  == Spawn extension (internal, h, 1) exited non-zero on 'PJSIP/softphone-00000006'
<--- Transmitting SIP request (923 bytes) to UDP:172.17.0.1:57846 --->
INVITE sip:mobile@172.17.0.1:57846 SIP/2.0
Via: SIP/2.0/UDP 192.168.12.101:5060;rport;branch=z9hG4bKPj85fa4e37-525b-45fb-9fc5-d4be9a17f784
From: "softphone" <sip:softphone@172.17.0.2>;tag=7c53b704-62f9-48af-aaaa-68d4a297b88c
To: <sip:mobile@172.17.0.1>;tag=2718536061
Contact: <sip:asterisk@192.168.12.101:5060>
Call-ID: 51f6004b-0918-4d40-adc0-69a37683eaac
CSeq: 1167 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

v=0
o=- 719225989 719225991 IN IP4 192.168.12.101
s=Asterisk
c=IN IP4 192.168.12.101
t=0 0
m=audio 11904 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP response (656 bytes) from UDP:172.17.0.1:57846 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.12.101:5060;rport=5060;branch=z9hG4bKPj85fa4e37-525b-45fb-9fc5-d4be9a17f784;received=192.168.12.101
From: "softphone" <sip:softphone@172.17.0.2>;tag=7c53b704-62f9-48af-aaaa-68d4a297b88c
To: <sip:mobile@172.17.0.1>;tag=2718536061
Call-ID: 51f6004b-0918-4d40-adc0-69a37683eaac
CSeq: 1167 INVITE
Contact: "mobile" <sip:mobile@172.17.0.1:57846;transport=udp>
Content-Type: application/sdp
Content-Length: 200

v=0
o=- 1579209076347 1579209084901 IN IP4 192.168.12.100
s=-
c=IN IP4 192.168.12.100
t=0 0
m=audio 41194 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16

<--- Transmitting SIP request (405 bytes) to UDP:172.17.0.1:57846 --->
ACK sip:mobile@172.17.0.1:57846 SIP/2.0
Via: SIP/2.0/UDP 192.168.12.101:5060;rport;branch=z9hG4bKPj77ed8977-129e-4e3c-8b66-fe8b1fdc9602
From: "softphone" <sip:softphone@172.17.0.2>;tag=7c53b704-62f9-48af-aaaa-68d4a297b88c
To: <sip:mobile@172.17.0.1>;tag=2718536061
Call-ID: 51f6004b-0918-4d40-adc0-69a37683eaac
CSeq: 1167 ACK
Max-Forwards: 70
User-Agent: Asterisk PBX 16.7.0
Content-Length:  0


<--- Transmitting SIP request (405 bytes) to UDP:172.17.0.1:57846 --->
BYE sip:mobile@172.17.0.1:57846 SIP/2.0
Via: SIP/2.0/UDP 192.168.12.101:5060;rport;branch=z9hG4bKPj58791f06-fdfb-469a-aadb-f0834a5f92d2
From: "softphone" <sip:softphone@172.17.0.2>;tag=7c53b704-62f9-48af-aaaa-68d4a297b88c
To: <sip:mobile@172.17.0.1>;tag=2718536061
Call-ID: 51f6004b-0918-4d40-adc0-69a37683eaac
CSeq: 1168 BYE
Max-Forwards: 70
User-Agent: Asterisk PBX 16.7.0
Content-Length:  0


<--- Received SIP response (357 bytes) from UDP:172.17.0.1:57846 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.12.101:5060;rport=5060;branch=z9hG4bKPj58791f06-fdfb-469a-aadb-f0834a5f92d2;received=192.168.12.101
From: "softphone" <sip:softphone@172.17.0.2>;tag=7c53b704-62f9-48af-aaaa-68d4a297b88c
To: <sip:mobile@172.17.0.1>;tag=2718536061
Call-ID: 51f6004b-0918-4d40-adc0-69a37683eaac
CSeq: 1168 BYE
Content-Length: 0```

Asterisk is a back to back user agent, not a sip proxy.

There are two calls in progress, one between your softphone and asterisk with a call ID of irLJORPBUK1Chp5RLqFY9SK5f5HFfX0Y , and second between asterisk and your mobile with a call ID of 51f6004b-0918-4d40-adc0-69a37683eaac

Is there in Asterisk parameters for edit his “From” header when he making a call to another sip endpoint which was initially called?

I want that header “From” in INVITE sending from Asterisk to mobile will have not private IP of Asterisk “172.17.0.2” but hist external address “192.168.12.101”.

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