Module: kamailio
Branch: master
Commit: 9adec4ca8bf2f204aa8db4ae60429bb994bc6be9
URL: https://github.com/kamailio/kamailio/commit/9adec4ca8bf2f204aa8db4ae60429bb…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: 2015-09-19T10:29:52+01:00
Adding the curl module with status "Development"
Anyone that wants to help is welcome to help. I've listed a few
todo's in the TODO.txt file. We will have to decide which of these
that we need for release and which that can be done in the future.
---
Added: modules/curl/Makefile
Added: modules/curl/README
Added: modules/curl/TODO.txt
Added: modules/curl/curl.c
Added: modules/curl/curl.h
Added: modules/curl/curlcon.c
Added: modules/curl/curlcon.h
Added: modules/curl/curlrpc.c
Added: modules/curl/curlrpc.h
Added: modules/curl/doc/Makefile
Added: modules/curl/doc/curl.xml
Added: modules/curl/doc/curl_admin.xml
Added: modules/curl/functions.c
Added: modules/curl/functions.h
---
Diff: https://github.com/kamailio/kamailio/commit/9adec4ca8bf2f204aa8db4ae60429bb…
Patch: https://github.com/kamailio/kamailio/commit/9adec4ca8bf2f204aa8db4ae60429bb…
Module: kamailio
Branch: master
Commit: 1e5bad019c450a003e812ee051d84134aad6c5f0
URL: https://github.com/kamailio/kamailio/commit/1e5bad019c450a003e812ee051d8413…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-09-18T13:36:03+02:00
tsilo: use current r-uri for ts_store()
- msg->first_line.u.request.uri is always the incoming r-uri (never
updated inside the msg structure)
- if $ru was updated, msg->new_uri is set with the new value
- if incoming r-uri is wanted back after $ru was updated, revert_uri()
can be used
- if only incoming r-uri is allowed, then the function doesn't work when
dialing an alias or a short number
---
Modified: modules/tsilo/ts_store.c
---
Diff: https://github.com/kamailio/kamailio/commit/1e5bad019c450a003e812ee051d8413…
Patch: https://github.com/kamailio/kamailio/commit/1e5bad019c450a003e812ee051d8413…
---
diff --git a/modules/tsilo/ts_store.c b/modules/tsilo/ts_store.c
index 67dc2d6..a05a4ef 100644
--- a/modules/tsilo/ts_store.c
+++ b/modules/tsilo/ts_store.c
@@ -43,21 +43,28 @@ int ts_store(struct sip_msg* msg) {
struct cell *t;
str aor;
struct sip_uri ruri;
+ str suri;
ts_urecord_t* r;
int res;
-
+ if (msg->new_uri.s!=NULL) {
+ /* incoming r-uri was chaged by cfg or other component */
+ suri = msg->new_uri;
+ } else {
+ /* no changes to incoming r-uri */
+ suri = msg->first_line.u.request.uri;
+ }
if (use_domain) {
- aor = msg->first_line.u.request.uri;
+ aor = suri;
}
else {
- if (parse_uri(msg->first_line.u.request.uri.s, msg->first_line.u.request.uri.len, &ruri)!=0)
+ if (parse_uri(suri.s, suri.len, &ruri)!=0)
{
LM_ERR("bad uri [%.*s]\n",
- msg->first_line.u.request.uri.len,
- msg->first_line.u.request.uri.s);
+ suri.len,
+ suri.s);
return -1;
}
aor = ruri.user;
Module: kamailio
Branch: 4.3
Commit: 020693698e0ec43da1d652524e497f12d1263fe4
URL: https://github.com/kamailio/kamailio/commit/020693698e0ec43da1d652524e497f1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-09-18T15:54:24+02:00
tsilo: use current r-uri for ts_store()
- msg->first_line.u.request.uri is always the incoming r-uri (never
updated inside the msg structure)
- if $ru was updated, msg->new_uri is set with the new value
- if incoming r-uri is wanted back after $ru was updated, revert_uri()
can be used
- if only incoming r-uri is allowed, then the function doesn't work when
dialing an alias or a short number
(cherry picked from commit 1e5bad019c450a003e812ee051d84134aad6c5f0)
---
Modified: modules/tsilo/ts_store.c
---
Diff: https://github.com/kamailio/kamailio/commit/020693698e0ec43da1d652524e497f1…
Patch: https://github.com/kamailio/kamailio/commit/020693698e0ec43da1d652524e497f1…
---
diff --git a/modules/tsilo/ts_store.c b/modules/tsilo/ts_store.c
index 67dc2d6..a05a4ef 100644
--- a/modules/tsilo/ts_store.c
+++ b/modules/tsilo/ts_store.c
@@ -43,21 +43,28 @@ int ts_store(struct sip_msg* msg) {
struct cell *t;
str aor;
struct sip_uri ruri;
+ str suri;
ts_urecord_t* r;
int res;
-
+ if (msg->new_uri.s!=NULL) {
+ /* incoming r-uri was chaged by cfg or other component */
+ suri = msg->new_uri;
+ } else {
+ /* no changes to incoming r-uri */
+ suri = msg->first_line.u.request.uri;
+ }
if (use_domain) {
- aor = msg->first_line.u.request.uri;
+ aor = suri;
}
else {
- if (parse_uri(msg->first_line.u.request.uri.s, msg->first_line.u.request.uri.len, &ruri)!=0)
+ if (parse_uri(suri.s, suri.len, &ruri)!=0)
{
LM_ERR("bad uri [%.*s]\n",
- msg->first_line.u.request.uri.len,
- msg->first_line.u.request.uri.s);
+ suri.len,
+ suri.s);
return -1;
}
aor = ruri.user;
Hi,
Here is a modification of the http_request function of the utils module.
The idea is to ignore empty lines at the beginning of the http response.
This way, the response returned to Kamailio is the first non empty line of the http response.
This is to solve an issue encountered with apache2 sometimes returning empty lines.
I am no c++ developper and no acquainted to Github (double check the patch).
Thanks,
Laurent.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/321
-- Commit Summary --
* Update functions.c
* Update: functions.c
-- File Changes --
M modules/utils/functions.c (19)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/321.patchhttps://github.com/kamailio/kamailio/pull/321.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/321