[Serusers] SER Contact rewrite for Softswitch

Andrei Pelinescu-Onciul pelinescu-onciul at fokus.fraunhofer.de
Thu Oct 23 17:59:14 CEST 2003


On Oct 23, 2003 at 17:27, Harry Behrens <Harry.Behrens at dai-labor.de> wrote:
> Hello,
> 
[...]
>  The Softswitch "authenticates" (if you can call this authentication ;-( by looking at the 
>  Contact header and comparing it to its database of numbers assigned to provisioned SIP Servers.
>  I therefore need to be able to specify a rewrite of the Contact header to 
>  replace harry@<Contact IP:port> with 12345621@<Contact IP:port>
>  when the callee is of the form <number>@<whatever>
> 
> I am aware that this would be strictly speaking not proxy but rather B2BUA behaviour, but would still be
> interested to know whether anyone has a solution to this problem or whether we need to hack one ourselves.

You can try a brute-force approach, create a regular expression that
will match Contact: harry@<Contact IP:port> and replace it with
 12345621@<Contact IP:port>. You could use textops subst function for
 that.
 E.g.: subst('/^(Contact: *)harry(@.*)/\112345621\2/i');
 
 However you will need to have one subst for each user hard-wired
 in your ser conf.


Andrei




More information about the sr-users mailing list