Hi,
The dialog module from OpenSIPS 1.5 provides now new features, like the
possibility to have flags and attributes persistent across the entire dialog.
These flags and attributes can be operated during the whole dialog life.
They can be used to store information across the dialog, without relying on the
SIP signalling itself (like storing info in RR headers, or contact, etc). When
processing the original INVITE, you can store in the dialog all the info you
learned and use it later at re-INVITEs or BYE requests. Information like NAT
status, accounting type, uids of involved parties, etc.
1) dialog persistent flags
Available functions:
- set_dlg_flag("n");
- reset_dlg_flag("n");
- is_dlg_flag_set("n");
Available PVs:
- $DLG_flags (can be used directly from script via bitwise ops)
2) dialog persistent attributes. These attribute are visible for all the
requests that belong to the sae dialog; they can be manipulated (added,fetched)
during the dialog lifetime.
Available functions:
- store_dlg_value("attr_name","attr_val"); // attr_val may contain PVs
- fetch_dlg_value("attr_name","pv"); // pv is $var or $avp
Available PVs:
- $dlg_val(attr_name); // set and get capabilities
store_dlg_value("attr_name","some_string") is the same with $dlg_val(attr_name)
= "some_string";
fetch_dlg_value("attr_name","$var(x)") is the same with $var(x) =
$dlg_val(attr_name);
Ex:
....
if (is_method("INVITE") {
store_dlg_value("real_caller","$hdr(p-asserted-identity)");
};
....
if (is_method("BYE") {
xlog("real caller for this BYE is $dlg_val(real_caller)");
};
...
Regards,
Bogdan
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users