Mika,

  At the moment: To: sip:[EMAIL PROTECTED];tag=.....
  To be like: To: "test1"<sip:[EMAIL PROTECTED]>;tag=...

Do you actually mean that the user part of the URI needs to be
duplicated into the display name? Something like the following?

   subst('/^To:(.*)sip:([EMAIL PROTECTED])@([^;]*)(.*)$/To:\1"\2"<sip:[EMAIL 
PROTECTED]>\4/ig')


Or that the To: display name needs to be rewritten based on content
pre-stored in a database (for example because the users have to
pre-register via a web GUI)? In that case you could combine a line
like
  avp_db_load( "$to/username", "$avp(label)" )
with a subst (for example replacing the first \2 in the example above
with $avp(label), I guess).


Finally, if the username/display-name pairs aren't pre-registered, you
could store them in the AVP database (using the username or
username+domain as a key) at the time the user registers/subscribes,
and then retrieve them when processing NOTIFYs (using the
avp_db_load() + subst() combination).

HTH,
S.

PS: I haven't tested any of this, although I do use a subst() on To:
similar to the one I showed.

--
http://carrierclass.net/
http://www.linkedin.com/in/stephalnet

_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users

Reply via email to