I have opensips installed with 4 Freeswitch servers, IP authentication is working fine but in SIP authentication (i.e., Register) i need to append following code.
# Setting accountcode in P-Accountcode variable
remove_hf("P-Accountcode");
remove_hf("P-Pricelist_id");
cache_fetch("local","accountcode_$fU",$avp(accountcode));
cache_fetch("local","pricelist_id_$fU",$avp(pricelist_id));
if(!$avp(accountcode) && $fd==$od)
{
avp_db_query("select accountcode,pricelist_id from subscriber where username='$fU'","$avp(accountcode);$avp(pricelist_id)");
cache_store("local","accountcode_$fU","$avp(accountcode)",3600);
cache_store("local","pricelist_id_$fU","$avp(pricelist_id)",3600);
}
# xlog("L_INFO", "$ci|log|Accountcode: $avp(accountcode) ");
# xlog("L_INFO", "$ci|log|Pricelist Id : $avp(pricelist_id) ");
append_hf("P-Accountcode: $avp(accountcode)\r\n");
append_hf("P-Pricelist_id: $avp(pricelist_id)\r\n");
If you can do it please contact me.
NetworkLab is experts in opensips and kamailio. We can help you append proper configuration and headers based on you requirements. We completed in past many project based opensips and kamailio with complex configuration.
₹1,400 INR in 2 days
5.0 (28 reviews)
5.2
5.2
2 freelancers are bidding on average ₹2,200 INR for this job