[Users] parsing P-Asserted-Identity

Klaus Darilion klaus.mailinglists at pernau.at
Mon Jul 17 17:15:14 CEST 2006


Hi!

I wonder how I can parse the body of the P-Asserted-Identity: header. 
This header allows several syntax, e.g:
P-Asserted-Identity: "Klaus Darilion" <tel:+43123>
P-Asserted-Identity: tel:+43123;context
P-Asserted-Identity:    tel:201-555-0123;phone-context=+1
P-Asserted-Identity: "nice guy" <sip:ng;abc=def at nicedomain;foo=bar>

In my case I want to:
1. check if it is a tel URI or not
2. Get the phone number from the addr-spec
3. Get the parameters (phone-context, ...)

Are there generic functions available to parse name-addr, addr-spec, 
SIP-URIs and tel URIs? Or do I have to use avp_check and avp_subst with 
some complicated regexps?


Thanks
Klaus




More information about the Users mailing list