It is possible to use get_timestamp to generate date/time string in GMT. :)
It should be easier and enough to add a pvar for time in GMT if you only want
to generate SIP Date header.
---
Reply to this email directly or view it on GitHub:
@@ -332,6 +332,76 @@ exec_getenv(HOSTNAME, $avp(localhost));
/example
/section
+ section
+ title
+ function moreinfo=noneexec(command, [output], [input],
[error],[envavp])/function
Could you change that to [input], [output], [error] ?
+ paraemphasiserror/emphasis - pseudovariable where
to store the error from
+ the standard error of the process.
+ /para
+ /listitem
+ listitem
+ paraemphasisenvavp/emphasis - Avp where
+ para
+ WARNING: input/output/error parameters are not designed
for a large amount of
+ data so one should be careful when using them because server
could considerably be
+ slowed down.
+ /para
+ para
+
+ /para
+ para
+ This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
+ LOCAL_ROUTE, STARTUP_ROUTE, TIMER_ROUTE, EVENT_ROUTE,
ONREPLY_ROUTE.
+ /para
+ example
+ titlefunction
@@ -51,6 +51,7 @@ int schedule_to_kill( int pid );
* @stream: stream to be returned to the caller
*/
pid_t __popen(const char *cmd, const char *type, FILE **stream);
+pid_t ___popen(const char *cmd, FILE **, FILE**, FILE**);
That's not very inventively named, is it? :-D
Python popen2
+ if ((buflen + tmplen) = MAX_BUF_SIZE) {
+ LM_WARN(no more space in output buffer\n);
+ break;
+ }
+ memcpy(buf+buflen, tmpbuf, tmplen);
+ buflen += tmplen;
+
+ outval.flags = PV_VAL_STR;
I think the function get_timestamp return current system time. but current
system timezone not GMT.
so get_timestamp return value is not GMT.
may be have something that I miss it , please tell me.
zhouxiaoqiang.mst...@gmail.com
From: Di-Shi Sun
Date: 2014-10-29 15:24
To: OpenSIPS/opensips
+ goto error;
+ }
+
+ if (ferror(pin)) {
+ ser_error=E_EXEC;
+ goto error;
+ }
+ pclose(pin);
+ }
+
+ schedule_to_kill(pid);
+ wait(exit_status);
+
+ if
+ return -1;
+ }
+ }
+
+ if (errvar) {
+ if (read_and_write2var(msg, perr, errvar) 0) {
+ LM_ERR(failed reading stderr from pipe\n);
+ return -1;
+ }
+ }
+
+ ret=1;
+
+ }
+ return 0;
+}
+
+static inline int setenvvar(struct hf_wrapper** hf, int_str* value, int idx)
+{
+ #define OSIPS_EXEC OSIPS_EXEC_
+
+
+ int len=0;
+ str sidx;
+
+ sidx.s = int2str((unsigned long)idx, sidx.len);
+
+
Thanks for fixing the other issues :)
---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/375#issuecomment-60891337___
Devel mailing list
Devel@lists.opensips.org
First, I was joking. It is definitely not a good idea to use get_timestamp (or
other pvars such as $Ts) to generate GMT time string. But it is possible. If
you read the code of OpenSIPS, you can see it uses C gettimeofday and time
functions to get the number of seconds and microseconds since
Hi:
I do it. if set GMT timezone for system, it will work fine.
zhouxiaoqiang.mst...@gmail.com
From: Di-Shi Sun
Date: 2014-10-29 17:21
To: OpenSIPS/opensips
CC: xiaoqiang.zhou
Subject: Re: [opensips] date format convert method that use in opensips.cfg
(#378)
First, I was joking. It is
Hi, all!
Don't forget about the WebRTC meeting that's going to happen in about
one hour!
Best regards,
Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com
On 10/23/2014 09:48 PM, Bogdan-Andrei Iancu wrote:
As a starting point for the discussion, please take a look at:
15 matches
Mail list logo