Skip to content

UAC module

UAC (User Agent Client) module provides some basic UAC functionalities like FROM / TO header manipulation (anonymization) or client authentication.

If the dialog module is loaded and a dialog can be created, then the auto mode can be done more efficiently.

Known limitations in this version:

  • authentication does not support qop auth-int, just qop auth;
  • CSeq not increased during authentication - the response may be rejected.

The following modules must be loaded before this module:

  • TM - Transaction Module.
  • RR - Record-Route Module, but only if restore mode for FROM URI is set to “auto”.
  • UAC_AUTH - UAC Authentication Module.
  • Dialog Module, if “force_dialog” module parameter is enabled, or a dialog is created from the configuration script.

The following libraries or applications must be installed before running OpenSIPS with this module loaded:

  • None

There are 3 mode of restoring the original headers (FROM/TO) URI:

  • “none” - no information about original URI is stored; restoretion is not possible.
  • “manual” - all following replies will be restored, but not also the sequential requests - this must be manually updated based on original URI.
  • “auto” - all sequential requests and replies will be automatically updated based on stored original URI.

This parameter is optional, it’s default value being “auto”.

Set restore_mode parameter
...
modparam("uac","restore_mode","auto")
...

String password to be used to encrypt the RR storing paramter (when replacing the TO/FROM headers). If empty, no encryption will be used.

Default value of this parameter is empty.

Set restore_passwd parameter
...
modparam("uac","restore_passwd","my_secret_passwd")
...

Name of Record-Route header parameter that will be used to store (encoded) the original FROM URI.

This parameter is optional, it’s default value being “vsf”.

Set rr_from_store_param parameter
...
modparam("uac","rr_from_store_param","my_Fparam")
...

Name of Record-Route header parameter that will be used to store (encoded) the original TO URI.

This parameter is optional, it’s default value being “vst”.

Set rr_to_store_param parameter
...
modparam("uac","rr_to_store_param","my_Tparam")
...

The definition of an AVP that might contain the realm to be used to perform authentication.

If you define it, you also need to define “auth_username_avp” (auth username avp id) and “auth_username_avp” (auth password avp id).

Set auth_realm_avp parameter
...
modparam("uac","auth_realm_avp","$avp(10)")
...

The definition of an AVP that might contain the username to be used to perform authentication.

If you define it, you also need to define “auth_realm_avp” (auth realm avp id) and “auth_username_avp” (auth password avp id).

Set auth_username_avp parameter
...
modparam("uac","auth_username_avp","$avp(11)")
...

The definition of an AVP that might contain the password to be used to perform authentication. The password can be provided as a plain text password or as a precalculated HA1 as a hexa (lower case) string (of 32 chars) prefixed with “0x” (so a total of 34 chars) (for example “0xc17ba8157756f263d07e158504204629”)

If you define it, you also need to define “auth_password_avp” (auth password avp id) and “auth_username_avp” (auth password avp id).

Set auth_password_avp parameter
...
modparam("uac","auth_password_avp","$avp(12)")
...

Force create dialog if it is not created from the configuration script.

Default value is no.

Set force_dialog parameter
...
modparam("uac", "force_dialog", yes)
...

uac_replace_from(display,uri) uac_replace_to(display,uri)

Section titled “uac_replace_from(display,uri) uac_replace_to(display,uri)”

Replace in FROM/TO header the display name and the URI part.

display and URI parameters can include pseudo-variables.

This function can be used from REQUEST_ROUTE, BRANCH_ROUTE and FAILURE_ROUTE.

uac_replace_from/uac_replace_to usage
...
# replace both display and uri
uac_replace_from("$avp(display)","$avp(uri)");
# replace only display and do not touch uri
uac_replace_from("batman","");
# remove display and replace uri
uac_replace_from("","sip:robin@gotham.org");
# remove display and do not touch uri
uac_replace_from("","");
...

Replace in FROM/TO header the URI part without altering the display name.

URI parameter can include pseudo-variables.

This function can be used from REQUEST_ROUTE.

uac_replace_from/uac_replace_to usage
...
uac_replace_from("sip:batman@gotham.org");
...

This function will check if the FROM/TO URI was modified and will use the information stored in header parameter to restore the original FROM/TO URI value.

This function can be used from REQUEST_ROUTE.

uac_restore_from/uac_restore_to usage
...
uac_restore_from();
...

This function can be called only from failure route and will build the authentication response header and insert it into the request without sending anything. Credentials for buiding the authentication response will be taken from AVPs first (if AVPs are defined and populated) and then from the list of credentials provided by the uac_auth module.

This function can be used from FAILURE_ROUTE.

uac_auth usage
...
uac_auth();
...

Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)

#NameDevScoreCommitsLines++Lines—
1.Bogdan-Andrei Iancu (@bogdan-iancu)107603698869
2.Ovidiu Sas (@ovidiusas)3373551335
3.Razvan Crainea (@razvancrainea)2314503182
4.Daniel-Constantin Mierla (@miconda)141111973
5.Stefan Darius (@dariusstefan)10441882
6.Andreas Heise73105129
7.Elena-Ramona Modroiu428544
8.Henning Westerholt (@henningw)4299
9.Dan Pascu (@danpascu)3122
10.Konstantin Bokarius3125

All remaining contributors: Vlad Paiu (@vladpaiu), Sergio Gutierrez, Jesus Rodrigues, Edson Gellert Schubert.

(1) DevScore = author_commits + author_lines_added / (project_lines_added / project_commits) + author_lines_deleted / (project_lines_deleted / project_commits)

(2) including any documentation-related commits, excluding merge commits

(3) ignoring whitespace edits, renamed files and auto-generated files

#NameCommit Activity
1.Stefan Darius (@dariusstefan)Jun 2026 - Jul 2026
2.Razvan Crainea (@razvancrainea)Aug 2010 - Jun 2026
3.Bogdan-Andrei Iancu (@bogdan-iancu)Jun 2005 - Nov 2013
4.Ovidiu Sas (@ovidiusas)Mar 2011 - Oct 2013
5.Vlad Paiu (@vladpaiu)Aug 2011 - Aug 2011
6.Sergio GutierrezNov 2008 - Nov 2008
7.Dan Pascu (@danpascu)Nov 2008 - Nov 2008
8.Daniel-Constantin Mierla (@miconda)Nov 2006 - Mar 2008
9.Konstantin BokariusMar 2008 - Mar 2008
10.Edson Gellert SchubertFeb 2008 - Feb 2008

All remaining contributors: Henning Westerholt (@henningw), Jesus Rodrigues, Andreas Heise, Elena-Ramona Modroiu.

(1) including any documentation-related commits, excluding merge commits

Last edited by: Razvan Crainea (@razvancrainea), Bogdan-Andrei Iancu (@bogdan-iancu), Ovidiu Sas (@ovidiusas), Daniel-Constantin Mierla (@miconda), Konstantin Bokarius, Edson Gellert Schubert, Jesus Rodrigues, Elena-Ramona Modroiu.

All documentation files (i.e. .md extension) are licensed under the Creative Common License 4.0