A REFER request MAY be placed outside the scope of a dialog created with an INVITE. REFER creates a dialog, and MAY be Record-Routed, hence MUST contain a single Contact header field value. REFERs occurring inside an existing dialog MUST follow the Route/Record- Route logic of that dialog.
When jssip build "Refer-to" header not considering rfc3515 (SIP) Refer Method
A REFER request MAY be placed outside the scope of a dialog created with an INVITE. REFER creates a dialog, and MAY be Record-Routed, hence MUST contain a single Contact header field value. REFERs occurring inside an existing dialog MUST follow the Route/Record- Route logic of that dialog.
RFC 3261 12.1.1. and RFC 3261 12.1.2. say how take "local tag" and "remote tag" for dialog and this is correctly implemented
The behaviour of this rfc mismatch is that refer of 2 incoming call failed (eg. in asterisk server)
Solution is to change "Refer-to" builder from
to