Module: kamailio
Branch: master
Commit: 170067e633ef32ea7b17adad46fdfe2c85fadda0
URL: https://github.com/kamailio/kamailio/commit/170067e633ef32ea7b17adad46fdfe2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-08-12T13:31:15+02:00
xhttp: note about available variables during http request processing
---
Modified: src/modules/xhttp/doc/xhttp_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/170067e633ef32ea7b17adad46fdfe2…
Patch: https://github.com/kamailio/kamailio/commit/170067e633ef32ea7b17adad46fdfe2…
---
diff --git a/src/modules/xhttp/doc/xhttp_admin.xml b/src/modules/xhttp/doc/xhttp_admin.xml
index f0e6d3fdeb8..1c7d29a051a 100644
--- a/src/modules/xhttp/doc/xhttp_admin.xml
+++ b/src/modules/xhttp/doc/xhttp_admin.xml
@@ -22,7 +22,7 @@
Via header.
</para>
<para>
- The <module>xmlrpc</module> module uses the same concept.
+ The xmlrpc module uses the same concept.
The xHTTP module offers a generic way of handling the <acronym>HTTP</acronym>
protocol, by calling <emphasis>event_route[xhttp:request]</emphasis>
in your config. You can check the HTTP URL via the config variable
@@ -228,7 +228,10 @@ event_route[xhttp:request] {
<function moreinfo="none">xhttp:request</function>
</title>
<para>
- The event route is executed when a new HTTP request is received.
+ The event route is executed when a new HTTP request is received. Most
+ of the variables related to a SIP request can be used inside this event
+ route to get HTTP request attributes (e.g., $si - source IP, $hdr(X)
+ - body of header X, $rm - request method, $rb - request body, ...).
</para>
<programlisting format="linespecific">
...
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3497
-- Commit Summary --
* sipcapture: use memcpy instead of strncpy for coherence
* rtpproxy: use memcpy instead of strcpy for coherence
-- File Changes --
M src/modules/rtpproxy/rtpproxy.c (40)
M src/modules/sipcapture/sipcapture.c (16)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3497.patchhttps://github.com/kamailio/kamailio/pull/3497.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3497
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3497(a)github.com>
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.kamailio…
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.kamailio.o…
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### Debugging Data
<!--
If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
local variables and the list of the code at the issue location.
gdb /path/to/kamailio /path/to/corefile
bt full
info locals
list
If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->
```
(paste your debugging data here)
```
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
(paste your log messages here)
```
#### SIP Traffic
<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
(paste your sip traffic here)
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
(paste your output here)
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `lsb_release -a` and `uname -a`)
-->
```
(paste your output here)
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3533
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3533(a)github.com>
Hello, I have a question for [1] config function.
Can I extend it to work with INTs too? e.g. if pv not NULL and INT flag, return 1. This would help, because one won't need to know the type of the pvar beforehand, for using this function.
Or is it meant to be used only with string pv only?
[1] https://www.kamailio.org/docs/modules/devel/modules/pv.html#pv.f.not_empty
Thank you,
Stefan