User Tools

Site Tools


cookbooks:devel:pseudovariables

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
cookbooks:devel:pseudovariables [2021/06/23 13:06]
s.safarov_gmail.com
cookbooks:devel:pseudovariables [2021/11/25 19:57]
miconda [$tls(key)]
Line 1161: Line 1161:
 </code> </code>
  
-==== $rpl(key) ====+===== $rpl(key) =====
  
 Attributes of the SIP reply processed at that moment. The variables must be used during SIP reply processing, otherwise it returns $null. Attributes of the SIP reply processed at that moment. The variables must be used during SIP reply processing, otherwise it returns $null.
Line 1181: Line 1181:
 } }
 </code> </code>
 +
 +===== $msgbuf(index) =====
 +
 +Get or set the character in the message buffer at the position index.
 +
 +The index has to be a positive integer or a variable holding such value.
 +
 +Note that the variable returns a clone of the character stored in a static buffer, copy it to another variable if you want to compare with another $msgbuf(index).
 +
 +The update is done directly and immediately in the message buffer -- use it with care!
 +
 +Example of usage:
 +
 +<code c>
 +if ($msgbuf(20)=="V") {
 +    $msgbuf(20) = "v";
 +}
 +</code>
 +===== Header Field Iterator =====
 +
 +==== $hfitname(iname) ====
 +
 +The header name of the header field iterator.
 +
 +Example:
 +
 +<code c>
 +    hf_iterator_start("i1");
 +    while(hf_iterator_next("i1")) {
 +        xlog("hdr[$hfitname(i1)] is: $hfitbody(i1)\n");
 +    }
 +    hf_iterator_end("i1");
 +</code>
 +
 +==== $hfitbody(iname) ====
 +
 +The header body of the header field iterator.
 +
 +Example:
 +
 +<code c>
 +    hf_iterator_start("i1");
 +    while(hf_iterator_next("i1")) {
 +        xlog("hdr[$hfitname(i1)] is: $hfitbody(i1)\n");
 +    }
 +    hf_iterator_end("i1");
 +</code>
 +
 +===== Body Line Iterator =====
 +
 +==== $blitval(iname) ====
 +
 +The value of the body line iterator.
 +
 +Example:
 +
 +<code c>
 +    bl_iterator_start("b1");
 +    while(bl_iterator_next("b1")) {
 +        xlog("body line: $blitval(b1)");
 +    }
 +    bl_iterator_end("b1");
 +</code>
 +
  
 ===== Send Data Attributes ===== ===== Send Data Attributes =====
Line 1992: Line 2056:
  
 ===== TLS Module ===== ===== TLS Module =====
 +
 +==== $tls(key) ====
 +
 +Variables related to TLS communication and certificates.
 +
 +The **key** can be:
 +
 +  * **m_issuer_line** - return local (my) certificate issuer line
 +  * **p_issuer_line** - return remote (peer) certificate issuer line
 +  * **m_subject_line** - return local (my) certificate subject line
 +  * **p_subject_line** - return remote (peer) certificate subject line
 +
 +Example:
 +
 +<code c>
 +if(proto==TLS) {
 +    xinfo("local certificate subject: $tls(m_subject_line)\n");
 +}
 +</code>
  
 ==== $tls_version ==== ==== $tls_version ====
 +
 The TLS/SSL version which is used on the TLS connection from which the message was received. String type. The TLS/SSL version which is used on the TLS connection from which the message was received. String type.
 ==== $tls_description ==== ==== $tls_description ====
Line 2131: Line 2215:
   * $msg(hdrs) - sip message headers   * $msg(hdrs) - sip message headers
   * $msg(fline) - sip message first line   * $msg(fline) - sip message first line
 +
 +===== POSOPS Module =====
 +
 +==== $pos(key) ====
 +
 +Get attributes after a function of the module is executed.
 +
 +The key can be:
 +
 +  * ret - the return code on success or -1
 +  * idx - position inside message buffer, for find/search it is the start of matching
 +  * len - the length of matching string for search functions
  
 ===== XHTTP Module ===== ===== XHTTP Module =====
