Problem with double Identity headers on B leg (stir and shaken)

Hi all,
I receive a call on A-leg with X-Identity header (same effect with Identity without X-).

X-Identity: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
bbbbbbbbbbbbbbbbbbbbbb.cccccccccccccccccccc;info=<https://certs.example.org/cert.pem>;alg=ES256;ppt=shaken

I want to copy it to B leg with this (without X-):

<condition field="${sip_h_X-Identity}" expression="." break="never">
        <action application="log" data="INFO LOG: copy X-Identity to identity" />
        <action application="export" data="sip_h_Identity=${sip_h_X-Identity}" />
        <action application="unset" data="sip_h_X-Identity" />
</condition>

But in B leg I can see 2 identicals identity headers:

Identity: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
bbbbbbbbbbbbbbbbbbbbbb.cccccccccccccccccccc;info=<https://certs.example.org/cert.pem>;alg=ES256;ppt=shaken
Identity: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
bbbbbbbbbbbbbbbbbbbbbb.cccccccccccccccccccc;info=<https://certs.example.org/cert.pem>;alg=ES256;ppt=shaken

Another test:
I deleted my previous configuration and just added in bridge:

sip_h_identity=foo;info=bar;alg=ES256;ppt=shaken

Ex:

<action application="bridge" data="
 {
   sip_invite_params=user=phone,
   sip_cid_type=none,
   ignore_display_updates=true,
   sip_renegotiate_codec_on_reinvite=true,
   sip_contact_user=${caller_id_number},
   sip_h_identity=foo;info=bar;alg=ES256;ppt=shaken
}
sofia/gateway/${distributor LISTPRIVATE ${sofia profile INTERNAL gwlist down}}/${number_dest}"/>

And the result is 2 identicals Identity headers:

Identity: foo;alg=ES256;ppt=shaken
Identity: foo;alg=ES256;ppt=shaken

I use this version: 1.10.9-release+git~20230203T200730Z~a615e85afc~64bit (git a615e85 2023-02-03 20:07:30Z 64bit)

Do you have an explanation about this double Identity or maybe a correct configuration for me ?

thanks in advance
Mickael

I found this issue: Duplicate Identity: Headers on outgoing INVITE · Issue #206 · freeswitch/sofia-sip · GitHub
but I don’t understand the last answer.

I found a solution: Duplicate Identity: Headers on outgoing INVITE · Issue #206 · freeswitch/sofia-sip · GitHub

We also found the root cause of this, and a fix is going in soon.

/b

1 Like