> 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/telecom-references/sip-and-voip/toolpack-monitoring-sip-simulator-variables.md).

# Toolpack monitoring sip simulator variables

The [Toolpack SIP simulator](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/sip-voip/toolpack-monitoring-sip-simulator/README.md) is formatting the generated SIP messages based on a text-based configuration, which describes the SIP message content.

Well-known variables are used to define portion of the SIP messages that change from one call to the other.

### Example SIP message format

```
INVITE sip:#{called}@#{callee_sip_ip}:#{callee_sip_port} SIP/2.0
Call-ID:#{call_id}
X-Monitored-Sender:#{sender_label}:#{sender}
X-Isdn-Info:interface-id:#{isdn_interface_id};channel-number:#{isdn_channel_number}
X-Example-Var:#{example_var}
To:<sip:#{sip_to}>
From:#{calling_display}<sip:#{sip_from}>;tag=#{caller_tag}
Remote-Party-ID:#{calling_private_display}<sip:#{calling_private}@#{caller_sip_ip}:#{caller_sip_port}>;party=calling;screen=#{calling_screening};privacy=#{calling_presentation};noa=#{calling_noa}
Privacy:#{calling_privacy}
Contact:sip:#{calling}@#{caller_sip_ip}:#{caller_sip_port}
Via:SIP/2.0/UDP #{caller_sip_ip}:#{caller_sip_port};branch=#{branch};rport
User-to-User:#{uui};encoding=text;purpose=isdn-interwork;content=isdn-uui
Date:#{date}
Timestamp:#{timestamp}
CSeq:#{cseq}
Max-Forwards:70
```

1. {caller\_content}

To see other SIP messages default formatting, check in the [Toolpack SIP simulator](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/sip-voip/toolpack-monitoring-sip-simulator/README.md) configuration page in the Web Portal.

### Variables

All variables are referenced in the SIP messages definition by wrapping them inside **#{}**

For example: #{call\_id}

There are "well-known" variables, which value is dynamically replaced by the SIP simulator according to the context.

There are "user-defined" variables that can be inserted in the SIP messages.

#### Well-known variables

