Hello,

On 12/6/11 2:50 PM, Pavel Segeč wrote:

Hi,

 

I'm looking for some recommendations or guidlines. My leading IT department which is providing PSTN connectivity requires to include Remote Party ID in SIP Messages in a case where From URI is not in telco format (I prefer email like style of addressing). How to simply assign to an user its Remote Party ID which will be used when PSTN calling will occure? On what should I focus on? To use user preferences with AVP pairs? or something another?

since it is about one attribute associated with the caller, a recommended way is to add a new column in subscriber table, say it is named 'rpid'.

Then, in config file, set the load_credentials parameter of auth_db to load the rpid value and store in an avp. After you authenticate the caller, the avp will be set to the rpid value, see:

http://kamailio.org/docs/modules/stable/modules_k/auth_db.html#id2528175

Using this option, practically you use same db query that loads the user password for authentication to fetch the rpid value.

Cheers,
Daniel
-- 
Daniel-Constantin Mierla -- http://www.asipto.com
http://linkedin.com/in/miconda -- http://twitter.com/miconda