This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
cookbooks:devel:pseudovariables [2017/07/31 10:15] mslehto [$rv - SIP message version] |
cookbooks:devel:pseudovariables [2018/04/10 13:31] miconda [$Rut - Received socket URI] |
||
---|---|---|---|
Line 1: | Line 1: | ||
{{ : | {{ : | ||
- | ====== Kamailio SIP Server v5.1.x (devel): Pseudo-Variables ====== | + | ====== Kamailio SIP Server v5.2.x (devel): Pseudo-Variables ====== |
===== Introduction ===== | ===== Introduction ===== | ||
Line 170: | Line 170: | ||
**$conid** - The TCP connection ID of the connection the current message arrived on for TCP, TLS, WS, and WSS. Set to $null for SCTP and UDP. | **$conid** - The TCP connection ID of the connection the current message arrived on for TCP, TLS, WS, and WSS. Set to $null for SCTP and UDP. | ||
- | ==== $cs - CSeq ==== | + | ==== $cs - CSeq Number |
- | **$cs** - reference to the sequence number in the cseq header. The method in the CSeq header is identical to the request method, thus use $rm to get the method (works also for responses). | + | **$cs** - reference to the sequence number in the CSeq header. The method in the CSeq header is identical to the request method, thus use $rm to get the method (works also for responses). |
+ | ==== $csb - CSeq Header Body ==== | ||
+ | |||
+ | **$csb** - reference to the CSeq header body (number method). | ||
==== $ct - Contact header ==== | ==== $ct - Contact header ==== | ||
Line 333: | Line 336: | ||
**$pp** - reference to process id (pid) | **$pp** - reference to process id (pid) | ||
- | ==== $pr - Protocol of received message ==== | + | ==== $pr or $proto |
**$pr** or **$proto** - protocol of received message (udp, tcp, tls, sctp, ws, wss) | **$pr** or **$proto** - protocol of received message (udp, tcp, tls, sctp, ws, wss) | ||
+ | ==== $prid - protocol id ==== | ||
+ | |||
+ | **$prid** - internal protocol id | ||
+ | |||
+ | * 0 - NONE | ||
+ | * 1 - UDP | ||
+ | * 2 - TCP | ||
+ | * 3 - TLS | ||
+ | * 4 - SCTP | ||
+ | * 5 - WS | ||
+ | * 6 - WSS | ||
+ | * 7 - OTHER | ||
==== $pU - User in P-Preferred-Identity header URI ==== | ==== $pU - User in P-Preferred-Identity header URI ==== | ||
Line 475: | Line 490: | ||
**$Rut** - local socket where the SIP messages was received in URI format, always with transport parameter. | **$Rut** - local socket where the SIP messages was received in URI format, always with transport parameter. | ||
+ | ==== $sas - Source address in socket format ==== | ||
+ | |||
+ | **$sas** - get source address in socket format (proto: | ||
==== $sbranch(attr) - Static Branch ==== | ==== $sbranch(attr) - Static Branch ==== | ||
Line 1376: | Line 1394: | ||
* id_index_n - return the internal index of current transaction, | * id_index_n - return the internal index of current transaction, | ||
* id_label_n - return the internal label of current transaction, | * id_label_n - return the internal label of current transaction, | ||
- | * reply_code - alias to $T_reply_code | + | * reply_code - reply code (alias to $T_reply_code) |
- | * branch_index - alias to $T_branch_idx | + | * reply_reason - reply reason |
+ | * reply_last - last received reply code | ||
+ | * branch_index - branch index (alias to $T_branch_idx) | ||
* ruid - return the internal location ruid field for current branch | * ruid - return the internal location ruid field for current branch | ||
* reply_type - 1 if it is a local generated reply, 0 - if no reply for transaction or it is a received reply | * reply_type - 1 if it is a local generated reply, 0 - if no reply for transaction or it is a received reply | ||
Line 1964: | Line 1984: | ||
* 0x000 - HEP attribute 0x000 | * 0x000 - HEP attribute 0x000 | ||
* 0x999 - HEP attribute 0x999 | * 0x999 - HEP attribute 0x999 | ||
+ | |||
+ | ===== $phn(rid=> | ||
+ | |||
+ | $phn(rid=> | ||
+ | |||
+ | * number - phone number that is matched | ||
+ | * valid - 1 if the matched number has a valid result; 0 otherwise | ||
+ | * normalized - normalized phone number | ||
+ | * cctel - country code for phone number | ||
+ | * ltype - local network type | ||
+ | * ndesc - phone number description | ||
+ | * error - error string if phone number matching fails. | ||
+ | |||
+ | <code c> | ||
+ | if(phonenum_match(" | ||
+ | if($phn(src=> | ||
+ | xlog(" | ||
+ | } else { | ||
+ | xlog(" | ||
+ | } | ||
+ | } | ||
+ | </ | ||
===== $C(xy) - Foreground and background colors ===== | ===== $C(xy) - Foreground and background colors ===== |