1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282
|
sipt Module
Torrey Searle
Voxbone SA
<torrey@voxbone.com>
Copyright © 2013 Voxbone SA
__________________________________________________________________
Table of Contents
1. Admin Guide
1. Overview
2. Dependencies
3. Functions
3.1. sipt_destination(destination, hops, nai)
3.2. sipt_set_calling(origin, nai, presentation, screening)
4. Exported pseudo-variables
4.1. $sipt(calling_party_number.presentation) /
$sipt_presentation
4.2. $sipt(calling_party_number.screening) / $sipt_screening
4.3. $sipt(hop_counter) / $sipt_hop_counter
4.4. $sipt(calling_party_category) / $sipt(cpc) / $sipt_cpc
4.5. $sipt(calling_party_number.nature_of_address) /
$sipt.(calling_party_number.nai) /
$sipt_calling_party_nai
4.6. $sipt(called_party_number.nature_of_address) /
$sipt(called_party_number.nai) /
$sipt_called_party_nai
4.7. $sipt(event_info)
List of Tables
1.1. Address Presentation Restricted Indicator Values
1.2. Screening Indicator Values
1.3. Calling Nature of Address Values
1.4. Called Nature of Address Values
1.5. Event Info Values
List of Examples
1.1. sipt_destination(destination, hops, nai) usage
1.2. sipt_set_calling(origin, nai, presentation, screening) usage
1.3. sipt_presentation pseudo-variable usage
1.4. sipt_screening pseudo-variable usage
1.5. sipt_hop_counter pseudo-variable usage
1.6. sipt_cpc pseudo-variable usage
1.7. sipt_calling_party_nai pseudo-variable usage
1.8. sipt_called_party_nai pseudo-variable usage
Chapter 1. Admin Guide
Table of Contents
1. Overview
2. Dependencies
3. Functions
3.1. sipt_destination(destination, hops, nai)
3.2. sipt_set_calling(origin, nai, presentation, screening)
4. Exported pseudo-variables
4.1. $sipt(calling_party_number.presentation) / $sipt_presentation
4.2. $sipt(calling_party_number.screening) / $sipt_screening
4.3. $sipt(hop_counter) / $sipt_hop_counter
4.4. $sipt(calling_party_category) / $sipt(cpc) / $sipt_cpc
4.5. $sipt(calling_party_number.nature_of_address) /
$sipt.(calling_party_number.nai) / $sipt_calling_party_nai
4.6. $sipt(called_party_number.nature_of_address) /
$sipt(called_party_number.nai) / $sipt_called_party_nai
4.7. $sipt(event_info)
1. Overview
Module for updating ISUP encapuslated in SIP (SIP-T/SIP-I)
The sipt module can be used to update various ss7 headers contained
inside a message.
2. Dependencies
The module depends on the following modules (in the other words the
listed modules must be loaded before this module):
* none
3. Functions
3.1. sipt_destination(destination, hops, nai)
3.2. sipt_set_calling(origin, nai, presentation, screening)
3.1. sipt_destination(destination, hops, nai)
updates the IAM in the body if it exists, setting the called party
number to “destination” with the nature address specified in “nai” and
decrementing the hop counter value if present. If the hop counter
header is missing it will be added with the value of “hops”.
Example 1.1. sipt_destination(destination, hops, nai) usage
...
# update the destination number to our current request uri,
# setting nature of address to international
$rU = "19495551234";
sipt_destination($rU, 31, 4);
...
3.2. sipt_set_calling(origin, nai, presentation, screening)
updates the IAM in the body if it exists, setting (or adding) the
calling party number to “origin” with the nature address specified in
“nai” and setting the presentation and screening values to
“presentation” and “screening”.
Example 1.2. sipt_set_calling(origin, nai, presentation, screening)
usage
...
# update the calling party to the value in the from header
sipt_set_calling($fU, 4, 0, 3);
...
4. Exported pseudo-variables
4.1. $sipt(calling_party_number.presentation) / $sipt_presentation
4.2. $sipt(calling_party_number.screening) / $sipt_screening
4.3. $sipt(hop_counter) / $sipt_hop_counter
4.4. $sipt(calling_party_category) / $sipt(cpc) / $sipt_cpc
4.5. $sipt(calling_party_number.nature_of_address) /
$sipt.(calling_party_number.nai) / $sipt_calling_party_nai
4.6. $sipt(called_party_number.nature_of_address) /
$sipt(called_party_number.nai) / $sipt_called_party_nai
4.7. $sipt(event_info)
4.1. $sipt(calling_party_number.presentation) / $sipt_presentation
Returns the value of the Address presentation restricted indicator
contained in the Calling Party Number header of the IAM message if it
exists. Returns -1 if there isn't a Calling Party Number header.
Table 1.1. Address Presentation Restricted Indicator Values
0 presentation allowed
1 presentation restricted
2 address not avail (national use)
3 spare
Example 1.3. sipt_presentation pseudo-variable usage
...
# add privacy header if restriction is requested
if($sipt(calling_party_number.presentation) == 1)
{
append_hf("Privacy: id\r\n");
$fn = "Anonymous";
}
...
4.2. $sipt(calling_party_number.screening) / $sipt_screening
Returns the value of the Screening Indicator contained in the Calling
Party Number header of the IAM message if it exists. Returns -1 if
there isn't a Calling Party Number header.
Table 1.2. Screening Indicator Values
0 Reserved (user provided, not verified)
1 User Provided, Verified and Passed
2 Reserved (user provided, verified and failed)
3 Network provided
Example 1.4. sipt_screening pseudo-variable usage
...
# remove P-Asserted-Identity header if the screening isn't verified
# or network provided
$avp(s:screening) = $sipt(calling_party_number.screening);
if($avp(s:screening) != 1 && $avp(s:screening) != 3)
{
remove_hf("P-Asserted-Id");
}
...
4.3. $sipt(hop_counter) / $sipt_hop_counter
Returns the value of the Hop Counter for the IAM message if it exists.
Returns -1 if there isn't a hop counter.
Example 1.5. sipt_hop_counter pseudo-variable usage
...
# get the hop counter and update the Max-Forwards header if it exists
$avp(s:hop) = $sipt(hop_counter);
if($avp(s:hop) > 0)
{
remove_hf("Max-Forwards");
append_hf("Max-Forwards: $avp(s:hop)\r\n");
}
...
4.4. $sipt(calling_party_category) / $sipt(cpc) / $sipt_cpc
Returns the value of the Calling Party Category for the IAM message.
Returns -1 if there is a parsing error.
Example 1.6. sipt_cpc pseudo-variable usage
...
# get the Cpc code and set put it in a custom sip header
append_hf("X-CPC: $sipt(cpc)\r\n");
...
4.5. $sipt(calling_party_number.nature_of_address) /
$sipt.(calling_party_number.nai) / $sipt_calling_party_nai
Returns the value of the Nature of Address Indicator of the Calling
Party for the IAM message. Returns -1 if there is a parsing error or if
the Calling Party Number is not present.
Table 1.3. Calling Nature of Address Values
0 Spare
1 Subscriber Number (national use)
2 Unknown (national use)
3 National (significant) number (national use)
4 International use
Example 1.7. sipt_calling_party_nai pseudo-variable usage
...
# get the Calling Nai and add country code if national
if($sipt(calling_party_number.nai) == 3)
{
$fU = "32" + "$fU";
}
...
4.6. $sipt(called_party_number.nature_of_address) /
$sipt(called_party_number.nai) / $sipt_called_party_nai
Returns the value of the Nature of Address Indicator of the Called
Party for the IAM message. Returns -1 if there is a parsing error.
Table 1.4. Called Nature of Address Values
0 Spare
1 Subscriber Number (national use)
2 Unknown (national use)
3 National (significant) number
4 International use
5 Network-specific number (national use)
Example 1.8. sipt_called_party_nai pseudo-variable usage
...
# get the Called Nai and add country code if national
if($sipt(called_party_number.nai) == 3)
{
$rU = "32" + "$rU";
}
...
4.7. $sipt(event_info)
Returns the value of the Event Info header of the CPG message. Returns
-1 if there is a parsing error.
Table 1.5. Event Info Values
0 Spare
1 ALERTING
2 PROGRESS
3 In-band information or an appropriate pattern is now available
4 Call forward on busy
5 Call forward on no reply
6 Call forward unconditional
|