I recently ran into the problem that one could not use the call log of some phones to call back.
All external numbers are in E.164 format (+49…) and the PJSIP stack uses the external IP to form the INVITE URI, like
<— Received SIP request (1250 bytes) from TCP:126.96.36.199:5060 —>
INVITE sip:+email@example.com:5060;transport=TCP;line=yittgix SIP/2.0
This URI also gets stored exactly this way in some phones when handed over to local phones. Snom phones store it so, but Yealink or Fanvil do not seem to do it this way. Using the call log subsequent calls from Snom phones fail, but not from the other ones.
It seems that at least Snom phones interpret a URI like sip:+firstname.lastname@example.org:5060 as a routable SIP-URI and contact the router (as shown by pcap traces) instead of the PBX. My current patch is to explicitly set the P-Asserted-Identity header with the IP of the PBX, as this is what seems to get used by the Snom phones.
Is that an issue one should generally be aware of, or is this only a very special case?
The other question is whether there is a more elegant way to deal with this.