Does SIP RFC allows multiple endpoints registered to one account? - sip

Sorry, if this is a repeated question.
I am using FreeSwitch which uses Nokia Sofia SIP stack.
It allows me to register multiple endpoints using one user credentials.
e.g. I can log in using user id 1000 with multiple devices.
I want to know whether SIP RFC 3261 allows multiple endpoints registered to one account or not?
Update me about this.

RFC 3261 States - 10.2.1 Adding Bindings
Once a client has established bindings at a registrar, it MAY send
subsequent registrations containing new bindings or modifications to
existing bindings as necessary. The 2xx response to the REGISTER
request will contain, in a Contact header field, a complete list of
bindings that have been registered for this address-of-record at this
registrar.
These additional bindings allow users to register as many endpoints to their registration with the REGISTRAR.

Not sure about that specific RFC, but most VoIP providers allow to log in with the same account from multiple devices

Yes, RFC 3261 allows multiple endpoints registered to one account.
For instance, you can have three SIP phones, one running at work, one at home, and one on your smartphone.
Then you register all SIP phones using the same account, but with different Contact header addresses.
Each Contact can have a "q" parameter, which indicates a preference level.
So when a call arrives in PBX, it can send the INVITE to the most preferable contact (highest "q" parameter), and if this contact does not answer, the PBX can try the contact with the second highest "q" parameter, and so on.
RFC 3261: 10.2.1.2 Preferences among Contact Addresses
If more than one Contact is sent in a REGISTER request, the
registering UA intends to associate all of the URIs in these Contact
header field values with the address-of-record present in the To
field. This list can be prioritized with the "q" parameter in the
Contact header field. The "q" parameter indicates a relative
preference for the particular Contact header field value compared to
other bindings for this address-of-record.

Related

Can two Pagerduty services use the same email address?

I am setting up technical services in Pagerduty for a team and want all of them to use the same email integration, specifically, the same email address.
I see that I am allowed to associate the same email address to multiple technical services.
Is this the right thing to do? If not, what are the drawbacks?
A drawback to this is that you'll get an incident for all of those services that share the email. Depending on the size of your setup, this will cause a lot of noise for oncall.
If you want a single email, I'd suggest a global event rule or event orchestration. This products a single routing key and email but still allows you to use rules to route the incoming event to a specific service.
https://support.pagerduty.com/docs/rulesets#global-rulesets
https://support.pagerduty.com/docs/event-orchestration

Send DKIM - signed emails through third-party email service provider API?

This question is a follow-up question to this one.
The problem is that my current E-Mail provider does not natively support DKIM-signing, but I need that DKIM feature to make certain API integrations regarding my emails (like sending emails from my payment service provider through my own domain).
The solution I'm starting to see, as long as my host does not DKIM-sign their outgoing emails, is to watch out for an email providing service that allows you to send emails in the name of your own domain including the DKIM-signature feature. Does such a service exist, via API call? I've no experience whatsoever in this area, and would be happy to know if such a setup potentially has a bad influence on delivery rates / other problems.
If the mail server signs using your domain and not theirs, and you post the matching public key in your DNS, it will all work fine. You do need to find a provider that lets you do that though, which they may do via CNAME records. Such services will often allow you to configure what the mail server does with your messages using additional params in an HTTP API, or via custom headers over SMTP, e.g. it might allow you to set a header like:
Sign-with-selector: myselector
Recommendations for services are off-limits for SO though.

What is the difference in contact and from header?

Can anyone please clarify - if both, contact and from header, contains the address of originator of SIP INVITE request, then what is the difference between them?
From header is the logical identity of the user that will be used for auth/callerid (i.e. sip:alice#company.com). The Contact header is the TCP/IP network address where you should send all packets to (i.e. sip:alice#192.168.1.1:43085;transport=tcp) - IP/port/transport info. While it's not entirely accurate, this is a good way to think about it in most cases.
Contact header does not necessary contain address of originator, but lists URLs used to redirect future requests. It may be same as From, but doesn't have to. One common example is registration when SIP stacks (e.g. one used by Nokia E52 or re/baresip) are replacing user part with some unique identifier that helps distinguish following incoming requests.

In SIP, why the Contact header field MUST be present in the Invite request

Usually, the Contact header field in the Invite request is useless. For example, the UAC and the UAS are in different LANs. The Contact field may be:
INVITE sip:bob#sipprovider SIP/2.0
Contact: Alice<alice#192.168.1.10>
.....
There is no use of the Contact field while we can still build a dialog. Then, why the Contact header field is mandatory?
The Contact header says where you are (or rather, where your User Agent is), while the From header says who you are.
You might have several SIP devices all registered to the same Address of Record (the URI you put in the From header).
Further, REGISTER requests use Contact headers to maintain SIP's location service: they let a user agent update a registrar's location information.
(As an aside, if Alice calls Bob, the Contact header needs to be in a 2xx response so that Alice can route the 2xx's ACK to Bob. This points to DarkDust's comment about some SIP proxies mangling Contact headers: if it doesn't, you find yourself in the uncomfortable position of having a call that's only half established: Alice thinks the call's set up because she sent her ACK, but Bob never receives it. An alternative to a Contact-mangling Proxy is using a B2BUA as a network gateway; it wouldn't need to mangle the Contact header because the header would point to the B2BUA itself.)
In response to Phoenix Luo's comments, because of the shortcomings of using LAN IPs in a Contact header, RFC 5627 describes a solution - using globally routable user agent URIs
(GRUUs) in the Contact header/s.
The contact field contains the address at which the callee can reach the caller for future requests. For example, it's necessary so that the callee can send a BYE or a re-INVITE to the caller.

Can one REGISTER request contain multiple Contact Header Fields for a single URI present in To Header Field?

What will be the practical scenario when a UA will try to register multiple contact address against its SIP URI?
One SIP device can only register ONE COntact in one REGISTER message. However, if you support the SIP Outbound functions, one device sends at least TWO REGISTER requests over different IP flows, so the proxy has multiple contacts for the same device.
Now, SIP allows for multiple registrations for multiple devices and multiple registrations from the same device.
There's a new standard called GIN, that uses one REGISTER with one contact to register for multiple phone numbers. Still one contact only.
/O
There are many reasons. One might be this:
You have a main SIP device (your desk phone)
You have an answering service (your voicemail server)
You have a mobile SIP device (some handset or other)