[OpenSIPS-Users] Query- to read a text file content by openSIPS
Bogdan-Andrei Iancu
bogdan at opensips.org
Tue Oct 4 12:46:45 CEST 2016
Yes, that is the best approach.
When comes to actual reading of the text file, you can do it via an
exec() call - run a command and output the file content and catch the
output of the exec into a variable.
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 03.10.2016 18:53, Brett Nemeroff wrote:
> Best way to do something like this IMO would be to use a caching
> backend like memcache. You could either use a timer route or an
> external script to periodically repopulate the tuple.
>
> -Brett
>
> On Oct 3, 2016, at 10:21 AM, Ramachandran, Agalya (Contractor)
> <Agalya_Ramachandran at comcast.com
> <mailto:Agalya_Ramachandran at comcast.com>> wrote:
>
>> Hi team,
>>
>> I have a question and it follows:
>>
>> If we need to add a header for Authorization purpose, before making a
>> REST call, we need to use rest_append_hf_method()
>>
>> E.X: rest_append_hf("Authorization: Bearer mF_9.B5f-4.1JqM");
>>
>> My question is, If I want to read a text file, is there any function
>> exposed so that I can read the text file and place the content of the
>> text file for Authorization header?
>>
>> Also, Is there a way that I need to read the text file for every hour
>> and read the file?
>>
>> Please guide me how this can be achieved?
>>
>> Regards,
>>
>> Agalya
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20161004/21c91c8f/attachment-0001.htm>
More information about the Users
mailing list