SIP provider dialed number

Hello all! I have a question. In my system we use a series of VoIP providers to receive external calls to our telephone numbers, for the same provider we have several registered numbers and we need our providers to send that information in some way, so far it does not seem that there is a common way to do it (report the number that was dialed by the person who made the call). From what I understand, SIP does not have a place for that information because there are no things like phone numbers in the specification, my question is, is there a correct place to send such information, or is it entirely up to each provider? I have seen a couple of options that seem to me the most “correct”: send the information in the To header or send in a custom header.

I really appreciate any help you can provide.

The correct place to send it is in the request URI, as SIP does have a place but assumes that if you user REGISTER your are the final destination, which does not match the commercial reality as far as small business users are concerned.

It is quite common to use the To header for this, to the extent that FreePBX has a pre-defined incoming context to handle that case.

However it seems not too uncommon for providers to misuse headers. Although probably more common outgoing (PAI and Contact are sometimes misused to represent account information), I think I’ve also seen people misusing headers inbound, as well.

Right, from what I know, the Request URI that arrives to my system should contain the information that I sent in the Contact header when I sent the Register. That implies that the correct thing to do is send a Register by every number that I have contracted with a said provider, is that it?

The way that SIP was designed to work is that the domain part identifies the general destination (more accurately a naming authority) and the user part defines the precise destination, or if you use TEL: URIs, the phone number indicates the destination.

Your issue arises because the bottom end of the market uses a mechanism intended to register a single final destination, to actually register to receive many numbers. The clean way of doing this, often caused IP authentication, is for you to register your IP address, offline, with the provider, and they send you requests as TEL:, or with the phone number in the user part. However, this is more of an upmarket service (for one thing down market providers are probably more interested in individual phones than PABXes.

Having multiple registrations from the same address can cause confusion, so, that is generally not a good solution. If issues like NAT, and particularly NAT with unstable addresses, get in the way, sending the dialled number in the To header is probably the best compromise.

I understood. Thank you, I appreciate the detailed explanation. Clearly, I must review my concepts.