Hi, If user call 7 digits number, I want to add caller prefix from avpops record to TO uri. I know prefix() function uses for adding prefix but it doesn't work with avpops module. I couldn't use avp_write() function because it's only work with avp_values or avp_alias. I want to mix of avp_alias and TO uri. ie sip:2304862@domain.com -> sip:9252304862@domain.com like traditional PSTN dialing (you don't dial your areacode if you want to call your area) My configuration part for avpops prefix is;
if(uri=~"^sip:[0-9]{7}@" && avp_db_load("$from","$areacode")){ #this part should be get from avp_alias prefix("$areacode"); # or avp_write("$to","$areacode$to"); }
regards ibrahim