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 [2018/09/25 08:45] miconda [$redisd(key)] |
cookbooks:devel:pseudovariables [2019/09/06 09:28] henningw [$Au - Acc username and realm/domain] |
||
---|---|---|---|
Line 1: | Line 1: | ||
{{ : | {{ : | ||
- | ====== Kamailio SIP Server v5.2.x (devel): Pseudo-Variables ====== | + | ====== Kamailio SIP Server v5.3.x (devel): Pseudo-Variables ====== |
===== Introduction ===== | ===== Introduction ===== | ||
Line 76: | Line 76: | ||
**$aU** - whole username from Authorization or Proxy-Authorization header | **$aU** - whole username from Authorization or Proxy-Authorization header | ||
- | ==== $Au - Acc username ==== | + | ==== $Au - Acc username |
- | **$Au** - username for accounting purposes. It's a selective pseudo variable (inherited from acc module). It returns auth username ($au) if exists or From username | + | **$Au** - username for accounting purposes. It's a selective pseudo variable (inherited from acc module). It returns |
+ | ==== $AU - Acc username ==== | ||
+ | **$AU** - username for accounting purposes. It's a selective pseudo variable (inherited from acc module). It returns the auth username ($au) if exists or From user ($fU) otherwise. | ||
==== $branch(name) - Branch attributes ==== | ==== $branch(name) - Branch attributes ==== | ||
Line 225: | Line 227: | ||
If loose_route() returns TRUE a destination uri is set according to the first Route header. | If loose_route() returns TRUE a destination uri is set according to the first Route header. | ||
- | $du is also set if lookup() function of ' | + | $du is also set if lookup() function of ' |
- | set $du to any SIP URI. | + | if you use the path functionality. The function handle_ruri_alias() from the nathelper |
+ | module will also set it. You can set $du to any SIP URI. | ||
| | ||
| | ||
Line 278: | Line 281: | ||
**$mb** - reference to SIP message buffer | **$mb** - reference to SIP message buffer | ||
+ | |||
+ | ==== $mbu - updated SIP message buffer ==== | ||
+ | |||
+ | **$mbu** - reference to updated SIP message buffer, after applying changes | ||
==== $mf - Flags ==== | ==== $mf - Flags ==== | ||
Line 915: | Line 922: | ||
} | } | ||
</ | </ | ||
- | ===== Send Address | + | ===== Received Data Attributes ===== |
+ | |||
+ | ==== $rcv(key) ==== | ||
+ | |||
+ | Attributes of received data. The variables must be used inside **event_route[core: | ||
+ | |||
+ | The key can be: | ||
+ | |||
+ | * buf - received message | ||
+ | * len - lenght of received message | ||
+ | * srcip - source ip | ||
+ | * rcvip - local ip where it was received | ||
+ | * scrport - source port | ||
+ | * rcvport - local port where it was received | ||
+ | * proto - protocol as int id | ||
+ | * sproto - protocol as string | ||
+ | * af - address family | ||
+ | |||
+ | Example of usage: | ||
+ | |||
+ | <code c> | ||
+ | event_route[core: | ||
+ | xlog(" | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ===== Send Data Attributes ===== | ||
==== $sndfrom(name) ==== | ==== $sndfrom(name) ==== | ||
Line 934: | Line 967: | ||
* af - address family to be used to send (numeric) | * af - address family to be used to send (numeric) | ||
* port - port of destination address | * port - port of destination address | ||
- | * proto - transport protocol to be used to send (numeric) | + | * proto - transport protocol to be used to send (numeric |
* sproto - transport protocol to be used to send (string) | * sproto - transport protocol to be used to send (string) | ||
* buf - entire send buffer as string | * buf - entire send buffer as string | ||
Line 1490: | Line 1523: | ||
==== $TV(name) ==== | ==== $TV(name) ==== | ||
- | Seconds and microseconds taken from struct timeval. | + | Seconds and microseconds taken from struct timeval. The time at that moment is represented by **seconds.microseconds**. |
* $TV(s) - seconds (cached at first call per sip message) | * $TV(s) - seconds (cached at first call per sip message) | ||
* $TV(u) - microseconds (cached at first call per sip message) | * $TV(u) - microseconds (cached at first call per sip message) | ||
- | * $TV(sn) - seconds (not cached) | + | * $TV(sn) - seconds (not cached, taken at that moment) |
- | * $TV(un) - microseconds (not cached) | + | * $TV(un) - microseconds (corresponding to the moment $TV(sn) is retrieved) |
- | * $TV(Sn) - string representation seconds.microseconds (not cached) | + | * $TV(Sn) - string representation seconds.microseconds (not cached, taken at that moment) |
===== Next hop address ===== | ===== Next hop address ===== | ||
Line 1667: | Line 1699: | ||
==== $tls_peer_subject_unit ==== | ==== $tls_peer_subject_unit ==== | ||
organizationalUnitName in the subject section of the certificate. String type. | organizationalUnitName in the subject section of the certificate. String type. | ||
+ | ==== $tls_peer_subject_uid ==== | ||
+ | UID in the subject section of the certificate. String type. | ||
==== $tls_peer_issuer_unit ==== | ==== $tls_peer_issuer_unit ==== | ||
organizationalUnitName in the issuer section of the certificate. String type. | organizationalUnitName in the issuer section of the certificate. String type. | ||
==== $tls_my_subject_unit ==== | ==== $tls_my_subject_unit ==== | ||
organizationalUnitName in the subject section of the certificate. String type. | organizationalUnitName in the subject section of the certificate. String type. | ||
+ | ==== $tls_my_subject_uid ==== | ||
+ | UID in the subject section of the certificate. String type. | ||
==== $tls_my_issuer_unit ==== | ==== $tls_my_issuer_unit ==== | ||
organizationalUnitName in the issuer section of the certificate. String type. | organizationalUnitName in the issuer section of the certificate. String type. | ||
Line 2064: | Line 2100: | ||
</ | </ | ||
+ | |||
+ | ===== sdpops module variables ===== | ||
+ | |||
+ | * $sdp(body) - full SDP body (read only) | ||
+ | * $sdp(sess_version) - sess-version -attribute from SDP o= -line. When set to special value -1, current value is incremented. (read + write) | ||
+ | |||
+ | ===== $sruid - Unique ID ===== | ||
+ | |||
+ | * $sruid - return unique ID generated internally Kamailio | ||
+ | |||
+ | ===== $ltt(key) - Local To-Tag ===== | ||
+ | |||
+ | $ltt(key) - return local generated To-tag when Kamailio sends a reply | ||
+ | |||
+ | * $ltt(s) - the to-tag used in stateless replies | ||
+ | * $ltt(t) - the to-tag used in transaction stateful replies (transaction has to be created at that time, eg., by t_newtran() or in a branch/ | ||
+ | * $ltt(x) - $ltt(t) if the transaction was created already, otherwise $ltt(s) | ||
===== $C(xy) - Foreground and background colors ===== | ===== $C(xy) - Foreground and background colors ===== | ||