[SR-Users] Can following scenario be implemented using Kamilio

Daniel Tryba d.tryba at pocos.nl
Tue Mar 3 18:38:21 CET 2015


On Tuesday 03 March 2015 18:31:13 Alex Balashov wrote:
> >                  $var(contact) = $(var(contact){re.subst,/^<(sip:\+?
> >
> > [0-9]+ at .*)>$/\1/});
> 
> I would recommend, from a best-practical perspective, not doing this 
> substitution, but instead using transformations[1] to extract the URI. 
> The Contact header is a "name-address pair", so you can extract the URI 
> component this way:
> 
>     $var(contact) = $(T_rpl($ct){nameaddr.uri});

[Multiple valid reasons.]

Thanks Alex, I'll take your advice on this. 

BTW I don't allow client endpoints to do redirects, I only accept this from my 
redirecters so I'm not concerned about strange headers not handled by my 
subst.

-- 

Telefoon: 088 0100 700
Sales: sales at pocos.nl | Service: servicedesk at pocos.nl
http://www.pocos.nl/ | Croy 9c, 5653 LC Eindhoven | Kamer van Koophandel 
17097024



More information about the sr-users mailing list