Configuring a New Transaction Policy
New transaction policies control how requests related to new transactions are handled. A new transaction event is raised when a new SIP request message, such as an INVITE, either opens a new dialog or is not related to any dialog. If the event does not match a new transaction policy, the BSG rejects the SIP request and returns a 403 (forbidden) message.
You can take the following actions on requests that match conditions in new transaction policies: accept, reject, or trace traffic; route SIP requests; apply call admission control (CAC). Using new transaction policies to route SIP requests or to apply CAC is described separately, see Using New Transaction Policies to Route SIP Requests (next-hop).
To configure a new transaction policy:
- Create a new transaction policy, and assign it
a name.[edit services border-signaling-gateway gateway bsg-1 sip]user@host# edit new-transaction-policy peer-to-core
- Configure a term for the policy.[edit services border-signaling-gateway gateway bsg-1 sip new-transaction-policy peer-to-core]user@host# edit term block_presence
- Configure match conditions for the contact
URI, request URI, or both.[edit services border-signaling-gateway gateway bsg sip new-transaction-policy peer-to-core term block_presence]user@host# set contact regular-expression .*.juniper.net registration-state registereduser@host# set request-uri uri-hiding not-hidden
If you have multiple values for the same field in a from clause, there is an OR function between the values. In this case, the term must match one of the defined method values.
- Configure SIP method match conditions by providing a set statement for each acceptable method.
- Configure actions to be taken on messages
that match the term conditions. For example:[edit services border-signaling-gateway gateway bsg-1 sip new-transaction-policy peer-to-core term block_presence]user@host# set then reject