[Serusers] Questions re. MySQL

frq ser frq.ser at googlemail.com
Fri Apr 11 14:41:37 CEST 2008


Hi,

Here's a set of basic questions for which I need your help.  I want to play
different announcements based on the caller's history. For simplicity, I
want ann1_user1.wav to be played for the first call, and ann2_user1.wav for
all subsequent calls from the 1st user. Similarly for 2nd user, the files
would be ann*_user2.wav.

1) I want to have a basic record of the number of  times a user has called
the SER(ie, sent an INVITE). Which table and column in mySQL can I use for
this purpose. Also, how can I write the integer using SER commands (ie
something that I can put in ser.cfg file). There is an example (
http://www.iptel.org/write_custom_text_to_mysql_acc_table) which uses
'acc_db_request', but it can only write to sip_status column in acc table.
How can I modify /write to to any general field in mysql?

2) Subsequently, how can I retreive this value from mysql through some
command in ser.cfg file. I want to use this value in an 'if' statement and
redirect the process flow accordingly.

3) I was thinking of rewriting the uri to make it 'ann1_user1 at xxxxx' and
sending the request to early_announce application so that the user hears
different announcement based on username and their call history (ie whether
this user has called before or not). However, I am not very clear about how
to do this. Is there any simpler method to do this. The final aim of this
whole exercise is to demonstrate call differentiation based on username and
user history. So if someone has a better idea then please do share it.

Thanks for the help and accept my apologies for squeezing so many questions
into a single message.

Regards,
Frq
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20080411/3102813f/attachment.htm>


More information about the sr-users mailing list