Line 2330: Line 2426:
   * 2 charge   * 2 charge
   * 3 spare   * 3 spare
 +
 +
 +==== $sipt(redirection_info) / $sipt_redirection_info ===
 +Returns the value of the Redirecting reason of the Call Diversion Information header from ISUP. 
 +Returns -1 if there is a parsing error or if the Call Diversion Information is not present.
 +
 +Can return the following values:
 +
 +  * 0 Unknown
 +  * 1 User busy
 +  * 2 no reply
 +  * 3 unconditional
 +  * 4 deflection during alerting
 +  * 5 deflection immediate response
 +  * 6 mobile subscriber not reachable
 +
 +
 +==== $sipt(redirection_number) / $sipt_redirection_number ===
 +Returns the value (Address signal) of the Redirection Number.
 +Returns -1 if there is a parsing error or if the Redirection Number is not present.
 +
 +Example:
 +<code c>
 +# get the redirection number
 +$avp(s:redir_num) = $sipt(redirection_number);
 +</code>
 +
 +
 +==== $sipt(redirection_number.nai) / $sipt_redirection_number_nai ===
 +Returns the value of the Nature of Address Indicator of the Redirection Number. Returns -1 if there is a parsing error or if the Redirection Number is not present.
 +
 +Can return the following values:
 +
 +  * 0 Spare
 +  * 1 Subscriber Number (national use)
 +  * 2 Unknown (national use)
 +  * 3 National (significant) number
 +  * 4 International use
 +
 +
 +==== $sipt(calling_party_number) ===
 +Returns the value (Address signal) of the Calling Party for the IAM message.
 +Returns -1 if there is a parsing error or if the Calling Party Number is not present.
 +
 +
 +==== $sipt(called_party_number) ===
 +Returns the value (Address signal) of the Called Party for the IAM message.
 +Returns -1 if there is a parsing error or if the Called Party Number is not present.
 +
 +
 +==== $sipt(sipt_redirection_information_reason) ===
 +Returns the value of the Redirection reason of the Redirection information header from ISUP. 
 +Returns -1 if there is a parsing error or if the Redirection information is not present.
 +
 +
 +==== $sipt(sipt_redirection_information_original_reason) ===
 +Returns the value of the Original Redirection reason of the Redirection information header from ISUP. 
 +Returns -1 if there is a parsing error or if the Redirection information is not present.
 +
 +
 +==== $sipt(redirecting_number.nai) ===
 +Returns the value of the Nature of Address Indicator of the Redirecting Number. Returns -1 if there is a parsing error or if the Redirecting Number is not present.
 +
 +Can return the following values:
 +
 +  * 0 Spare
 +  * 1 Subscriber Number (national use)
 +  * 2 Unknown (national use)
 +  * 3 National (significant) number
 +  * 4 International use
 +
 +
 +==== $sipt(redirecting_number) ===
 +Returns the value (Address signal) of the Redirecting Number for the IAM message.
 +Returns -1 if there is a parsing error or if the Redirecting Number is not present.
 +
 +
 +==== $sipt(original_called_number.nai) ===
 +Returns the value of the Nature of Address Indicator of the Original Called Number. Returns -1 if there is a parsing error or if the Original Called Number is not present.
 +
 +Can return the following values:
 +
 +  * 0 Spare
 +  * 1 Subscriber Number (national use)
 +  * 2 Unknown (national use)
 +  * 3 National (significant) number
 +  * 4 International use
 +
 +
 +==== $sipt(original_called_number) ===
 +Returns the value (Address signal) of the Original Called Number for the IAM message.
 +Returns -1 if there is a parsing error or if the Original Called Number is not present.
 +
 +
 +==== $sipt(generic_number.nai) ===
 +Returns the value of the Nature of Address Indicator of the Generic Number. Returns -1 if there is a parsing error or if the Generic Number is not present.
 +
 +Can return the following values:
 +
 +  * 0 Spare
 +  * 1 Subscriber Number (national use)
 +  * 2 Unknown (national use)
 +  * 3 National (significant) number
 +  * 4 International use
 +
 +
 +==== $sipt(generic_number) ===
 +Returns the value (Address signal) of the Generic Number for the IAM message.
 +Returns -1 if there is a parsing error or if the Generic Number is not present.
  
  
Line 2507: Line 2712:
   * $ltt(x) - $ltt(t) if the transaction was created already, otherwise $ltt(s)   * $ltt(x) - $ltt(t) if the transaction was created already, otherwise $ltt(s)
  
 +===== $via0(attr) - Via[0] Attributes =====
 +
 +$via0(attr) - attributes of first Via header.
 +
 +The attr can be:
 +
 +  * host - host part (string)
 +  * port - port (number)
 +  * proto - protocol - transport part (string)
 +  * protoid - protocol id (integer id)
 +  * branch - branch parameter
 +  * rport - rport parameter value (string)
 +  * received - received parameter value (string)
 +  * i - i parameter value (string)
 +
 +===== $via1(attr) - Second Via Attributes =====
 +
 +$via1(attr) - attributes of second Via header. The attr can be the same as for $via0(attr).
 +
 +===== $viaZ(attr) - Last Via Attributes =====
 +
 +$viaZ(attr) - attributes of last Via header. The attr can be the same as for $via0(attr).
 ===== tcpops module variable ===== ===== tcpops module variable =====
  
cookbooks/devel/pseudovariables.txt ยท Last modified: 2022/04/11 15:24 by henningw