Table of Contents
pos_append(idx, val)
pos_insert(idx, val)
pos_rm(idx, len)
pos_set_char(idx, val)
pos_headers_start()
pos_headers_end()
pos_body_start()
pos_body_end()
pos_find_str(idx, val)
pos_findi_str(idx, val)
pos_rfind_str(idx, val)
pos_rfindi_str(idx, val)
pos_search(idx, re)
pos_rsearch(idx, re)
List of Examples
idx0
parameterpos_append()
usagepos_insert()
usagepos_rm()
usagepos_set_char()
usagepos_headers_start()
usagepos_headers_end()
usagepos_body_start()
usagepos_body_end()
usagepos_find_str()
usagepos_findi_str()
usagepos_find_str()
usagepos_rfindi_str()
usagepos_search()
usagepos_rsearch()
usageTable of Contents
pos_append(idx, val)
pos_insert(idx, val)
pos_rm(idx, len)
pos_set_char(idx, val)
pos_headers_start()
pos_headers_end()
pos_body_start()
pos_body_end()
pos_find_str(idx, val)
pos_findi_str(idx, val)
pos_rfind_str(idx, val)
pos_rfindi_str(idx, val)
pos_search(idx, re)
pos_rsearch(idx, re)
The module exports utility functions to work with position inside the SIP message buffer.
Among them are function to add or remove content at a specific position.
The following modules must be installed (but not loaded) to use this module:
none.
Append the value val after the position idx in the SIP message buffer.
The idx can be an integer value or a variable holding an integer. If the value is negative, the position is counted from the end of the buffer.
The val can be a static string or variables.
This function can be used from ANY_ROUTE.
Insert the value val at the position idx in the SIP message buffer.
The idx can be an integer value or a variable holding an integer. If the value is negative, the position is counted from the end of the buffer.
The val can be a static string or variables.
This function can be used from ANY_ROUTE.
Remove len characters starting at the position idx in the SIP message buffer.
The idx can be an integer value or a variable holding an integer. If the value is negative, the position is counted from the end of the buffer.
The idx can be a positive integer value or a variable holding a positive integer.
This function can be used from ANY_ROUTE.
Set the char at position index to first character in val.
Important: it changes the character directly in the SIP message buffer, the update being immediately visible.
The idx can be an integer value or a variable holding an integer. If the value is negative, the position is counted from the end of the buffer.
The val can be a static string or variables.
This function can be used from ANY_ROUTE.
Return the position in the message buffer where headers start.
This function can be used from ANY_ROUTE.
Return the position in the message buffer where headers end.
This function can be used from ANY_ROUTE.
Return the position in the message buffer where body starts.
This function can be used from ANY_ROUTE.
Return the position in the message buffer where body ends.
This function can be used from ANY_ROUTE.
Return the position of the val in message buffer starting at idx. In case of not finding it or error, the return code is negative. If val is at index 0, it returns the value specified by modparam idx0.
The idx can be an integer value or a variable holding an integer. If the value is negative, the position is counted from the end of the buffer.
The val can be a static string or variables.
This function can be used from ANY_ROUTE.
Return the position of the val (matching case insensitive) in message buffer starting at idx. In case of not finding it or error, the return code is negative. If val is at index 0, it returns the value specified by modparam idx0.
The idx can be an integer value or a variable holding an integer. If the value is negative, the position is counted from the end of the buffer.
The val can be a static string or variables.
This function can be used from ANY_ROUTE.
Return the last position of the val in message buffer starting at idx (reverse search). In case of not finding it or error, the return code is negative. If val is at index 0, it returns the value specified by modparam idx0.
The idx can be an integer value or a variable holding an integer. If the value is negative, the position is counted from the end of the buffer.
The val can be a static string or variables.
This function can be used from ANY_ROUTE.
Return the last position of the val (matching case insensitive) in message buffer starting at idx (reverse search). In case of not finding it or error, the return code is negative. If val is at index 0, it returns the value specified by modparam idx0.
The idx can be an integer value or a variable holding an integer. If the value is negative, the position is counted from the end of the buffer.
The val can be a static string or variables.
This function can be used from ANY_ROUTE.
Return the position that starts matching the regular expression re in message buffer starting at idx. In case of not finding it or error, the return code is negative. If val is at index 0, it returns the value specified by modparam idx0.
The idx can be an integer value or a variable holding an integer. If the value is negative, the position is counted from the end of the buffer.
The re can be a static regular expression string.
This function can be used from ANY_ROUTE.
Return the position of last match that starts matching the regular expression re in message buffer starting at idx. In case of not finding it or error, the return code is negative. If val is at index 0, it returns the value specified by modparam idx0.
The idx can be an integer value or a variable holding an integer. If the value is negative, the position is counted from the end of the buffer.
The re can be a static regular expression string.
This function can be used from ANY_ROUTE.