> For the complete documentation index, see [llms.txt](https://prosbcdocs.telcobridges.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://prosbcdocs.telcobridges.com/use-cases/applications/sip-subscribe-notify-publish-forwarding.md).

# SIP subscribe notify publish forwarding

ProSBC forwards SIP Subscribe, Notify and Publish messages between users and registrars, following the same rules as SIP registration forwarding.

### SIP Subscribe overview

The SIP SUBSCRIBE method allows users to subscribe to various services, and get notified of events related to these services. Typical services (packages) that phones will register to are:

* Voice mail
* Presence
* Conference

Each user's device can register to various packages, then receive notifications for each of these packages (independently).

### SIP Subscribe/Publish forwarding

ProSBC will forward SUBSCRIBE or PUBLISH requests from users to Registrar (PBX)

<figure><img src="https://docs.telcobridges.com/w/images/thumb/5/5f/Subscribe_request_overview.png/700px-Subscribe_request_overview.png" alt="Bob&#x27;s phone sends SIP SUBSCRIBE to the SBC, which forwards it upstream to the SIP registrar or PBX."><figcaption></figcaption></figure>

<figure><img src="https://docs.telcobridges.com/w/images/thumb/5/54/Subscribe_response_overview.png/700px-Subscribe_response_overview.png" alt="SUBSCRIBE is acknowledged: 200 OK travels back from the registrar through the SBC to Bob&#x27;s phone."><figcaption></figcaption></figure>

### SIP Notify forwarding

ProSBC will forward NOTIFY requests from Registrar (PBX) back to users.

<figure><img src="https://docs.telcobridges.com/w/images/thumb/e/e8/Notify_request_overview.png/700px-Notify_request_overview.png" alt="The registrar sends NOTIFY downstream through the SBC to Bob&#x27;s phone."><figcaption></figcaption></figure>

<figure><img src="https://docs.telcobridges.com/w/images/thumb/a/a8/Notify_response_overview.png/700px-Notify_response_overview.png" alt="NOTIFY is acknowledged: 200 OK travels up from Bob&#x27;s phone through the SBC to the registrar."><figcaption></figcaption></figure>

<br>

### Contact remapping

When forwarding a SIP Subscribe message from a user to the registrar, ProSBC will remap the contact to make itself the contact. This way, the Registrar will send response messages and Notify events through ProSBC, and thus make sure to "hide" private network topology from users (avoid messages being sent directly from registrar to users).

Because the contact's domain is being remapped, ProSBC will also remap the contact's user name to make sure there is not user name conflict between two domains that would have the same user name.

<figure><img src="https://docs.telcobridges.com/w/images/thumb/0/04/Subscribe_topology_hiding.png/700px-Subscribe_topology_hiding.png" alt="Contact remapping: the SBC rewrites each contact to an alias at its own IP, so bob@abc.com and bob@telco.com become bob_ALIAS-1 and bob_ALIAS-2."><figcaption></figcaption></figure>

### SIP authorization

SIP authorization requests (401/407 Unauthorized) are forwarded from Registrar to users, allowing users to send the request again with appropriate credentials.\
ProSBC does not perform authorization by itself, only forwards between users and registrars.

### NAT traversal

* ProSBC handles SIP Subscribe NAT traversal to allow interaction between SIP User Agents from public and private networks.
  * ProSBC detects the actual IP from which users are sending messages, so responses and Notify messages can be forwarded properly, even in case users are unaware that they are behind a NAT

### Configuring

SIP Subscribe/Publish/Notify forwarding is automatically available when configuring SIP Domain for [SIP Registration forwarding](https://prosbcdocs.telcobridges.com/configuration-details/configuration-by-use-case/sip-registration-forwarding):

* [Creating a SIP domain](https://prosbcdocs.telcobridges.com/configuration-details/configuration-by-use-case/sip-registration-forwarding/creating-a-sip-domain)

### References

* [Understanding SIP Subscribe](https://andrewjprokop.wordpress.com/2015/03/11/a-deep-dive-into-sip-subscriptions/)
* [IANA SIP Event types](https://www.iana.org/assignments/sip-events/sip-events.xhtml)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://prosbcdocs.telcobridges.com/use-cases/applications/sip-subscribe-notify-publish-forwarding.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
