Asterisk 13.1.0/PJSIP peer IP address issue

I am following the instructions in … ctionality and I am trying to make a call from extension Alice (6001) to extension for Bob (6002). When I make the call, I can hear the ringing on Alice’s phone, but Bob’s phone doesn’t ring, or show a call coming in from Alice. My setup and environment is as follows: Alice, Bob and Asterisk all in the same network, and they are able to register to the Asterisk server running 13.1.0/PJSIP. The rest of the configuration is the same as the aforementioned wiki page.

What I do observe is that I when I request the output of pjsip show endpoints, I get Contact information for the two SIP peers that have registered different from their actual IP addresses. I suspect this has something to do with their calls being routed elsewhere. If my assumption is correct–how do I fix this? Alice should be at and Bob should be at, instead, they show IP address Any help is deeply appreciated. Thanks.

[code]asterisk13FFP*CLI> pjsip show endpoints

Endpoint: <Endpoint/CID…> <State…> <Channels.>
I/OAuth: <AuthId/UserName…>
Aor: <Aor…>
Contact: <Aor/ContactUri…> <Status…> <RTT(ms)…>
Transport: <TransportId…> <BindAddress…>
Identify: <Identify/Endpoint…>
Match: <ip/cidr…>
Channel: <ChannelId…> <State…> <Time(sec)>
Exten: <DialedExten…> CLCID: <ConnectedLineCID…>

Endpoint: demo-alice Unavailable 0 of inf
InAuth: demo-alice/demo-alice
Aor: demo-alice 1
Contact: demo-alice/sip:demo-alice@ Unknown nan

Endpoint: demo-bob Not in use 0 of inf
InAuth: demo-bob/demo-bob
Aor: demo-bob 1
Contact: demo-bob/sip:demo-bob@;tra Unknown nan


I set rewrite_contact=yes for both contacts, and I also had to do remove_existing=yes because I had to remove the existing contact information (max_contacts = 1 was preventing new contact information) using pjsip qualify demo-alice etc., after which the right IP addresses showed in pjsip show endpoints. Anyway, it works as expected now, but no media after the callee picks up the phone.