Hi, If you receive an INVITE with 2 diversion headers such as (in this order):
Diversion: <sip:9975@X.X.X.X:5060>;privacy=off;screen=no; reason=user-busy; counter=1 Diversion: <sip:1234567890@Z.Z.Z.Z:5060>;privacy=off;screen=no; reason=unknown; counter=1 How is a nice way of extracting the user part from the URI of the last one? (in this case: 1234567890) Problems I have found: $(di{uri.user}) ---> Give mes the user part of the URI of the first header, in this case: 9975 Is there a way to tell $di to get its value from the last header instead of the first one? This example works: $(hdr(Diversion)[-1]{param.name,0}{s.strip,1}{s.striptail,1}{uri.user}) But I think it is very hacky... Any better approach anyone can suggest me? Thanks in advance. Best regards, Joel. _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users