* **sip\_to** : The simulated SIP "from" address. Example 5551234\@10.1.2.3:5060. If present, called sub-address may be inserted too: 5551234\@10.1.2.3:5060;isub=31514;isub-encoding=nsap-bcd
* **called** : The called number, as decoded from the monitored call
* **called\_noa** : The called number NPI (Numbering Plan), as decoded from the monitored call
* **called\_npi** : The called number NPI (Numbering Plan), as decoded from the monitored call
* **sip\_from** : The simulated SIP "from" address. Example: 5551234\@10.1.2.3:5060, or <anonymous@anonymous.invalid> if privacy is enabled. If present, calling sub-address may be inserted too: 5551234\@10.1.2.3:5060;isub=31514;isub-encoding=nsap-bcd
* **sip\_from\_private** : The simulated SIP private address. Example: 5551234\@10.1.2.3:5060. If present, calling sub-address may be inserted too: 5551234\@10.1.2.3:5060;isub=31514;isub-encoding=nsap-bcd
* **calling** : The calling number (or "anonymous" if privacy is enabled), as decoded from the monitored call
* **calling\_noa** : The calling number NOA (Nature Of Address), as decoded from the monitored call
* **calling\_npi** : The calling number NPI (Numbering Plan), as decoded from the monitored call
* **calling\_display** : The calling number display string, as decoded from the monitored call
* **calling\_private** : The private calling number, as decoded from the monitored call
* **calling\_private\_display** : The private calling number display string (or simply calling number if no privacy is used), as decoded from the monitored call
* **calling\_privacy** : The "Privacy" header value ("id" or "none"), as decoded from the monitored call's "calling presentation"
* **calling\_presentation** : The calling number presentation, as decoded from the monitored call, converted SIP as "full", "uri", "name", or "off")
* **calling\_screening** : The calling number screening, as decoded from the monitored call, converted for SIP as "yes" or "no"
* **calling\_category** : The calling number category, as decoded from the monitored call, converted for SIP as "operator", "ordinary", "priority", "payphone"...
* **call\_id** : A generated SIP Call id, unique per call
* **uui** : The UUI (User-to-User Information), as decoded from the monitored call, convert for SIP in the escaped-text format
* **timestamp** : A precise timestamp (Synchronized on TDM, in milliseconds since Epoch) indicating when the monitored message that corresponds to this SIP packet was received
* **date** : Date/time, in a standard SIP format, that corresponds to the timestamp indicating when the monitored message that corresponds to this SIP packet was received. Example: "Thu, 21 Apr 2010 14:12:51 GMT"
* **sender\_label** : The "label" of sender of the monitored message that corresponds to this SIP packet (the "label" is provided in the Analyzer's configuration)
* **sender** : The sender of the monitored message that corresponds to this SIP packet (trunk:timeslot from which the message was received)
* **isdn\_interface\_id** : The ISDN interface id of the corresponding monitored ISDN call (if actually monitoring an ISDN call)
* **isdn\_channel\_number** : The ISDN channel number of the corresponding monitored ISDN call (if actually monitoring an ISDN call)
* **cseq** : A generated SIP sequence number, incremented appropriately
* **branch** : A generated "branch" parameter for the "Via" header
* **q850\_cause** : The Q.850 termination cause of the call, as decoded from the monitored call
* **sip\_cause** : The SIP termination cause of the call (derived from Q850 termination cause when appropriate)
* **caller\_sip\_ip** : The simulated SIP IP address assigned to Caller (either IP assigned to first or second side by configuration, depending on the call direction)
* **caller\_sip\_port** : The simulated SIP port assigned to Caller side (either IP assigned to first or second side by configuration, depending on the call direction)
* **caller\_media\_ip** : The local RTP IP address used by the caller side (as defined by the "IP Interface" that owns the "port range" that is assigned to the "VOIP-media" NAP that is assigned to the SIP Simulator's corresponding side)
* **caller\_media\_port** : The RTP port assigned to this port (as chosen among avaialble ports in the "port range" that is assigned to the "VOIP-media" NAP that is assigned to the SIP Simulator's corresponding side)
* **caller\_tag** : A generated SIP "tag" for the Caller side
* **caller\_content** : The generated caller side "Content-Length", "Content-Type" headers, and the SIP body: SDP and/or Raw Q.921 payload when appropriate
* **callee\_sip\_ip** : The simulated SIP IP address assigned to Callee (either IP assigned to first or second side by configuration, depending on the call direction)
* **callee\_sip\_port** : The simulated SIP port assigned to Callee side (either IP assigned to first or second side by configuration, depending on the call direction)
* **callee\_media\_ip** : The local RTP IP address used by the callee side (as defined by the "IP Interface" that owns the "port range" that is assigned to the "VOIP-media" NAP that is assigned to the SIP Simulator's corresponding side)
* **callee\_media\_port** : The RTP port assigned to this port (as chosen among avaialble ports in the "port range" that is assigned to the "VOIP-media" NAP that is assigned to the SIP Simulator's corresponding side)
* **callee\_tag** : A generated SIP "tag" for the Callee side
* **callee\_content** : The generated callee side "Content-Length", "Content-Type" headers, and the SIP body: SDP and/or Raw Q.921 payload when appropriate
* **multipart\_boundary** : A generated SIP multipart body boundary that is used when the SIP body contains multiple parts (when both SDP and Raw Q.921 payload are present)

#### User-defined variables

The "SIP Simulator" configuration includes a list of user-defined variables, in the form "name=value". For example: my\_var\_1 = My first value my\_var\_2 = Hello world!

These variables can be used in the SIP messages format definition.

For example, a custom SIP header may be inserted, with the content of "my\_var\_1": X-Example-Var:#{my\_var\_1} Ths SIP message would be generated as: X-Example-Var:My first value


---

# 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/telecom-references/sip-and-voip/toolpack-monitoring-sip-simulator-variables.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.
