I’m using switch_channel_get_variable to extract sip headers with already predefined channel variables (https://freeswitch.org/confluence/display/FREESWITCH/Channel+Variables).

I’ve found that some undefined sip headers can be extracted using only ‘sip_’ prefix (for instance ‘sip_P-Preferred-Identity’) and some using ‘sip_h_’ prefix (like is ‘sip_h_Diversion’).

Is there some rule or detailed explanation when to use just ‘sip_’ or ‘sip_h_’ in the name of the required channel variable?

 

Thanks,

Miro