I’m currently migrating from chan_sip to PJSIP and I want to support making anonymous calls.
in chan_sip, I solved this by setting the “anonymous” feature at the endpoints natively. For some clients, this resulted in just adding the SIP header “Privacy:id” which I could just add to the new call when creating the outbound call via my SIP provider.
My Snom 370 devices have a slight different behaviour when setting anonymous calling: they set “From:” header to anonymous, which results in the fact that PSJIP isn’t able to match the phone to an endpoint:
Request 'INVITE' from '"Anonymous" <sip:email@example.com>' failed for '192.168.... - No matching endpoint found
In chan_sip this worked well, it looks like chan_sip went through active peers and found the right phone:
Found peer 'snom17' for 'anonymous' from 192.168....
I think the easiest way would be to bind the endpoint to the IP address, right?
But would it be possible to let PJSIP look for the SIP "Contact: "-header? While From is set to anymous, via "Contact: ", the snom still provides all information.