Browse code

app_perl: perl module moved and renamed to modules/app_perl

- same naming pattern as for the other embedded interpreters

Daniel-Constantin Mierla authored on 20/01/2013 11:47:08
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,1621 +0,0 @@
1
-perl Module
2
-
3
-Bastian Friedrich
4
-
5
-   Collax GmbH
6
-
7
-Edited by
8
-
9
-Bastian Friedrich
10
-
11
-   Copyright © 2007 Collax GmbH
12
-     __________________________________________________________________
13
-
14
-   Table of Contents
15
-
16
-   1. Admin Guide
17
-
18
-        1. Overview
19
-        2. Installing the module
20
-        3. Using the module
21
-        4. Dependencies
22
-
23
-              4.1. Kamailio Modules
24
-              4.2. External Libraries or Applications
25
-
26
-        5. Parameters
27
-
28
-              5.1. filename (string)
29
-              5.2. modpath (string)
30
-
31
-        6. Functions
32
-
33
-              6.1. perl_exec_simple(func, [param])
34
-              6.2. perl_exec(func, [param])
35
-
36
-   2. Kamailio Perl API
37
-
38
-        1. Kamailio
39
-
40
-              1.1. log(level,message)
41
-
42
-        2. Kamailio::Message
43
-
44
-              2.1. getType()
45
-              2.2. getStatus()
46
-              2.3. getReason()
47
-              2.4. getVersion()
48
-              2.5. getRURI()
49
-              2.6. getMethod()
50
-              2.7. getFullHeader()
51
-              2.8. getBody()
52
-              2.9. getMessage()
53
-              2.10. getHeader(name)
54
-              2.11. getHeaderNames()
55
-              2.12. moduleFunction(func,string1,string2)
56
-              2.13. log(level,message) (deprecated type)
57
-              2.14. rewrite_ruri(newruri)
58
-              2.15. setFlag(flag)
59
-              2.16. resetFlag(flag)
60
-              2.17. isFlagSet(flag)
61
-              2.18. pseudoVar(string)
62
-              2.19. append_branch(branch,qval)
63
-              2.20. getParsedRURI()
64
-
65
-        3. Kamailio::URI
66
-
67
-              3.1. user()
68
-              3.2. host()
69
-              3.3. passwd()
70
-              3.4. port()
71
-              3.5. params()
72
-              3.6. headers()
73
-              3.7. transport()
74
-              3.8. ttl()
75
-              3.9. user_param()
76
-              3.10. maddr()
77
-              3.11. method()
78
-              3.12. lr()
79
-              3.13. r2()
80
-              3.14. transport_val()
81
-              3.15. ttl_val()
82
-              3.16. user_param_val()
83
-              3.17. maddr_val()
84
-              3.18. method_val()
85
-              3.19. lr_val()
86
-              3.20. r2_val()
87
-
88
-        4. Kamailio::AVP
89
-
90
-              4.1. add(name,val)
91
-              4.2. get(name)
92
-              4.3. destroy(name)
93
-
94
-        5. Kamailio::Utils::PhoneNumbers
95
-
96
-              5.1.
97
-                      new(publicAccessPrefix,internationalPrefix,longDistanceP
98
-                      refix,countryCode,areaCode,pbxCode)
99
-
100
-              5.2. canonicalForm( number [, context] )
101
-              5.3. dialNumber( number [, context] )
102
-
103
-        6. Kamailio::LDAPUtils::LDAPConf
104
-
105
-              6.1. Constructor new()
106
-              6.2. Method base()
107
-              6.3. Method host()
108
-              6.4. Method port()
109
-              6.5. Method uri()
110
-              6.6. Method rootbindpw()
111
-              6.7. Method rootbinddn()
112
-              6.8. Method binddn()
113
-              6.9. Method bindpw()
114
-
115
-        7. Kamailio::LDAPUtils::LDAPConnection
116
-
117
-              7.1. Constructor new( [config, [authenticated]] )
118
-              7.2. Function/Method search( conf, filter, base,
119
-                      [requested_attributes ...])
120
-
121
-                    7.2.1. Arguments:
122
-                    7.2.2. Result:
123
-
124
-        8. Kamailio::VDB
125
-        9. Kamailio::Constants
126
-        10. Kamailio::VDB::Adapter::Speeddial
127
-        11. Kamailio::VDB::Adapter::Alias
128
-
129
-              11.1. query(conds,retkeys,order)
130
-
131
-        12. Kamailio::VDB::Adapter::AccountingSIPtrace
132
-        13. Kamailio::VDB::Adapter::Describe
133
-        14. Kamailio::VDB::Adapter::Auth
134
-        15. Kamailio::VDB::ReqCond
135
-
136
-              15.1. new(key,op,type,name)
137
-              15.2. op()
138
-
139
-        16. Kamailio::VDB::Pair
140
-
141
-              16.1. new(key,type,name)
142
-              16.2. key()
143
-
144
-        17. Kamailio::VDB::VTab
145
-
146
-              17.1. new()
147
-              17.2. call(op,[args])
148
-
149
-        18. Kamailio::VDB::Value
150
-
151
-              18.1. stringification
152
-              18.2. new(type,data)
153
-              18.3. type()
154
-              18.4. data()
155
-
156
-        19. Kamailio::VDB::Column
157
-
158
-              19.1. Stringification
159
-              19.2. new(type,name)
160
-              19.3. type( )
161
-              19.4. name()
162
-              19.5. Kamailio::VDB::Result
163
-              19.6. new(coldefs,[row, row, ...])
164
-              19.7. coldefs()
165
-              19.8. rows()
166
-
167
-   3. Perl samples
168
-
169
-        1. Sample directory
170
-
171
-              1.1. Script descriptions
172
-
173
-                    1.1.1. branches.pl
174
-                    1.1.2. firstline.pl
175
-                    1.1.3. flags.pl
176
-                    1.1.4. functions.pl
177
-                    1.1.5. headers.pl
178
-                    1.1.6. logging.pl
179
-                    1.1.7. messagedump.pl
180
-                    1.1.8. persistence.pl
181
-                    1.1.9. phonenumbers.pl
182
-                    1.1.10. pseudovars.pl
183
-
184
-   4. Frequently Asked Questions
185
-
186
-   List of Examples
187
-
188
-   1.1. Set filename parameter
189
-   1.2. Set modpath parameter
190
-   1.3. perl_exec_simple() usage
191
-   1.4. perl_exec() usage
192
-
193
-Chapter 1. Admin Guide
194
-
195
-   Table of Contents
196
-
197
-   1. Overview
198
-   2. Installing the module
199
-   3. Using the module
200
-   4. Dependencies
201
-
202
-        4.1. Kamailio Modules
203
-        4.2. External Libraries or Applications
204
-
205
-   5. Parameters
206
-
207
-        5.1. filename (string)
208
-        5.2. modpath (string)
209
-
210
-   6. Functions
211
-
212
-        6.1. perl_exec_simple(func, [param])
213
-        6.2. perl_exec(func, [param])
214
-
215
-1. Overview
216
-
217
-   The time needed when writing a new Kamailio module unfortunately is
218
-   quite high, while the options provided by the configuration file are
219
-   limited to the features implemented in the modules.
220
-
221
-   With this Perl module, you can easily implement your own Kamailio
222
-   extensions in Perl. This allows for simple access to the full world of
223
-   CPAN modules. SIP URI rewriting could be implemented based on regular
224
-   expressions; accessing arbitrary data backends, e.g. LDAP or Berkeley
225
-   DB files, is now extremely simple.
226
-
227
-2. Installing the module
228
-
229
-   This Perl module is loaded in kamailio.cfg (just like all the other
230
-   modules) with loadmodule("/path/to/perl.so");.
231
-
232
-   For the Perl module to compile, you need a reasonably recent version of
233
-   perl (tested with 5.8.8) linked dynamically. It is strongly advised to
234
-   use a threaded version. The default binary packages from your favorite
235
-   Linux distribution should work fine.
236
-
237
-   Cross compilation is supported by the Makefile. You need to set the
238
-   environment variables PERLLDOPTS, PERLCCOPTS and TYPEMAP to values
239
-   similar to the output of
240
-PERLLDOPTS: perl -MExtUtils::Embed -e ldopts
241
-PERLCCOPTS: perl -MExtUtils::Embed -e ccopts
242
-TYPEMAP:    echo "`perl -MConfig -e 'print $Config{installprivlib}'`/ExtUtils/ty
243
-pemap"
244
-
245
-   The exact position of your (precompiled!) perl libraries depends on the
246
-   setup of your environment.
247
-
248
-3. Using the module
249
-
250
-   The Perl module has two interfaces: The perl side, and the Kamailio
251
-   side. Once a Perl function is defined and loaded via the module
252
-   parameters (see below), it may be called in Kamailio's configuration at
253
-   an arbitary point. E.g., you could write a function "ldap_alias" in
254
-   Perl, and then execute
255
-...
256
-if (perl_exec("ldap_alias")) {
257
-        ...
258
-}
259
-...
260
-
261
-   just as you would have done with the current alias_db module.
262
-
263
-   The functions you can use are listed in the "Exported Functions"
264
-   section below.
265
-
266
-   On the Perl side, there are a number of functions that let you read and
267
-   modify the current SIP message, such as the RURI or the message flags.
268
-   An introduction to the Perl interface and the full reference
269
-   documentation can be found below.
270
-
271
-4. Dependencies
272
-
273
-   4.1. Kamailio Modules
274
-   4.2. External Libraries or Applications
275
-
276
-4.1. Kamailio Modules
277
-
278
-   The following modules must be loaded before this module:
279
-     * The "sl" module is needed for sending replies uppon fatal errors.
280
-       All other modules can be accessed from the Perl module, though.
281
-
282
-4.2. External Libraries or Applications
283
-
284
-   The following libraries or applications must be installed before
285
-   running Kamailio with this module loaded:
286
-     * Perl 5.8.x or later
287
-
288
-   Additionally, a number of perl modules should be installed. The
289
-   Kamailio::LDAPUtils package relies on Net::LDAP to be installed. One of
290
-   the sample scripts needs IPC::Shareable
291
-
292
-   This module has been developed and tested with Perl 5.8.8, but should
293
-   work with any 5.8.x release. Compilation is possible with 5.6.x, but
294
-   its behavior is unsupported. Earlier versions do not work.
295
-
296
-   On current Debian systems, at least the following packages should be
297
-   installed:
298
-     * perl
299
-     * perl-base
300
-     * perl-modules
301
-     * libperl5.8
302
-     * libperl-dev
303
-     * libnet-ldap-perl
304
-     * libipc-shareable-perl
305
-
306
-   It was reported that other Debian-style distributions (such as Ubuntu)
307
-   need the same packages.
308
-
309
-   On SuSE systems, at least the following packages should be installed:
310
-     * perl
311
-     * perl-ldap
312
-     * IPC::Shareable perl module from CPAN
313
-
314
-   Although SuSE delivers a lot of perl modules, others may have to be
315
-   fetched from CPAN. Consider using the program “cpan2rpm” - which, in
316
-   turn, is available on CPAN. It creates RPM files from CPAN.
317
-
318
-5. Parameters
319
-
320
-   5.1. filename (string)
321
-   5.2. modpath (string)
322
-
323
-5.1. filename (string)
324
-
325
-   This is the file name of your script. This may be set once only, but it
326
-   may include an arbitary number of functions and “use” as many Perl
327
-   module as necessary.
328
-
329
-   May not be empty!
330
-
331
-   Example 1.1. Set filename parameter
332
-...
333
-modparam("perl", "filename", "/home/test/kamailio/myperl.pl")
334
-...
335
-
336
-5.2. modpath (string)
337
-
338
-   The path to the Perl modules included (Kamailio.pm et.al). It is not
339
-   absolutely crucial to set this path, as you may install the Modules in
340
-   Perl's standard path, or update the “%INC” variable from within your
341
-   script. Using this module parameter is the standard behavior, though.
342
-   Multiple paths may be specified by separating them with a “:”
343
-   character. The maximum is 10 paths.
344
-
345
-   Example 1.2. Set modpath parameter
346
-...
347
-modparam("perl", "modpath", "/usr/local/lib/kamailio/perl/")
348
-...
349
-
350
-6. Functions
351
-
352
-   6.1. perl_exec_simple(func, [param])
353
-   6.2. perl_exec(func, [param])
354
-
355
-6.1.  perl_exec_simple(func, [param])
356
-
357
-   Calls a perl function without passing it the current SIP message. May
358
-   be used for very simple simple requests that do not have to fiddle with
359
-   the message themselves, but rather return information values about the
360
-   environment.
361
-
362
-   The first parameter is the function to be called. An arbitrary string
363
-   may optionally be passed as a parameter.
364
-
365
-   This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
366
-   ONREPLY_ROUTE and BRANCH_ROUTE.
367
-
368
-   Example 1.3. perl_exec_simple() usage
369
-...
370
-if (method=="INVITE") {
371
-        perl_exec_simple("dosomething", "on invite messages");
372
-};
373
-...
374
-
375
-6.2.  perl_exec(func, [param])
376
-
377
-   Calls a perl function with passing it the current SIP message. The SIP
378
-   message is reflected by a Perl module that gives you access to the
379
-   information in the current SIP message (Kamailio::Message).
380
-
381
-   The first parameter is the function to be called. An arbitrary string
382
-   may be passed as a parameter.
383
-
384
-   This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
385
-   ONREPLY_ROUTE and BRANCH_ROUTE.
386
-
387
-   Example 1.4. perl_exec() usage
388
-...
389
-if (perl_exec("ldapalias")) {
390
-        ...
391
-};
392
-...
393
-
394
-Chapter 2. Kamailio Perl API
395
-
396
-   Table of Contents
397
-
398
-   1. Kamailio
399
-
400
-        1.1. log(level,message)
401
-
402
-   2. Kamailio::Message
403
-
404
-        2.1. getType()
405
-        2.2. getStatus()
406
-        2.3. getReason()
407
-        2.4. getVersion()
408
-        2.5. getRURI()
409
-        2.6. getMethod()
410
-        2.7. getFullHeader()
411
-        2.8. getBody()
412
-        2.9. getMessage()
413
-        2.10. getHeader(name)
414
-        2.11. getHeaderNames()
415
-        2.12. moduleFunction(func,string1,string2)
416
-        2.13. log(level,message) (deprecated type)
417
-        2.14. rewrite_ruri(newruri)
418
-        2.15. setFlag(flag)
419
-        2.16. resetFlag(flag)
420
-        2.17. isFlagSet(flag)
421
-        2.18. pseudoVar(string)
422
-        2.19. append_branch(branch,qval)
423
-        2.20. getParsedRURI()
424
-
425
-   3. Kamailio::URI
426
-
427
-        3.1. user()
428
-        3.2. host()
429
-        3.3. passwd()
430
-        3.4. port()
431
-        3.5. params()
432
-        3.6. headers()
433
-        3.7. transport()
434
-        3.8. ttl()
435
-        3.9. user_param()
436
-        3.10. maddr()
437
-        3.11. method()
438
-        3.12. lr()
439
-        3.13. r2()
440
-        3.14. transport_val()
441
-        3.15. ttl_val()
442
-        3.16. user_param_val()
443
-        3.17. maddr_val()
444
-        3.18. method_val()
445
-        3.19. lr_val()
446
-        3.20. r2_val()
447
-
448
-   4. Kamailio::AVP
449
-
450
-        4.1. add(name,val)
451
-        4.2. get(name)
452
-        4.3. destroy(name)
453
-
454
-   5. Kamailio::Utils::PhoneNumbers
455
-
456
-        5.1.
457
-                new(publicAccessPrefix,internationalPrefix,longDistancePrefix,
458
-                countryCode,areaCode,pbxCode)
459
-
460
-        5.2. canonicalForm( number [, context] )
461
-        5.3. dialNumber( number [, context] )
462
-
463
-   6. Kamailio::LDAPUtils::LDAPConf
464
-
465
-        6.1. Constructor new()
466
-        6.2. Method base()
467
-        6.3. Method host()
468
-        6.4. Method port()
469
-        6.5. Method uri()
470
-        6.6. Method rootbindpw()
471
-        6.7. Method rootbinddn()
472
-        6.8. Method binddn()
473
-        6.9. Method bindpw()
474
-
475
-   7. Kamailio::LDAPUtils::LDAPConnection
476
-
477
-        7.1. Constructor new( [config, [authenticated]] )
478
-        7.2. Function/Method search( conf, filter, base,
479
-                [requested_attributes ...])
480
-
481
-              7.2.1. Arguments:
482
-              7.2.2. Result:
483
-
484
-   8. Kamailio::VDB
485
-   9. Kamailio::Constants
486
-   10. Kamailio::VDB::Adapter::Speeddial
487
-   11. Kamailio::VDB::Adapter::Alias
488
-
489
-        11.1. query(conds,retkeys,order)
490
-
491
-   12. Kamailio::VDB::Adapter::AccountingSIPtrace
492
-   13. Kamailio::VDB::Adapter::Describe
493
-   14. Kamailio::VDB::Adapter::Auth
494
-   15. Kamailio::VDB::ReqCond
495
-
496
-        15.1. new(key,op,type,name)
497
-        15.2. op()
498
-
499
-   16. Kamailio::VDB::Pair
500
-
501
-        16.1. new(key,type,name)
502
-        16.2. key()
503
-
504
-   17. Kamailio::VDB::VTab
505
-
506
-        17.1. new()
507
-        17.2. call(op,[args])
508
-
509
-   18. Kamailio::VDB::Value
510
-
511
-        18.1. stringification
512
-        18.2. new(type,data)
513
-        18.3. type()
514
-        18.4. data()
515
-
516
-   19. Kamailio::VDB::Column
517
-
518
-        19.1. Stringification
519
-        19.2. new(type,name)
520
-        19.3. type( )
521
-        19.4. name()
522
-        19.5. Kamailio::VDB::Result
523
-        19.6. new(coldefs,[row, row, ...])
524
-        19.7. coldefs()
525
-        19.8. rows()
526
-
527
-1. Kamailio
528
-
529
-   1.1. log(level,message)
530
-
531
-   This module provides access to a limited number of Kamailio core
532
-   functions. As the most interesting functions deal with SIP messages,
533
-   they are located in the Kamailio::Message class below.
534
-
535
-1.1. log(level,message)
536
-
537
-   Logs the message with Kamailio's logging facility. The logging level is
538
-   one of the following:
539
-* L_ALERT
540
-* L_CRIT
541
-* L_ERR
542
-* L_WARN
543
-* L_NOTICE
544
-* L_INFO
545
-* L_DBG
546
-
547
-   Please note that this method is NOT automatically exported, as it
548
-   collides with the perl function log (which calculates the logarithm).
549
-   Either explicitly import the function (via use Kamailio qw ( log );),
550
-   or call it with its full name:
551
-Kamailio::log(L_INFO, "foobar");
552
-
553
-2. Kamailio::Message
554
-
555
-   2.1. getType()
556
-   2.2. getStatus()
557
-   2.3. getReason()
558
-   2.4. getVersion()
559
-   2.5. getRURI()
560
-   2.6. getMethod()
561
-   2.7. getFullHeader()
562
-   2.8. getBody()
563
-   2.9. getMessage()
564
-   2.10. getHeader(name)
565
-   2.11. getHeaderNames()
566
-   2.12. moduleFunction(func,string1,string2)
567
-   2.13. log(level,message) (deprecated type)
568
-   2.14. rewrite_ruri(newruri)
569
-   2.15. setFlag(flag)
570
-   2.16. resetFlag(flag)
571
-   2.17. isFlagSet(flag)
572
-   2.18. pseudoVar(string)
573
-   2.19. append_branch(branch,qval)
574
-   2.20. getParsedRURI()
575
-
576
-   This package provides access functions for an Kamailio sip_msg
577
-   structure and its sub-components. Through its means it is possible to
578
-   fully configure alternative routing decisions.
579
-
580
-2.1. getType()
581
-
582
-   Returns one of the constants SIP_REQUEST, SIP_REPLY, SIP_INVALID
583
-   stating the type of the current message.
584
-
585
-2.2. getStatus()
586
-
587
-   Returns the status code of the current Reply message. This function is
588
-   invalid in Request context!
589
-
590
-2.3. getReason()
591
-
592
-   Returns the reason of the current Reply message. This function is
593
-   invalid in Request context!
594
-
595
-2.4. getVersion()
596
-
597
-   Returns the version string of the current SIP message.
598
-
599
-2.5. getRURI()
600
-
601
-   This function returns the recipient URI of the present SIP message:
602
-
603
-   my $ruri = $m->getRURI();
604
-
605
-   getRURI returns a string. See “getParsedRURI()” below how to receive a
606
-   parsed structure.
607
-
608
-   This function is valid in request messages only.
609
-
610
-2.6. getMethod()
611
-
612
-   Returns the current method, such as INVITE, REGISTER, ACK and so on.
613
-
614
-   my $method = $m->getMethod();
615
-
616
-   This function is valid in request messages only.
617
-
618
-2.7. getFullHeader()
619
-
620
-   Returns the full message header as present in the current message. You
621
-   might use this header to further work with it with your favorite MIME
622
-   package.
623
-
624
-   my $hdr = $m->getFullHeader();
625
-
626
-2.8. getBody()
627
-
628
-   Returns the message body.
629
-
630
-2.9. getMessage()
631
-
632
-   Returns the whole message including headers and body.
633
-
634
-2.10. getHeader(name)
635
-
636
-   Returns the body of the first message header with this name.
637
-
638
-   print $m->getHeader("To");
639
-
640
-   "John" <sip:john@doe.example>
641
-
642
-2.11. getHeaderNames()
643
-
644
-   Returns an array of all header names. Duplicates possible!
645
-
646
-2.12. moduleFunction(func,string1,string2)
647
-
648
-   Search for an arbitrary function in module exports and call it with the
649
-   parameters self, string1, string2.
650
-
651
-   string1 and/or string2 may be omitted.
652
-
653
-   As this function provides access to the functions that are exported to
654
-   the Kamailio configuration file, it is autoloaded for unknown
655
-   functions. Instead of writing
656
-$m->moduleFunction("sl_send_reply", "500", "Internal Error");
657
-$m->moduleFunction("xlog", "L_INFO", "foo");
658
-
659
-   you may as well write
660
-$m->sl_send_reply("500", "Internal Error");
661
-$m->xlog("L_INFO", "foo");
662
-
663
-   WARNING
664
-
665
-   In Kamailio 1.2, only a limited subset of module functions is
666
-   available. This restriction will be removed in a later version.
667
-
668
-   Here is a list of functions that are expected to be working (not
669
-   claiming completeness):
670
-* alias_db_lookup
671
-* consume_credentials
672
-* is_rpid_user_e164
673
-* append_rpid_hf
674
-* bind_auth
675
-* avp_print
676
-* cpl_process_register
677
-* cpl_process_register_norpl
678
-* load_dlg
679
-* ds_next_dst
680
-* ds_next_domain
681
-* ds_mark_dst
682
-* ds_mark_dst
683
-* is_from_local
684
-* is_uri_host_local
685
-* dp_can_connect
686
-* dp_apply_policy
687
-* enum_query (without parameters)
688
-* enum_fquery (without parameters)
689
-* is_from_user_enum (without parameters)
690
-* i_enum_query (without parameters)
691
-* imc_manager
692
-* jab_* (all functions from the jabber module)
693
-* load_gws (without parameters)
694
-* next_gw
695
-* from_gw (without parameters)
696
-* to_gw (without parameters)
697
-* load_contacts
698
-* next_contacts
699
-* sdp_mangle_ip
700
-* sdp_mangle_port
701
-* encode_contact
702
-* decode_contact
703
-* decode_contact_header
704
-* fix_contact
705
-* use_media_proxy
706
-* end_media_session
707
-* m_store
708
-* m_dump
709
-* fix_nated_contact
710
-* unforce_rtp_proxy
711
-* force_rtp_proxy
712
-* fix_nated_register
713
-* add_rcv_param
714
-* options_reply
715
-* checkospheader
716
-* validateospheader
717
-* requestosprouting
718
-* checkosproute
719
-* prepareosproute
720
-* prepareallosproutes
721
-* checkcallingtranslation
722
-* reportospusage
723
-* mangle_pidf
724
-* mangle_message_cpim
725
-* add_path (without parameters)
726
-* add_path_received (without parameters)
727
-* prefix2domain
728
-* allow_routing (without parameters)
729
-* allow_trusted
730
-* pike_check_req
731
-* handle_publish
732
-* handle_subscribe
733
-* stored_pres_info
734
-* bind_pua
735
-* send_publish
736
-* send_subscribe
737
-* pua_set_publish
738
-* loose_route
739
-* record_route
740
-* load_rr
741
-* sip_trace
742
-* sl_reply_error
743
-* sms_send_msg
744
-* sd_lookup
745
-* sstCheckMin
746
-* append_time
747
-* has_body (without parameters)
748
-* is_peer_verified
749
-* t_newtran
750
-* t_release
751
-* t_relay (without parameters)
752
-* t_flush_flags
753
-* t_check_trans
754
-* t_was_cancelled
755
-* t_load_contacts
756
-* t_next_contacts
757
-* uac_restore_from
758
-* uac_auth
759
-* has_totag
760
-* tel2sip
761
-* check_to
762
-* check_from
763
-* radius_does_uri_exist
764
-* ul_* (All functions exported by the usrloc module for user access)
765
-* xmpp_send_message
766
-
767
-2.13. log(level,message) (deprecated type)
768
-
769
-   Logs the message with Kamailio's logging facility. The logging level is
770
-   one of the following:
771
-* L_ALERT
772
-* L_CRIT
773
-* L_ERR
774
-* L_WARN
775
-* L_NOTICE
776
-* L_INFO
777
-* L_DBG
778
-
779
-   The logging function should be accessed via the Kamailio module
780
-   variant. This one, located in Kamailio::Message, is deprecated.
781
-
782
-2.14. rewrite_ruri(newruri)
783
-
784
-   Sets a new destination (recipient) URI. Useful for rerouting the
785
-   current message/call.
786
-if ($m->getRURI() =~ m/\@somedomain.net/) {
787
-  $m->rewrite_ruri("sip:dispatcher\@organization.net");
788
-}
789
-
790
-2.15. setFlag(flag)
791
-
792
-   Sets a message flag. The constants as known from the C API may be used,
793
-   when Constants.pm is included.
794
-
795
-2.16. resetFlag(flag)
796
-
797
-   Resets a message flag.
798
-
799
-2.17. isFlagSet(flag)
800
-
801
-   Returns whether a message flag is set or not.
802
-
803
-2.18. pseudoVar(string)
804
-
805
-   Returns a new string where all pseudo variables are substituted by
806
-   their values. Can be used to receive the values of single variables,
807
-   too.
808
-
809
-   Please remember that you need to escape the '$' sign in perl strings!
810
-
811
-2.19. append_branch(branch,qval)
812
-
813
-   Append a branch to current message.
814
-
815
-2.20. getParsedRURI()
816
-
817
-   Returns the current destination URI as an Kamailio::URI object.
818
-
819
-3. Kamailio::URI
820
-
821
-   3.1. user()
822
-   3.2. host()
823
-   3.3. passwd()
824
-   3.4. port()
825
-   3.5. params()
826
-   3.6. headers()
827
-   3.7. transport()
828
-   3.8. ttl()
829
-   3.9. user_param()
830
-   3.10. maddr()
831
-   3.11. method()
832
-   3.12. lr()
833
-   3.13. r2()
834
-   3.14. transport_val()
835
-   3.15. ttl_val()
836
-   3.16. user_param_val()
837
-   3.17. maddr_val()
838
-   3.18. method_val()
839
-   3.19. lr_val()
840
-   3.20. r2_val()
841
-
842
-   This package provides functions for access to sip_uri structures.
843
-
844
-3.1. user()
845
-
846
-   Returns the user part of this URI.
847
-
848
-3.2. host()
849
-
850
-   Returns the host part of this URI.
851
-
852
-3.3. passwd()
853
-
854
-   Returns the passwd part of this URI.
855
-
856
-3.4. port()
857
-
858
-   Returns the port part of this URI.
859
-
860
-3.5. params()
861
-
862
-   Returns the params part of this URI.
863
-
864
-3.6. headers()
865
-
866
-   Returns the headers part of this URI.
867
-
868
-3.7. transport()
869
-
870
-   Returns the transport part of this URI.
871
-
872
-3.8. ttl()
873
-
874
-   Returns the ttl part of this URI.
875
-
876
-3.9. user_param()
877
-
878
-   Returns the user_param part of this URI.
879
-
880
-3.10. maddr()
881
-
882
-   Returns the maddr part of this URI.
883
-
884
-3.11. method()
885
-
886
-   Returns the method part of this URI.
887
-
888
-3.12. lr()
889
-
890
-   Returns the lr part of this URI.
891
-
892
-3.13. r2()
893
-
894
-   Returns the r2 part of this URI.
895
-
896
-3.14. transport_val()
897
-
898
-   Returns the transport_val part of this URI.
899
-
900
-3.15. ttl_val()
901
-
902
-   Returns the ttl_val part of this URI.
903
-
904
-3.16. user_param_val()
905
-
906
-   Returns the user_param_val part of this URI.