Project

General

Profile

Provisioning guide » History » Version 2

Tijmen de Mes, 10/11/2012 03:53 PM

1 1 Tijmen de Mes
h1. Provisioning guide
2
3 2 Tijmen de Mes
Provisioning of Multimedia Service Platform is performed by the NGNPro SOAP/XML provisioning server. To access the server you need a SOAP/XML client, either the web front-end that comes standard with the platform or one developed by the operator using the supplied SOAP/XML schema.
4 1 Tijmen de Mes
5
bq. The examples and screenshots presented in this document have been taken using AG Project developed NGNPro client part of CDRTool application and may differ from the actual deployment of each customer. Access to the hosted version of Multimedia Service Platform also exposes less functionality, some functions are only available to administrator account and not available to resellers.
6
7
8
9
It is the responsibility of the operator to build a web interface that talks to the SOAP/XML interface. The sample code provided with CDRTool application is merely an example for how to access the API and should not be used in production by customers.
10
11
h2. NGNPro Server
12
13
NGNPro server software provides a SOAP/XML provisioning interface that allows for the management of accounts along with all their auxiliary settings.
14
15
Using NGNPro SOAP/XML interface the Operator may build new front-ends or adapt the existing CRM, provisioning or support systems to the Multimedia Service Platform, making the integration easy and effective. SOAP/XML is an industry standard for which there are implementations available in almost any programming language (like C, Java, PHP and Python) and it can be used by web developers to create customized web portals for the Operator or its resellers without bothering with the complexity of the platform setup and the database schemas sitting behind.
16
17
The SOAP/XML provisioning API is described at:
18
19
"https://mdns.sipthor.net/ngnpro/wsdl":https://mdns.sipthor.net/ngnpro/wsdl
20
21
h3. SOAP/XML API
22
23
# SIP domain management (adding, removing and querying domains)
24
# SIP account management (adding, updating, deleting and getting a SIP account)
25
# SIP aliases (adding, deleting and getting SIP aliases for a given SIP account)
26
# Group membership management (granting, revoking or listing group membership)
27
# Voicemail account (adding, updating, removing or getting a voicemail account)
28
# Call diversions (setting or getting the diversions for a given user)
29
# Retrieving call information for a certain user (missed, placed, received calls)
30
# Retrieving the registered phones one user has (getting the user locations info)
31
# ENUM management (adding, removing and getting the ENUM mappings)
32
# LCR management (adding, removing and getting the PSTN routes and gateways)
33
34
"!/raw-attachment/wiki/ProvisioningGuide/NGNPro-Datatree.png!":/attachment/wiki/ProvisioningGuide/NGNPro-Datatree.png
35
36
h2. NGNPro Clients
37
38
Multimedia Service Platform comes with a fully featured provisioning client, which is part of CDRTool web application. The Operator may also chose to develop his own web portals to interface with Multimedia Service Platform by using the provided SOAP/XML schema.
39
40
h3. Python Client
41
42
To help the development of a custom client an "wsdl.tar.gz":/attachment/wiki/ProvisioningGuide/wsdl.tar.gz "!/chrome/common/download.png(Download)!":/raw-attachment/wiki/ProvisioningGuide/wsdl.tar.gz archive with the file WSDL.py file is available. It is a modified version of the same file from the SOAPpy project. Th file was modified to support authentication and multiple ports. You will need the SOAPpy library version 0.12.0 and the files from the archive in your current directory.
43
44
Usage is simple and described in the WSDL.Proxy class docstring. In addition to what is mentioned there, you need to also specify the auth argument, which is a dictionary like:
45
46
bc(wiki). dict(username='myusername', password='mypassword')
47
48
49
The Proxy, will load the WSDL and add the methods from the specified port in the WSDL on the fly to the proxy instance that is created when you instantiate Proxy(). After the creation you can call the port methods directly on the proxy, so no code generation is needed. You can discover the available methods using inspection on the proxy instance as with any other python object. You pass simple data structures (strings, ints, lists, dicts), that are automatically converted to the appropriate SOAP types.
50
51
Inside the archive you'll also find a short example of how to use it in ngnpro_test.py
52
53
h3. PHP Client
54
55
To use this example code you must install SOAP library for PEAR project.
56
57
Generate the library with:
58
59
bc(wiki). #!/usr/bin/php
60
<?
61
require_once('SOAP/WSDL.php');
62
$wsdl       = new SOAP_WSDL('https://mdns.sipthor.net/ngnpro/wsdl');
63
print "<?\n";
64
print $wsdl->generateAllProxies();
65
print "?>\n";
66
?>
67
68
69
You will end up with a file containing all client functions, attached is an example of the generated file for NGNPro version 4.3.5 "ngnpro&#95;soap&#95;lib.php":/attachment/wiki/ProvisioningGuide/ngnpro_soap_lib.php "!/chrome/common/download.png(Download)!":/raw-attachment/wiki/ProvisioningGuide/ngnpro_soap_lib.php
70
71
The script "sip&#95;add&#95;account.php":/attachment/wiki/ProvisioningGuide/sip_add_account.php "!/chrome/common/download.png(Download)!":/raw-attachment/wiki/ProvisioningGuide/sip_add_account.php shows how you can use this library to create SIP accounts by using the PHP library.
72
73
h3. Server Location
74
75
NGNPro is reachable on the following URLs, which were configured during the setup phase of the platform:
76
77
78
|Platform|Protocol|Port|Location|SOAP ports|
79
|Collocated Multimedia Service Platform|TLS|443|"https://cdr.example.com/ngnpro":https://cdr.example.com/ngnpro|all ports except Voicemail port|
80
|Collocated Multimedia Service Platform|TLS|443|"https://cdr.example.com/ngnpro/voicemail":https://cdr.example.com/ngnpro/voicemail|Voicemail port|
81
|Collocated Multimedia Service Platform|TCP|9200|"http://sip.example.com:9200":http://sip.example.com:9200|all ports except Voicemail port|
82
|Collocated Multimedia Service Platform|TCP|9200|"http://vm.example.com:9200":http://vm.example.com:9200|Voicemail port|
83
|Collocated SIP Thor Platform|TLS|9200|"https://ngnpro.example.com:9200":https://ngnpro.example.com:9200|All ports|
84
85
86
h3. Test Server
87
88
You can test your provisioning client against the live platform hosted by AG Projects.
89
90
91
|Platform|Protocol|Port|Location|SOAP ports|
92
|Hosted AG Projects platform|TLS|443|"https://mdns.sipthor.net/ngnpro":https://mdns.sipthor.net/ngnpro|All ports|
93
94
95
The credentials for accessing the test server are the same as the login account used for accessing AG Projects support web page.
96
97
h3. SOAP/XML Authentication
98
99
SOAP/XML requests must contain valid authentication header with credentials in the form of a combination of username, password and impersonate attributes. There are two types of SOAP credentials to access the server:
100
101
* Administrator level. The server has an administrator account configured in the server configuration file, /etc/ngnpro/config.ini, that can be used to perform all functions without restrictions. Set the *impersonate* attribute of the SOAP authentication header to a valid customer of the system to perform actions in behalf of that customer.
102
* Customer level. Access a partition of the data provisioned into the platform. The customers table, managed using the SOAP/XML CustomerPort, is used as a login database for authenticating and authorizing the SOAP/XML requests. First use the administrator level account to add a customer. When the combination of username/password in the SOAP authentication header matches an entry in the customers table, all actions will be performed in behalf of that customer. This means that any record created will inherit the customer id of the customer and any modification will be checked for ownership before being committed. This allows reseller to have limited access to the platform based on rights assigned to them by the system administrator.
103
104
For more information about the *Customer* concept read below.
105
106
h2. Customer
107
108
Customers are entities created in the platform to store names, address, billing and other information. Customers can also have arbitrary attribute/value pairs stored in the properties attribute.
109
110
Each customer is assigned, during creation by the server, a unique id and a reseller id.
111
112
h3. Record Assignment
113
114
The customer id can be used for assignment of SIP domains, ENUM ranges and DNS zones. The assignment is done by setting the customer id attributes of the record in question.
115
116
All SIP accounts inherit the customer id from their parent SIP domain. For example a SIP domain that has customer and reseller attributes set cause all SIP accounts created under this domain to share the same customer and reseller too (because the SIP account always belong to a SIP domain). Same concept works for the ENUM numbers (they belong to ENUM ranges) and DNS records (they belong to DNS zones).
117
118
Before deleting a customer, make sure that no records belong to his id.
119
120
h2. Reseller
121
122
The reseller has the role of grouping multiple customers together. The concept is similar to how the users in a Unix system work, where each user has a unique id and a group id. As opposed to the Unix model, a customer can belong to a single reseller. Customers having their id equal to the reseller&#95;id are referred as resellers. Also customers that have the impersonate attribute set to the reseller id have the same right as their reseller.
123
124
If a reseller is not specified during the creation of a new customer entry, a new reseller id equal to the customer id will be assigned, in fact creating a new Reseller in the system. Only provisioning requests made with admin rights can add a reseller into the system.
125
126
h3. Conventions for resellers
127
128
A customer that is a reseller (the customer id is equal to reseller id) is allowed to create other customers and records in the platform if the *resellerActive* attribute of the customer is set to true.
129
130
The number of records each reseller is allowed to provision into the platform is controlled by some special properties belonging to the reseller. These special properties are: sip&#95;credit, sip&#95;alias&#95;credit, enum&#95;range&#95;credit, enum&#95;number&#95;credit, dns&#95;zone&#95;credit, email&#95;credit
131
132
The same credit convention is valid for customers belonging to a reseller. Each customer may create records within their own credit. The total of all records created by all customers may not exceed the credit of the reseller. The server checks during creation of each record if the quota has not been exceeded.
133
134
The following properties controls if the reseller or customer has access to enable access to PSTN for the SIP accounts:
135
136
* pstn&#95;access (can create SIP accounts with PSTN prepaid access)
137
* prepaid&#95;changes (can toggle a SIP account from prepaid to postpaid and vice versa)
138
139
On CDRTool, to create an account that has access to the records belonging to a specific customer set the Impersonate field of the CDRTool login account to *customer&#95;id.reseller&#95;id*.
140
141
h3. Conventions for the properties
142
143
As mentioned before, each customer can have a list of attributed/value pairs attached to them in the properties attribute, this allowing for storage of arbitrary data with each customer. Each attribute has a field called permission. The following rules apply:
144
145
* Properties having permission set to admin can be modified only by the administrator
146
* Properties having permission set to reseller can be modified by the administrator and their reseller
147
* Properties having other permission can be modified by their customer, their reseller or by the administrator
148
149
If the SIP domain of a SIP account belongs to a customer (the customer&#95;id != 0), the pstn&#95;access and prepaid&#95;access properties can be enabled only if the corespondent reseller has these properties set to 1.
150
151
h2. Owner
152
153
At SIP account, SIP alias and ENUM number level another attribute called owner exists. Owner attribute can be used to assign or group individual records like SIP accounts and ENUM numbers to customers in the customer table. For example one customer can have multiple SIP accounts and ENUM numbers if their owner field are set to his customer id.
154
155
h3. SOAP/XML functions
156
157
* CustomerPort-&gt;addAccount()
158
* CustomerPort-&gt;updateAccount()
159
* CustomerPort-&gt;deleteAccount()
160
* CustomerPort-&gt;getAccount()
161
* CustomerPort-&gt;getCustomers()
162
* CustomerPort-&gt;getResellers()
163
* CustomerPort-&gt;setProperties()
164
* CustomerPort-&gt;getProperties()
165
166
Customer attributes:
167
168
bc(wiki). <complexType name="CustomerAccount">
169
170
<sequence>
171
<element name="id" nillable="true" type="xsd:integer"/>
172
<element name="reseller" nillable="true" type="xsd:integer"/>
173
<element name="impersonate" nillable="true" type="xsd:integer"/>
174
<element name="username" nillable="true" type="xsd:string"/>
175
<element name="password" nillable="true" type="xsd:string"/>
176
<element name="firstName" nillable="true" type="xsd:string"/>
177
<element name="lastName" nillable="true" type="xsd:string"/>
178
<element name="organization" nillable="true" type="xsd:string"/>
179
<element name="vatNumber" nillable="true" type="xsd:string"/>
180
<element name="email" nillable="true" type="xsd:string"/>
181
<element name="web" nillable="true" type="xsd:string"/>
182
<element name="tel" nillable="true" type="xsd:string"/>
183
<element name="fax" nillable="true" type="xsd:string"/>
184
<element name="mobile" nillable="true" type="xsd:string"/>
185
<element name="sip" nillable="true" type="xsd:string"/>
186
<element name="enum" nillable="true" type="xsd:string"/>
187
<element name="address" nillable="true" type="xsd:string"/>
188
<element name="postcode" nillable="true" type="xsd:string"/>
189
<element name="city" nillable="true" type="xsd:string"/>
190
<element name="state" nillable="true" type="xsd:string"/>
191
<element name="country" nillable="true" type="xsd:string"/>
192
<element name="timezone" nillable="true" type="xsd:string"/>
193
<element name="language" nillable="true" type="xsd:string"/>
194
<element name="bankAccount" nillable="true" type="xsd:string"/>
195
<element name="billingAddress" nillable="true" type="xsd:string"/>
196
<element name="billingEmail" nillable="true" type="xsd:string"/>
197
<element name="balance" nillable="true" type="xsd:double"/>
198
<element name="credit" nillable="true" type="xsd:double"/>
199
<element name="companyCode" nillable="true" type="xsd:string"/>
200
<element name="resellerActive" nillable="true" type="xsd:boolean"/>
201
<element name="changeDate" nillable="true" type="xsd:string"/>
202
<element name="properties" nillable="true" type="ngnpro:CustomerPropertyArray"/>
203
</sequence>
204
</complexType>
205
206
207
h3. Graphical client
208
209
@CDRTool->Accounts->Customers@
210
211
"!/raw-attachment/wiki/ProvisioningGuide/ngnpro-customers.png!":/attachment/wiki/ProvisioningGuide/ngnpro-customers.png
212
213
Click on the customer id to edit its properties.
214
215
h2. DNS Zones
216
217
The SIP Proxy is configured to serve domains that must be reachable over the Internet. The SIP devices must support RFC3263 (Locating SIP Services), namely support for DNS SRV lookups for SIP services. Each SIP domain configured in the SIP Proxy must have DNS zone configured on a DNS server responsable for that domain. When using the platform built-in DNS servers and DNS management you must create the proper DNS zones and records for each SIP domain.
218
219
To enable the use of an Internet domain for SIP you must provision in the DNS zone the following records:
220
221
bc(wiki). example.com.  300 IN  NAPTR   20 0 "s" "SIP+D2U" "" _sip._udp.example.com.
222
_sip._udp.example.com. 300  IN  SRV 0 0 5060 sip.example.com.
223
224
225
Replace example.com with your own domain and add an A record pointing sip.example.com. to the IP address of the SIP Proxy.
226
227
h3. SOAP/XML functions
228
229
* DnsPort-&gt;addZone()
230
* DnsPort-&gt;updateZone()
231
* DnsPort-&gt;deleteZone()
232
* DnsPort-&gt;getZone()
233
* DnsPort-&gt;getZones()
234
* DnsPort-&gt;addRecord()
235
* DnsPort-&gt;addFancyRecord()
236
* DnsPort-&gt;updateRecord()
237
* DnsPort-&gt;updateFancyRecord()
238
* DnsPort-&gt;deleteRecord()
239
* DnsPort-&gt;deleteFancyRecord()
240
* DnsPort-&gt;getRecord()
241
* DnsPort-&gt;getFancyRecord()
242
* DnsPort-&gt;getRecords()
243
* DnsPort-&gt;getFancyRecords()
244
245
DNZ zone attributes:
246
247
bc(wiki). <complexType name="DnsZone">
248
249
<sequence>
250
<element name="name" nillable="false" type="xsd:string"/>
251
<element name="ttl" nillable="true" type="xsd:nonNegativeInteger"/>
252
<element name="nameservers" nillable="true" type="ngnpro:StringArray"/>
253
<element name="email" nillable="true" type="xsd:string"/>
254
<element name="serial" nillable="true" type="xsd:int"/>
255
<element name="refresh" nillable="true" type="xsd:int"/>
256
<element name="retry" nillable="true" type="xsd:int"/>
257
<element name="expire" nillable="true" type="xsd:int"/>
258
<element name="minimum" nillable="true" type="xsd:int"/>
259
<element name="customer" nillable="true" type="xsd:integer"/>
260
<element name="reseller" nillable="true" type="xsd:integer"/>
261
<element name="changeDate" nillable="true" type="xsd:string"/>
262
<element name="info" nillable="true" type="xsd:string"/>
263
</sequence>
264
</complexType>
265
266
267
When using AG Projects hosted platform you must select and use for DNS delegation the following name servers:
268
269
# ns1.dns-hosting.info
270
# ns2.dns-hosting.info
271
272
h3. Graphical client
273
274
@CDRTool->Accounts->DNS zones@
275
276
"!/raw-attachment/wiki/ProvisioningGuide/ngnpro-dns-zones.png!":/attachment/wiki/ProvisioningGuide/ngnpro-dns-zones.png
277
278
Click on each zone to edit its properties.
279
280
"!/raw-attachment/wiki/ProvisioningGuide/ngnpro-dns-zone.png!":/attachment/wiki/ProvisioningGuide/ngnpro-dns-zone.png
281
282
h2. DNS Records
283
284
Each DNS zones has one or more records. For every SIP domain served by the platform you must create the following DNS records:
285
286
Example for:
287
288
* SIP domain: sipdomain.com
289
* SIP Proxy hostname configured for the platform: sip.example.com
290
291
<pre class="wiki">
292
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
293
; DNS records specified by RFC 3263 (Locating SIP services) ;
294
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
295
296
; SIP communications using UDP transport
297
sipdomain.com.             IN NAPTR  10 0 &quot;S&quot; &quot;SIP+d2u&quot; &quot;&quot; _sip._udp.sipdomain.com.
298
_sip._udp.sipdomain.com.   IN SRV    0  0 5060 sip.example.com.
299
</pre>
300
301
h3. SOAP/XML functions
302
303
* DnsPort-&gt;addRecord()
304
* DnsPort-&gt;updateRecord()
305
* DnsPort-&gt;deleteRecord()
306
* DnsPort-&gt;getRecord()
307
* DnsPort-&gt;getRecords()
308
309
DNS record attributes:
310
311
bc(wiki). <complexType name="DnsRecord">
312
313
<sequence>
314
<element name="id" nillable="true" type="xsd:integer"/>
315
<element name="zone" nillable="true" type="xsd:string"/>
316
<element name="name" nillable="true" type="xsd:string"/>
317
<element name="type" nillable="true" type="ngnpro:DnsRecordType"/>
318
<element name="ttl" nillable="true" type="xsd:unsignedInt"/>
319
<element name="value" nillable="true" type="xsd:string"/>
320
<element name="priority" nillable="true" type="xsd:unsignedShort"/>
321
<element name="owner" nillable="true" type="xsd:integer"/>
322
<element name="customer" nillable="true" type="xsd:integer"/>
323
<element name="reseller" nillable="true" type="xsd:integer"/>
324
<element name="changeDate" nillable="true" type="xsd:string"/>
325
</sequence>
326
</complexType>
327
328
329
DNS record types:
330
331
bc(wiki). <simpleType name="DnsRecordType">
332
333
<xsd:restriction base="xsd:string">
334
<xsd:enumeration value="A"/>
335
<xsd:enumeration value="AAAA"/>
336
<xsd:enumeration value="CNAME"/>
337
<xsd:enumeration value="MX"/>
338
<xsd:enumeration value="NAPTR"/>
339
<xsd:enumeration value="NS"/>
340
<xsd:enumeration value="SRV"/>
341
<xsd:enumeration value="TXT"/>
342
<xsd:enumeration value="PTR"/>
343
<xsd:enumeration value="LOC"/>
344
</xsd:restriction>
345
</simpleType>
346
347
348
h3. Graphical client
349
350
@CDRTool->Accounts->DNS records@
351
352
"!/raw-attachment/wiki/ProvisioningGuide/ngnpro-dns-records.png!":/attachment/wiki/ProvisioningGuide/ngnpro-dns-records.png
353
354
Click on each record to edit its attributes.
355
356
"!/raw-attachment/wiki/ProvisioningGuide/ngnpro-dns-record.png!":/attachment/wiki/ProvisioningGuide/ngnpro-dns-record.png
357
358
h2. SIP Domains
359
360
Before creating SIP accounts you need to create at least one SIP domain. (e.g. example.com)
361
362
h3. SOAP/XML functions
363
364
* SipPort-&gt;addDomain()
365
* SipPort-&gt;updateDomain()
366
* SipPort-&gt;deleteDomain()
367
* SipPort-&gt;getDomains()
368
369
h3. Graphical client
370
371
@CDRTool->Accounts->SIP domains@
372
373
"!/raw-attachment/wiki/ProvisioningGuide/ngnpro-sip-domains.png!":/attachment/wiki/ProvisioningGuide/ngnpro-sip-domains.png
374
375
h2. SIP Accounts
376
377
The provisioning of SIP account is performed using the SOAP/XML functions present in the Sip port described in NGNPro WSDL.
378
379
You must add at least one SIP domain before adding a SIP account.
380
381
SIP account passwords can be stored in clear text or encrypted formats depending on how you supply the password. NGNPro needs two MD5 checksums (hexdigests) computed based on the (id.username, id.domain, password) tuple. A hexdigest must be a string of length 32, containing only hexadecimal digits. These hexdigests can be computed by the client and given to NGNPro instead of a clear text password, as follows: the password field must be in "digest1:digest2" form, where digest1=MD5("username:domain:password") and digest2=MD5("username&#64;domain:domain:password"). Otherwise, if the password is given in clear text, NGNPro computes these two digests and stores them. If the store&#95;clear&#95;text&#95;passwords configuration option is set to Yes (the default value), the clear text password will be also be stored. If store&#95;clear&#95;text&#95;passwords is set to No, the password will not be stored and it will not be available in the future.
382
383
To enable different rights for SIP accounts, they must be part of specific groups.
384
385
You can add or remove a SIP account from a group by using Sip.addToGroup() and Sip.removeFromGroup() SOAP methods. The list of groups to which a SIP account belongs can also be set using the `groups' attribute of the SipAccount structure in Sip.addAccount() and Sip.updateAccount() methods. When you're using a group list for modification, all the old groups will be deleted and the new ones will be inserted in place.
386
387
To enable PSTN calls to a SIP account, that account must be in the 'free-pstn' group.
388
389
If you want to limit the access to PSTN, in the margins of a predefined quota (expressed in the currency used by CDRTool rating engine), the SIP account must have a positive value set for the 'quota' attribute in the SipAccount structure. In this case, the CDRTool quota system blocks the user if the traffic exceedes the predefined quota by adding the user to the 'quota' group. In this case the SIP account can still place free calls.
390
391
A SIP account can be administratively blocked (it cannot make any calls and it cannot register thus not receiving calls), if it's part of the 'blocked' group.
392
393
If you want a SIP account to make calls marked as anonymous, that SIP account must be placed in the 'anonymous' group.
394
395
To mark a SIP account as prepaid, the 'prepaid' attribute of the SipAccount structure must be set to True.
396
397
SipAccount.properties attribute can be used to store per-account information in the form of name-value pairs and they can then be used on the client side for its own purposes. Properties do not influence routing decisions. Their meaning depends on the interpretation the client side gives them, for example they can be used from a web-based interface to store settings like the display language or the account type.
398
399
Diversion rules routing order:
400
401
# Unavailable,
402
# Unconditional
403
# Not-online
404
# Busy
405
# No-answer
406
407
Not-online means there is no registered device for that account, Unavailable means that the subscriber has accept rules in place that forbid the caller at the current time, accept rules can be temporary (valid a a number of minutes after which they'll be discarded) or scheduled (permanent rules based on time of day and day of week).
408
409
The last 2 rules are not handled together with the other 3, they are only handled if the call fails.
410
411
h3. SOAP/XML functions
412
413
* SipPort-&gt;addAccount()
414
* SipPort-&gt;updateAccount()
415
* SipPort-&gt;deleteAccount()
416
* SipPort-&gt;getAccount()
417
* SipPort-&gt;getAccounts()
418
* SipPort-&gt;addToGroup()
419
* SipPort-&gt;removeFromGroup()
420
* SipPort-&gt;getGroups()
421
* SipPort-&gt;addPhonebookEntry()
422
* SipPort-&gt;updatePhonebookEntry()
423
* SipPort-&gt;deletePhonebookEntry()
424
* SipPort-&gt;getPhonebookEntries()
425
* SipPort-&gt;setRejectMembers()
426
* SipPort-&gt;getRejectMembers()
427
* SipPort-&gt;setAcceptRules()
428
* SipPort-&gt;getAcceptRules()
429
* SipPort-&gt;setBarringPrefixes()
430
* SipPort-&gt;getBarringPrefixes()
431
* SipPort-&gt;setCallDiversions()
432
* SipPort-&gt;getCallDiversions()
433
* SipPort-&gt;getCalls()
434
* SipPort-&gt;getCallStatistics()
435
* SipPort-&gt;getSipDeviceLocations()
436
437
SIP account attributes:
438
439
bc(wiki). <complexType name="SipAccount">
440
441
<sequence>
442
<element name="id" nillable="false" type="ngnpro:SipId"/>
443
<element name="password" nillable="true" type="xsd:string"/>
444
<element name="firstName" nillable="true" type="xsd:string"/>
445
<element name="lastName" nillable="true" type="xsd:string"/>
446
<element name="email" nillable="true" type="xsd:string"/>
447
<element name="acl" nillable="true" type="ngnpro:SubscriberACLArray"/>
448
<element name="groups" nillable="true" type="ngnpro:StringArray"/>
449
<element name="properties" nillable="true" type="ngnpro:PropertyArray"/>
450
<element name="timezone" nillable="true" type="xsd:string"/>
451
<element name="rpid" nillable="true" type="xsd:string"/>
452
<element name="quota" nillable="true" type="xsd:int"/>
453
<element name="quickdialPrefix" nillable="true" type="xsd:string"/>
454
<element name="callLimit" nillable="true" type="xsd:int"/>
455
<element name="prepaid" nillable="true" type="xsd:boolean"/>
456
<element name="region" nillable="true" type="xsd:string"/>
457
<element name="timeout" nillable="true" type="xsd:nonNegativeInteger"/>
458
<element name="owner" nillable="true" type="xsd:integer"/>
459
<element name="customer" nillable="true" type="xsd:integer"/>
460
<element name="reseller" nillable="true" type="xsd:integer"/>
461
<element name="changeDate" nillable="true" type="xsd:string"/>
462
<element name="createDate" nillable="true" type="xsd:string"/>
463
</sequence>
464
</complexType>
465
466
467
Meaning of SIP account attributes:
468
469
* rpid: caller id presented to the callee when calling to PSTN destinations
470
* prepaid: if true, subscriber may call within the limit of its prepaid balance, when balance is zero all calls in progress are cut
471
* properties: list with attribute/value pairs, used to store arbitrary data per subscriber
472
* quota: if set to a possitive integer, the subscriber may call to the PSTN up to this limit, calls in progress continue, the usage is reset each calendar month
473
* region: label that matches a region when calling an emergency number, the call is routed to the emergency point defined for that region
474
* callLimit: maximum amount of concurrent PSTN calls allowed
475
* acl: a list of allowed IP networks
476
477
* groups: group membership for SIP accounts. Available groups and their meaning:
478
479
* free-pstn: subscriber may call to PSTN destinations
480
* blocked: only calls to emergency numbers defind in the SIP Proxy are allowed
481
* anonymous: hide caller id when calling to the PSTN (using Privacy headers)
482
* anonymous-reject: reject calls from "anonymous&#64;anonymous.invalid":mailto:anonymous@anonymous.invalid
483
* quota: subscriber has been blocked because monthy quota has been exceeded, calls to PSTN destinations are denied
484
* missed-calls: subscriber will be notifie by email about his sessions in the last 24 hours
485
486
Reserved groups for internal use (do not change them):
487
488
* prepaid, intercept
489
490
On updateAccount() operation all attributes must be supplied otherwise any missing attribute will be deleted. First perform a getAccount() operation, update the attributes that need to be changed and finally perform an updateAccount() with the modified object.
491
492
h3. Graphical client
493
494
@CDRTool->Accounts->SIP accounts@
495
496
"!/raw-attachment/wiki/ProvisioningGuide/ngnpro-sip-accounts.png!":/attachment/wiki/ProvisioningGuide/ngnpro-sip-accounts.png
497
498
h3. Control panel
499
500
"!http://wiki.sip2sip.info/attachments/3809/sip2sip-cp-menu.png(http://wiki.sip2sip.info/attachments/3809/sip2sip-cp-menu.png)!":http://wiki.sip2sip.info/attachments/3809/sip2sip-cp-menu.png
501
502
The above menu gives you access to various settings and information related to your SIP account.
503
504
h3. Voicemail
505
506
This panel can set the way the voicemail messages are delivered.
507
508
"!http://wiki.sip2sip.info/attachments/3813/sip2sip-cp-voicemail.png(http://wiki.sip2sip.info/attachments/3813/sip2sip-cp-voicemail.png)!":http://wiki.sip2sip.info/attachments/3813/sip2sip-cp-voicemail.png
509
510
h3. Online devices
511
512
This panel displays the list of registered SIP devices.
513
514
"!/raw-attachment/wiki/ProvisioningGuide/sip2sip-cp-devices.png!":/attachment/wiki/ProvisioningGuide/sip2sip-cp-devices.png
515
516
h3. Accept calls
517
518
This panel control when and from whom calls are accepted.
519
520
"!http://wiki.sip2sip.info/attachments/3801/sip2sip-cp-accept.png(http://wiki.sip2sip.info/attachments/3801/sip2sip-cp-accept.png)!":http://wiki.sip2sip.info/attachments/3801/sip2sip-cp-accept.png
521
522
h3. Call diversions
523
524
This panel controls the call diversions.
525
526
"!http://wiki.sip2sip.info/attachments/3807/sip2sip-cp-diversions.png(http://wiki.sip2sip.info/attachments/3807/sip2sip-cp-diversions.png)!":http://wiki.sip2sip.info/attachments/3807/sip2sip-cp-diversions.png
527
528
Call diversions data type:
529
530
<pre class="wiki">
531
&lt;complexType name=&quot;CallDiversions&quot;&gt;
532
533
&lt;sequence&gt;
534
535
&lt;!--
536
537
                        FUNC - forward unconditionally
538
                        FNOL - forward if not online
539
                        FUNV - forward if not available
540
                        FNOA - forward if no answer
541
                        FBUS - forward if busy
542
                        RUNC - redirect unconditionally
543
                        RNOL - redirect if not online
544
                        RUNV - redirect if not available
545
                        RNOA - redirect if no answer
546
                        RBUS - redirect if busy
547
            
548
            - Forward conditions cause the traffic to be routed and accounted through the SIP Proxy
549
            - Redirect conditions cause traffic to be made directly between the caller and end destination, 
550
              bypassing the SIP Proxy
551
            - Always used FXXX conditions when accounting is desired
552
            
553
                    
554
--&gt;
555
&lt;element name=&quot;FUNC&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&gt;
556
&lt;element name=&quot;FNOL&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&gt;
557
&lt;element name=&quot;FUNV&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&gt;
558
&lt;element name=&quot;FNOA&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&gt;
559
&lt;element name=&quot;FBUS&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&gt;
560
&lt;element name=&quot;RUNC&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&gt;
561
&lt;element name=&quot;RNOL&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&gt;
562
&lt;element name=&quot;RUNV&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&gt;
563
&lt;element name=&quot;RNOA&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&gt;
564
&lt;element name=&quot;RBUS&quot; nillable=&quot;true&quot; type=&quot;xsd:string&quot;/&gt;
565
&lt;/sequence&gt;
566
&lt;/complexType&gt;
567
</pre>
568
569
h3. Aliases
570
571
This panel displays the aliases associated with a SIP account.
572
573
"!http://wiki.sip2sip.info/raw-attachment/wiki/SipSettings/sip2sip-cp-aliases.png(http://wiki.sip2sip.info/raw-attachment/wiki/SipSettings/sip2sip-cp-aliases.png)!":http://wiki.sip2sip.info/raw-attachment/wiki/SipSettings/sip2sip-cp-aliases.png
574
575
h2. SIP Aliases
576
577
Aliases can be used to provide custom SIP addresses that map to exiting SIP accounts.
578
579
h3. SOAP/XML functions
580
581
* SipPort-&gt;addAlias()
582
* SipPort-&gt;updateAlias()
583
* SipPort-&gt;deleteAlias()
584
* SipPort-&gt;getAlias()
585
* SipPort-&gt;getAliasesForAccount()
586
* SipPort-&gt;getAliases()
587
588
h3. Graphical client
589
590
@CDRTool->Accounts->SIP aliases@
591
592
"!/raw-attachment/wiki/ProvisioningGuide/ngnpro-sip-aliases.png!":/attachment/wiki/ProvisioningGuide/ngnpro-sip-aliases.png
593
594
h2. Trusted Peers
595
596
Trusted peers are identified by their IP addresses and are allowed to transit the platform. Trusted peers are used to define SIP trunks to/from PBXs allowed to connect to the platform. For more information see "SIP trunking section":http://msp-documentation.ag-projects.com/wiki/PeeringGuide#SIPtrunking.
597
598
h3. SOAP/XML functions
599
600
* SipPort-&gt;addTrustedPeer()
601
* SipPort-&gt;deleteTrustedPeer()
602
* SipPort-&gt;getTrustedPeers()
603
604
Trusted peer attributes:
605
606
bc(wiki). <complexType name="TrustedPeer">
607
608
<sequence>
609
<element name="ip" nillable="false" type="xsd:string"/>
610
<element name="protocol" nillable="true" type="ngnpro:TrustedPeerProtocol" default="any"/>
611
<element name="fromPattern" nillable="true" type="xsd:string" default="^sip:.*$"/>
612
<element name="tag" nillable="true" type="xsd:string"/>
613
<element name="description" nillable="true" type="xsd:string" default=""/>
614
<element name="reseller" nillable="true" type="xsd:integer"/>
615
<element name="changeDate" nillable="true" type="xsd:string"/>
616
</sequence>
617
</complexType>
618
619
620
h3. Graphical client
621
622
@CDRTool->Accounts->Trusted peers@
623
624
"!/raw-attachment/wiki/ProvisioningGuide/ngnpro-trusted-peers.png!":/attachment/wiki/ProvisioningGuide/ngnpro-trusted-peers.png
625
626
h2. ENUM Ranges
627
628
ENUM is used in the routing logic of the SIP Proxy for sessions that use telephone numbers as identifiers. ENUM is a protocol that provides a translation mechanism for E.164 telephone numbers into IP addressing schemes.
629
630
An ENUM range is a telephone number prefix that has been allocated to your platform (by your telephone numbers supplier or telecom regulator in your country). For example you are an operator in Holland (contry code 31) and you have been allocated from the local authorities the numbers 31208005100 till 31208005199 (one hundred numbers). The prefix is therefore 312080051. First create an ENUM range using this prefix, then add individual numbers belonging to this range.
631
632
An ENUM range is similar with a DNS zones but it contains extra non DNS attributes like the type of numbers allowed to be stored.
633
634
h3. SOAP/XML functions
635
636
* EnumPort-&gt;addRange()
637
* EnumPort-&gt;updateRange()
638
* EnumPort-&gt;deleteRange()
639
* EnumPort-&gt;getRanges()
640
641
ENUM range attributes:
642
643
bc(wiki). <complexType name="EnumRange">
644
645
<sequence>
646
<element name="id" nillable="false" type="ngnpro:EnumRangeId"/>
647
<element name="ttl" nillable="true" type="xsd:nonNegativeInteger" default="3600"/>
648
<element name="minDigits" nillable="true" type="xsd:int"/>
649
<element name="maxDigits" nillable="true" type="xsd:int"/>
650
<element name="size" nillable="true" type="xsd:int"/>
651
<element name="nameservers" nillable="true" type="ngnpro:StringArray"/>
652
<element name="used" nillable="true" type="xsd:int"/>
653
<element name="serial" nillable="true" type="xsd:int"/>
654
<element name="customer" nillable="true" type="xsd:integer"/>
655
<element name="reseller" nillable="true" type="xsd:integer"/>
656
<element name="changeDate" nillable="true" type="xsd:string"/>
657
<element name="info" nillable="true" type="xsd:string"/>
658
</sequence>
659
</complexType>
660
661
662
h3. Graphical client
663
664
@CDRTool->Accounts->ENUM ranges@
665
666
"!/raw-attachment/wiki/ProvisioningGuide/ngnpro-enum-ranges.png!":/attachment/wiki/ProvisioningGuide/ngnpro-enum-ranges.png
667
668
Click on each range to modify its properties.
669
670
"!/raw-attachment/wiki/ProvisioningGuide/ngnpro-enum-range.png!":/attachment/wiki/ProvisioningGuide/ngnpro-enum-range.png
671
672
h2. ENUM Numbers
673
674
ENUM is used in the routing logic of the SIP Proxy for sessions that use telephone numbers as identifiers. For each SIP account in the platform that must be reachable besides the SIP address also by one ore more telephone numbers, you must create the ENUM numbers and add mappings to their corresponding SIP account. Before creating any ENUM number, you must create an ENUM range.
675
676
The ENUM NAPTR record management has been developed based on the standards described at "http://www.ag-projects.com/content/view/61/96/":http://www.ag-projects.com/content/view/61/96/
677
678
Each ENUM number may have up to 5 NAPTR records as specified in ETSI TS 102 172 V1.2.1 (Minimum requirements for interoperability of ENUM implementations)
679
680
h3. SOAP/XML functions
681
682
* EnumPort-&gt;addNumber()
683
* EnumPort-&gt;updateNumber()
684
* EnumPort-&gt;deleteNumber()
685
* EnumPort-&gt;getNumber()
686
* EnumPort-&gt;getNumbers()
687
688
ENUM number attributes:
689
690
bc(wiki). <complexType name="EnumNumber">
691
692
<sequence>
693
<element name="id" nillable="false" type="ngnpro:EnumId"/>
694
<element name="mappings" nillable="true" type="ngnpro:EnumMappingArray"/>
695
<element name="info" nillable="true" type="xsd:string"/>
696
<element name="owner" nillable="true" type="xsd:integer"/>
697
<element name="customer" nillable="true" type="xsd:integer"/>
698
<element name="reseller" nillable="true" type="xsd:integer"/>
699
<element name="changeDate" nillable="true" type="xsd:string"/>
700
</sequence>
701
</complexType>
702
703
704
ENUM mapping attributes:
705
706
bc(wiki). <complexType name="EnumMapping">
707
708
<sequence>
709
<element name="id" nillable="true" type="xsd:int"/>
710
<element name="type" nillable="true" type="xsd:string"/>
711
<element name="mapto" nillable="true" type="xsd:string"/>
712
<element name="priority" nillable="true" type="xsd:int"/>
713
<element name="ttl" nillable="true" type="xsd:int" default="3600"/>
714
</sequence>
715
</complexType>
716
717
718
The following NAPTR record types ENUM service types are supported:
719
720
bc(wiki).     var $NAPTR_services=array(
721
        "sip"    => array("service"=>"sip",
722
                              "webname"=>"SIP",
723
                              "schemas"=>array("sip:","sips:")),
724
        "mailto" => array("service"=>"mailto",
725
                              "webname"=>"Email",
726
                              "schemas"=>array("mailto:")),
727
        "web:http"   => array("service"=>"web:http",
728
                              "webname"=>"WEB (http)",
729
                              "schemas"=>array("http://")),
730
        "web:https"  => array("service"=>"web:https",
731
                              "webname"=>"WEB (https)",
732
                              "schemas"=>array("https://")),
733
        "x-skype:callto" => array("service"=>"x-skype:callto",
734
                              "webname"=>"Skype",
735
                              "schemas"=>array("callto:")),
736
        "h323"   => array("service"=>"h323",
737
                              "webname"=>"H323",
738
                              "schemas"=>array("h323:")),
739
        "iax"    => array("service"=>"iax",
740
                              "webname"=>"IAX",
741
                              "schemas"=>array("iax:")),
742
        "iax2"   => array("service"=>"iax2",
743
                              "webname"=>"IAX2",
744
                              "schemas"=>array("iax2:")),
745
        "mms"    => array("service"=>"mms",
746
                              "webname"=>"MMS",
747
                              "schemas"=>array("tel:","mailto:")),
748
        "sms"    => array("service"=>"sms",
749
                              "webname"=>"SMS",
750
                              "schemas"=>array("tel:","mailto:")),
751
        "ems"    => array("service"=>"ems",
752
                              "webname"=>"EMS",
753
                              "schemas"=>array("tel:","mailto:")),
754
        "im"     => array("service"=>"im",
755
                              "webname"=>"IM",
756
                              "schemas"=>array("im:")),
757
        "npd:tel"   => array("service"=>"npd+tel",
758
                              "webname"=>"Portability",
759
                              "schemas"=>array("tel:")),
760
        "void:mailto"  => array("service"=>"void:mailto",
761
                              "webname"=>"VOID(mail)",
762
                              "schemas"=>array("mailto:")),
763
        "void:http"  => array("service"=>"void:http",
764
                              "webname"=>"VOID(http)",
765
                              "schemas"=>array("http://")),
766
        "void:https" => array("service"=>"void:https",
767
                              "webname"=>"VOID(https)",
768
                              "schemas"=>array("https://")),
769
        "voice"  => array("service"=>"voice",
770
                              "webname"=>"Voice",
771
                              "schemas"=>array("voice:","tel:")),
772
        "tel"    => array("service"=>"tel",
773
                              "webname"=>"Tel",
774
                              "schemas"=>array("tel:")),
775
        "fax:tel"    => array("service"=>"fax:tel",
776
                              "webname"=>"Fax",
777
                              "schemas"=>array("tel:")),
778
        "ifax:mailto"   => array("service"=>"ifax:mailto",
779
                              "webname"=>"iFax",
780
                              "schemas"=>array("mailto:")),
781
        "pres"   => array("service"=>"pres",
782
                              "webname"=>"Presence",
783
                              "schemas"=>array("pres:")),
784
        "ft:ftp"    => array("service"=>"ft:ftp",
785
                              "webname"=>"FTP",
786
                              "schemas"=>array("ftp://")),
787
        "loc:http"  => array("service"=>"loc:http",
788
                              "webname"=>"GeoLocation",
789
                              "schemas"=>array("http://")),
790
        "key:http"  => array("service"=>"key:http",
791
                              "webname"=>"Public key",
792
                              "schemas"=>array("http://")),
793
        "key:https"  => array("service"=>"key:https",
794
                              "webname"=>"Public key (HTTPS)",
795
                              "schemas"=>array("https://"))
796
        );   
797
798
799
800
h3. Graphical client
801
802
@CDRTool->Accounts->ENUM numbers@
803
804
"!/raw-attachment/wiki/ProvisioningGuide/ngnpro-enum-numbers.png!":/attachment/wiki/ProvisioningGuide/ngnpro-enum-numbers.png
805
806
Click on each number to modify its properties.
807
808
"!/raw-attachment/wiki/ProvisioningGuide/ngnpro-enum-number.png!":/attachment/wiki/ProvisioningGuide/ngnpro-enum-number.png
809
810
h2. Voicemail Accounts
811
812
The provisioning is performed using the SOAP/XML functions present in the Voicemail port described in NGNPro WSDL.
813
814
To add a voicemail account for a SIP account, the Voicemail.addAccount() method must be used. For each newly created account, a mailbox number will be automatically generated by the provisioning to uniquely identify the voicemail account. If you set the mailbox by yourself, please note that the Asterisk configuration might need to be updated, for example if you give shorter voicemailboxes (3, 4 digits), that are not accepted by default.
815
816
By default mailboxes are created starting with number 1000000.
817
818
You can configure the voicemail server to delete or store the received voicemail messages by setting VoicemailAccount.VoicemailOptions.delete attribute to True or False, respectively.
819
820
To forward requests of a SIP account to the Voicemail account, use the '&lt;voice-mailbox&gt;' wildcard as a value for FUNC, FNOL, FUNV, FNOA, FBUS forwarding indicators in the Sip.setCallDiversions() method.
821
822
Each SIP account can access its own voicemail messages and settings by dialing the voicemail extension (by default &#42;70) configured in the SIP Proxy in:
823
824
bc(wiki). /etc/opensips/config/settings.m4
825
826
827
bc(wiki). # Number to dial to get to voicemail
828
define(`VOICEMAIL_NUMBER', `*70')
829
830
831
Some devices are using the &#42; key internally. For such devices you may create an alias in the platform (like voicemail or a full number without &#42;).
832
833
Voice messages are by default sent by email. If you wish to store the on the voicemail server and listen to them using a telephone device you must enable voicemail storage option for each SIP account using the provisioning API. If the server storage option is enabled, a Message Waiting Indicator (a.k.a MWI) is sent to the devices that subscribed for this event, the devices supporting such feature will provide an indication that voice messages have been stored on the server.
834
835
MWI is enabled if the storage of message on server is enabled. MWI is reset by accessing the voicemail box using a SIP phone.
836
837
To change the default content of asterisk email notification, you must edit in /etc/asterisk/voicemail.conf and change the following directives:
838
839
<pre class="wiki">
840
;emailbody=
841
;emailsubject=
842
843
; Change the from, body and/or subject, variables:
844
;     VM_NAME, VM_DUR, VM_MSGNUM, VM_MAILBOX, VM_CALLERID, VM_CIDNUM,
845
;     VM_CIDNAME, VM_DATE
846
847
and
848
849
;serveremail = notification@some_domain.tld
850
</pre>
851
852
An asterisk reload or restart is required:
853
854
bc(wiki). sudo asterisk -r reload
855
856
857
h3. SOAP/XML functions
858
859
* VoicemailPort-&gt;addAccount()
860
* VoicemailPort-&gt;updateAccount()
861
* VoicemailPort-&gt;deleteAccount()
862
* VoicemailPort-&gt;getAccount()
863
* VoicemailPort-&gt;setAnnouncement()
864
865
h2. PSTN Routes
866
867
A route is a PSTN prefix, one or more carriers can be assigned for routing sessions for it. PSTN prefixes always start with 00 + Country code. (e.g. 0031 is Nederland). An empty prefix will match all possible routes while a longer match takes precedence. The actual number format sent out to the PSTN gateway can be modified using the gateway rules described below.
868
869
h3. SOAP/XML functions
870
871
* SipPort-&gt;addRoutes()
872
* SipPort-&gt;deleteRoutes()
873
* SipPort-&gt;getRoutes()
874
875
h3. Graphical client
876
877
@CDRTool->Accounts->PSTN routes@
878
879
"!/raw-attachment/wiki/ProvisioningGuide/ngnpro-pstn-routes.png!":/attachment/wiki/ProvisioningGuide/ngnpro-pstn-routes.png
880
881
h2. PSTN Carriers
882
883
A carrier groups one or more gateways together and can be used during the assignment of PSTN routes. You must define at least one carrier for PSTN routing.
884
885
h3. SOAP/XML functions
886
887
* SipPort-&gt;addCarrier()
888
* SipPort-&gt;deleteCarrier()
889
* SipPort-&gt;getCarriers()
890
891
h3. Graphical client
892
893
@CDRTool->Accounts->PSTN carriers@
894
895
"!/raw-attachment/wiki/ProvisioningGuide/ngnpro-pstn-carriers.png!":/attachment/wiki/ProvisioningGuide/ngnpro-pstn-carriers.png
896
897
h2. PSTN Gateways
898
899
You must define at least one gateway for PSTN routing. Before creating any gateway you must create a carrier.
900
901
h3. SOAP/XML functions
902
903
* SipPort-&gt;addGateway()
904
* SipPort-&gt;updateGateway()
905
* SipPort-&gt;deleteGateway()
906
* SipPort-&gt;getGateways()
907
908
h3. Graphical client
909
910
@CDRTool->Accounts->PSTN gateways@
911
912
"!/raw-attachment/wiki/ProvisioningGuide/ngnpro-pstn-gateways.png!":/attachment/wiki/ProvisioningGuide/ngnpro-pstn-gateways.png
913
914
h2. PSTN Rules
915
916
These rules define the format of the request URI sent to the remote gateway. Rules can be used to strip and prepend digits depending on various conditions.
917
918
h3. SOAP/XML functions
919
920
* SipPort-&gt;addGatewayRule()
921
* SipPort-&gt;updateGatewayRule()
922
* SipPort-&gt;deleteGatewayRule()
923
* SipPort-&gt;getGatewayRules()
924
925
h3. Graphical client
926
927
@CDRTool->Accounts->PSTN rules@
928
929
"!/raw-attachment/wiki/ProvisioningGuide/ngnpro-pstn-rules.png!":/attachment/wiki/ProvisioningGuide/ngnpro-pstn-rules.png
930
931
Click on rule to edit its properties.
932
933
"!/raw-attachment/wiki/ProvisioningGuide/ngnpro-pstn-rule.png!":/attachment/wiki/ProvisioningGuide/ngnpro-pstn-rule.png
934
935
h2. Emergency Numbers
936
937
Emergency calls refer to dialing short numbers usually associated with emergency services like police or fire-brigade (e.g. 112 or 911). When a SIP session is setup to a short number designated as emergency (in the SIP Proxy configuration), a secondary database lookup is performed in the proxy database in the emergency&#95;mapping table. Based on the *region* attribute provisioned with each SIP account, the final destination number for the emergency service in the region of the account is looked up.
938
939
# Define the emergency numbers in the /etc/opensips/config/settings.m4
940
941
bc(wiki). # Emergency numbers
942
define(`EMERGENCY_NR1', `112')
943
define(`EMERGENCY_NR2', `911')
944
define(`EMERGENCY_NRS', `2')
945
946
947
<ol start="2">
948
<li>Add the local access number for each region to emergency&#95;mapping table, the table has the following structure:</li>
949
</ol>
950
951
952
|*Field*|*Type*|
953
|id|int(10) unsigned|
954
|username|varchar(64)|
955
|domain|varchar(64)|
956
|region|varchar(32)|
957
|target|varchar(128)|
958
|change&#95;date|timestamp|
959
960
961
Example:
962
963
bc(wiki). +----------+-------------+-----------+-------------------------------+---------------------+
964
| username | domain      | region    | target                        | change_date         |      
965
+----------+-------------+-----------+-------------------------------+---------------------+
966
| 112      | example.com | 010       | sip:0031141217112@example.com | 2006-05-09 14:33:18 | 
967
| 112      | example.com | 0111      | sip:0031141219112@example.com | 2006-05-09 14:33:18 | 
968
| 112      | example.com | 0113      | sip:0031141219112@example.com | 2006-05-09 14:33:18 | 
969
| 112      | example.com | 0114      | sip:0031141219112@example.com | 2006-05-09 14:33:18 | 
970
| 112      | example.com | 0115      | sip:0031141219112@example.com | 2006-05-09 14:33:18 | 
971
+----------+-------------+-----------+-------------------------------+---------------------+
972
973
974
<ol start="3">
975
<li>Set the *region* attribute for each SIP account using Sip-&gt;updateAccount() to match the region column in emergency&#95;mapping table.</li>
976
</ol>
977
978
h2. Email Notifications
979
980
h3. Quota exceeded
981
982
This notification is sent out to the email address associated with SIP accounts that have the *quota* attribute set to a positive value, when the monthly quota has been exceeded. The email is generated by a CDRTool cron job task from the script:
983
984
bc(wiki). /var/www/CDRTool/scripts/OpenSIPS/quotaCheck.php
985
986
987
To change the email headers or the body of the notification message you must insert/update a row in cdrtool.settings mysql table. See for an example:
988
989
bc(wiki). /var/www/CDRTool/setup/mysql/custom_notifications.mysql 
990
991
992
h3. Voicemail
993
994
The notification that contains also the actual voice message as a WAV attachment is sent out by the Asterisk voicemail server. To change the email headers or body you must change the configuration file:
995
996
bc(wiki). /etc/asterisk/voicemail.conf
997
998
999
This notification cannot be enabled/disabled per user, it is a global platform setting.
1000
1001
h3. Last sessions
1002
1003
An email with last received sessions in the previous 24 hours is sent out by a CDRTool cronjob script:
1004
1005
bc(wiki). /var/www/CDRTool/scripts/OpenSIPS/notifyLastSessions.php
1006
1007
1008
The From header of the email notification can be modified by changing the following setting from /etc/cdrtool/global.inc:
1009
1010
bc(wiki). $CDRTool['provider']['fromEmail'] ="support@ag-projects.com";
1011
1012
1013
The notification is sent only if the SIP account belongs to the *missed-calls* group.