Hi,

Try $(hdr(Record-Route)[-1]), to extract URI only you can use: $(hdr(Record-Route)[0]{nameaddr.uri})