Dialog variables and flags

OpenSIPS has several types of variables and vectors. Each type of variable has a different scope. Note that PV has the scope of a process and AVP has the scope of a transaction. Thus, if you need a variable that is capable to persist the whole duration of the call from the first INVITE to the end BYE, you will need dialog variables. You can also use flags, which are simpler.

There are strict rules with regard to the dialog variables. You can set a dialog variable after creating a dialog in the initial request. You can only read a dialog variable after a dialog matching command such as loose_route() or match_dialog().

Setting and reading the dialog variables

To attach a value to a dialog, you can use the store_dlg_value(name,val) ...

Get Building Telephony Systems with OpenSIPS - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.