[SR-Users] set From and To attributes in assignments

Daniel-Constantin Mierla miconda at gmail.com
Fri Aug 13 08:20:27 CEST 2010


  Hello,

I committed in master branch (to be 3.1.0) code that allows to set uri, 
username, domain and display name for To and From headers using 
assignments to their respective PVs in configuration file. For example:

$fu = "sip:anonymous at invalid";
$fn = '"Jon Doe"';
$tU = "+123455678";

Assignment of each such attribute should be done only once, otherwise 
you get concatenated values since it uses the internal lump system. 
Therefore, doing an update is not visible immediately in config unless 
you do use msg_apply_changes().

Also, use it carefully, in case you have sipv1 devices in your network 
then it can break dialog matching. Anyhow changing content of From and 
To headers was possible with remove_hf()/append_hf() or subst() 
functions, the new feature comes just to ease writing the config when 
one needs it.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com/




More information about the sr-users mailing list