Iñaki Baz Castillo writes:
When anyone in PSTN world calls to +34999000222 the call will arrive to the OpenSer from a gateway in an INVITE like:
INVITE sip:+34999000222@gateway SIP/2.0 To: sip:+34999000222@gateway
why gateway in the host part? isn't host more likely the ip or hostname of your proxy?
The info about the called PSTN number is just available in "To" header, so a way to get different behaviour for each associated PSTN number is matching "To" URI. Is common to do it? which other alternatives are there?
your proxy could add other headers to the invite, such as diversion or history-info, if your sip ua knows to look for them.
-- juha