The function to parse phonenum pv name is called when the pv is looked up in the cache of pvs. Maybe you can describe what you actually get, eventually run kamailio with debug=3 in cofig and paste here all log messages printed by kamailio when you try to use the phonenum vars in kemi.