[Freeswitch-dev] More detailed P-Asserted-Identity
manieq at wp.eu
Tue Mar 13 00:54:17 MSK 2012
Channel variable set from "P-Asserted-Identity" header contains only user name part
I have an IMS platform (by ALU) and a media server based on FreeSWITCH. Calls to a dedicated PSI and some FAC are routed to FSW. For some accont-specific features it is important to have a detailed user information. I found that mod_sofia currently sets only a user part of URI in "sip_h_P-Asserted-Identity" variable. It is not suitable in our case, since we also need information about user's realm.
I created a patch which allows to decide how detailed the information in variable should be. A new parameter in sip profile configuration is introduced "p-asserted-id-parse":
<param name="p-asserted-id-parse" value="default"/>
Valid values are:
param not defined at all - assume "default"
"default" - preserves current behaviour (user numer only);
"user-only" - same result as above, but explicitly enforced
"user-domain" - a conatenation of "user number" "@" "user domain"
"verbatim" - set to exact value of the SIP header
A new type was added (sofia_paid_type_t - enum) and a profile field (paid_type).
In 'config_sofia' and 'reconfig_sofia' a new parameter is parsed (if declared) then 'paid_type' field is set as requested. By default (in 'config_sofia') paid_type ise set to PAID_DEFAULT
In 'p-asserted-id-parse' function, setting "sip_P-Asserted-Identity" variable depends on value set in profile configuration.
Tested with Alcatel-Lucent IMS v.3.0 for all param values. "default", "user-only" and "user-domain" works as expected (actually "user-domain" is what we need). Unfortunately "verbatim" is not filling channel variable at all.
Can sb. help me how to get an exact value of a PANI header from a request? Do you think it could be useful to others so I can push it to JIRA after problem fixing?
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev