Re: [sr-dev] [kamailio/kamailio] topos/topos_redis, error: "could not evaluate a_contact xavu" when in-dialog msg have Record-Route header. (#2852)

2021-09-16 Thread Daniel-Constantin Mierla
Another idea, as the topos has the option to do Record-Route update 
(https://www.kamailio.org/docs/modules/stable/modules/topos.html#topos.p.rr_update),
 might be somehow related.

If you do not enable Record-Route update, then you can remove the Record-Route 
headers for requests within dialog with remove_hf("Record-Route") and try to 
see if it works.

If you enable that option, then you also have to do record_route() for the 
requests within dialog.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2852#issuecomment-920909836___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] topos/topos_redis, error: "could not evaluate a_contact xavu" when in-dialog msg have Record-Route header. (#2852)

2021-09-16 Thread Daniel-Constantin Mierla
Somehow I missed the comment without contact -- when I looked quickly at the 
code, the xavu is used if contact address is found, being after this piece of 
code:

```
if(dir==TPS_DIR_DOWNSTREAM) {
sv = td->bs_contact;
} else {
sv = td->as_contact;
}
if(sv.len<=0) {
/* no contact - skip */
return 0;
}
```

But I do not use this mode with xavu and don't know what is supposed to do. I 
just wanted to give some hints.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2852#issuecomment-920829651___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] topos/topos_redis, error: "could not evaluate a_contact xavu" when in-dialog msg have Record-Route header. (#2852)

2021-09-16 Thread Dennis
Didn't I show in the examples above that contact has nothing to do with it?

Aniway again,
no Contact with Record-Route in ACK, have error in topos:
[call4.log](https://github.com/kamailio/kamailio/files/7177215/call4.log)
[dump4.txt](https://github.com/kamailio/kamailio/files/7177216/dump4.txt)

no Contact, no Record-Route, no error:
[call5.log](https://github.com/kamailio/kamailio/files/7177218/call5.log)
[dump5.txt](https://github.com/kamailio/kamailio/files/7177219/dump5.txt)

>> and the set that xavu
I do belive if i set xavu in in-Dialog messages topos will be work correctly, 
but as sayd @henningw:

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2852#issuecomment-920814392___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] KSR.sqlops.sql_xquery() return 0 when successful, but 1 expected (#2856)

2021-09-16 Thread Daniel-Constantin Mierla
Closed #2856.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2856#event-5311792463___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] KSR.sqlops.sql_xquery() return 0 when successful, but 1 expected (#2856)

2021-09-16 Thread Daniel-Constantin Mierla
Thanks for reporting, it should be fixed in master (see above reference) and it 
will be backported.

If still an issue, reopen.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2856#issuecomment-920800311___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] KSR.sqlops.sql_xquery() return 0 when successful, but 1 expected (#2856)

2021-09-16 Thread hance2010


### Description



### Troubleshooting
```
# kamailio.cfg
sql = "select * from subscriber";
sql_xquery("ca", sql, "ra");
xinfo("returncode = $rc"); /* 1 */

# kamailio.lua
sql = "select * from subscriber"
rc = KSR.sqlops.sql_xquery("ca", sql, "ra")
KSR.info("returncode = " .. rc .. "\n")  --  0, but 1 expected
```


 Reproduction



 Debugging Data



```
(paste your debugging data here)
```

 Log Messages



```
(paste your log messages here)
```

 SIP Traffic



```
(paste your sip traffic here)
```

### Possible Solutions



### Additional Information

  * **Kamailio Version** - output of `kamailio -v`



```
kamailio 5.5.1
```

* **Operating System**:




```
debian10
```


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2856___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] `rpc dispatcher.add group address flags` not work (#2854)

2021-09-16 Thread hance2010
Closed #2854.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2854#event-5311655670___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] `rpc dispatcher.add group address flags` not work (#2854)

2021-09-16 Thread hance2010
it works very welll, thank you very much!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2854#issuecomment-920776785___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] `rpc dispatcher.add group address flags` not work (#2854)

2021-09-16 Thread hance2010
`kamcmd dispatcher.add 1 sip:1.2.3.4 8` afer 



ERROR:  [core/parser/parse_param.c:517]: parse_param2(): Invalid 
character, ; expected
ERROR: dispatcher [dispatch.c:440]: pack_dest(): cannot set attributes!
WARNING: dispatcher [dispatch.c:2609]: ds_add_dst(): unable to add destination 
sip:1.2.3.4 to set 1


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2854#issuecomment-920771811___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] mod kazoo: wrong kazoo_publish example (#2627)

2021-09-16 Thread sergey-safarov
I rewrote example and make DocBook formatting.
As an example, I take the [current 
config](https://github.com/2600hz/kazoo-configs-kamailio/blob/master/kamailio/registrar-sync-role.cfg#L16)
 used in kazoo project.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2627#issuecomment-920684360___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] Gh2627 (#2855)

2021-09-16 Thread sergey-safarov
 Pre-Submission Checklist
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, 
...)
- [ ] 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:
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [x] Related to issue #2627

 Description
Fixed json example and space formating
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/2855

-- Commit Summary --

  * kazoo: fixed json body in example
  * kazoo: docbook - fixed Attribute xmlns:xi must be declared 
for element type
  * kazoo: docbook - fixed Document root element chapter, must 
match DOCTYPE root book.
  * kazoo: docbook files space formating

-- File Changes --

M src/modules/kazoo/doc/kazoo_admin.xml (1259)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/2855.patch
https://github.com/kamailio/kamailio/pull/2855.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2855
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:698417d9: modules: readme files regenerated - slack ... [skip ci]

2021-09-16 Thread Kamailio Dev
Module: kamailio
Branch: master
Commit: 698417d9704413fa8e58b1ee53e728efe1c02f34
URL: 
https://github.com/kamailio/kamailio/commit/698417d9704413fa8e58b1ee53e728efe1c02f34

Author: Kamailio Dev 
Committer: Kamailio Dev 
Date: 2021-09-16T14:01:17+02:00

modules: readme files regenerated - slack ... [skip ci]

---

Modified: src/modules/slack/README

---

Diff:  
https://github.com/kamailio/kamailio/commit/698417d9704413fa8e58b1ee53e728efe1c02f34.diff
Patch: 
https://github.com/kamailio/kamailio/commit/698417d9704413fa8e58b1ee53e728efe1c02f34.patch

---

diff --git a/src/modules/slack/README b/src/modules/slack/README
index 58203e80fb..22ede72ebc 100644
--- a/src/modules/slack/README
+++ b/src/modules/slack/README
@@ -4,7 +4,7 @@ Arsen Semenov
 

 
-   Copyright © 2021 arsperger.com
+   Copyright © 2021 arsperger.com
  __
 
Table of Contents
@@ -22,7 +22,7 @@ Arsen Semenov
   3.1. slack url (str)
   3.2. channel (str)
   3.3. username (str)
-  3.4. icon_emogi (str)
+  3.4. icon_emoji (str)
 
 4. Functions
 
@@ -33,7 +33,7 @@ Arsen Semenov
1.1. Set slack webhook URL parameter
1.2. Set channel parameter
1.3. Set username parameter
-   1.4. Set icon_emogi parameter
+   1.4. Set icon_emoji parameter
1.5. slack_send usage
 
 Chapter 1. Admin Guide
@@ -51,7 +51,7 @@ Chapter 1. Admin Guide
 3.1. slack url (str)
 3.2. channel (str)
 3.3. username (str)
-3.4. icon_emogi (str)
+3.4. icon_emoji (str)
 
4. Functions
 
@@ -62,7 +62,7 @@ Chapter 1. Admin Guide
This module provides integration with Slack over webhooks. Slack
integration (https://api.slack.com/messaging/webhooks)
 
-   It relays on libcurl. library (https://curl.se/libcurl).
+   It relays on libcurl through http_client module.
 
 2. Dependencies
 
@@ -72,7 +72,7 @@ Chapter 1. Admin Guide
 2.1. Kamailio Modules
 
The following modules must be loaded before this module:
- * none.
+ * HTTP_CLIENT - the http_client module should be loaded first.
 
 2.2. External Libraries or Applications
 
@@ -85,7 +85,7 @@ Chapter 1. Admin Guide
3.1. slack url (str)
3.2. channel (str)
3.3. username (str)
-   3.4. icon_emogi (str)
+   3.4. icon_emoji (str)
 
 3.1. slack url (str)
 
@@ -121,16 +121,16 @@ modparam("slack", "channel", "#kamailio")
 modparam("slack", "username", "webhookbot")
 ...
 
-3.4. icon_emogi (str)
+3.4. icon_emoji (str)
 
specify an emoji (using colon shortcodes, eg. :white_check_mark:) to
use as the profile photo alongside the message.
 
Default value is :ghost:
 
-   Example 1.4. Set icon_emogi parameter
+   Example 1.4. Set icon_emoji parameter
 ...
-modparam("slack", "icon_emogi", ":ghost:")
+modparam("slack", "icon_emoji", ":ghost:")
 ...
 
 4. Functions


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:996bc9cc: slack: update readme docs [skip ci]

2021-09-16 Thread Arsen Semenov
Module: kamailio
Branch: master
Commit: 996bc9ccecdb2a5a41fb006306eefe3b384c6812
URL: 
https://github.com/kamailio/kamailio/commit/996bc9ccecdb2a5a41fb006306eefe3b384c6812

Author: Arsen Semenov 
Committer: Arsen Semenov 
Date: 2021-09-16T16:56:58+05:00

slack: update readme docs [skip ci]

---

Modified: src/modules/slack/doc/slack_admin.xml

---

Diff:  
https://github.com/kamailio/kamailio/commit/996bc9ccecdb2a5a41fb006306eefe3b384c6812.diff
Patch: 
https://github.com/kamailio/kamailio/commit/996bc9ccecdb2a5a41fb006306eefe3b384c6812.patch

---

diff --git a/src/modules/slack/doc/slack_admin.xml 
b/src/modules/slack/doc/slack_admin.xml
index fa8e6cf6b6..f7b1f4071c 100644
--- a/src/modules/slack/doc/slack_admin.xml
+++ b/src/modules/slack/doc/slack_admin.xml
@@ -20,7 +20,7 @@
Slack integration (https://api.slack.com/messaging/webhooks)


-   It relays on libcurl. library (https://curl.se/libcurl).
+   It relays on libcurl through http_client module.


 
@@ -29,15 +29,14 @@

 Modules

-   The following modules must be loaded before this module:
+   The following modules must be loaded before this module:

-   
-   
-   none.
-   
-   
+   
+   HTTP_CLIENT - the http_client module should be
+   loaded first.
+   

-   
+


External Libraries or Applications
@@ -47,7 +46,7 @@



-   libcurl
+   





___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git: new commits in branch 5.5

2021-09-16 Thread Daniel-Constantin Mierla
- URL:  
https://github.com/kamailio/kamailio/commit/86c5d807ceb896dcc554bf8f1b7fb93c68e69a73
Author: Daniel-Constantin Mierla 
Date:   2021-09-16T13:04:54+02:00

core: print char code on error in parse_addr_spec()

(cherry picked from commit 031fd46980b34a570385f49f168b13af43d84b87)

- URL:  
https://github.com/kamailio/kamailio/commit/e50f95cda2190f29cc572ebc90b4d0e24e212e78
Author: Daniel-Constantin Mierla 
Date:   2021-09-16T13:05:04+02:00

app_ruby: utils/app_ruby_ctl - increade api skeleton functions to 1536

(cherry picked from commit cfb5c453caaee341dc4ee1d9f2cdc5b1c3c87eea)

- URL:  
https://github.com/kamailio/kamailio/commit/44c9608c1d1c82439e76dda861362b97a67f815f
Author: Daniel-Constantin Mierla 
Date:   2021-09-16T13:05:14+02:00

app_ruby: regenerated api skeleton functions

(cherry picked from commit 8b128b7dd544e3e30d615da39e84cec91588249a)

- URL:  
https://github.com/kamailio/kamailio/commit/c19e43e7bfa7d88b49312f1e83c3aae0756e4ae5
Author: Daniel-Constantin Mierla 
Date:   2021-09-16T13:06:38+02:00

core: parse content length - consider multi line header format

- safety checks for log message when not parsing the message buffer

(cherry picked from commit baed515e8aed8e5b505ff716eb57d0c60e582632)

- URL:  
https://github.com/kamailio/kamailio/commit/479a6669da3bd03a9bd54ea4612192ee0b31f86a
Author: Daniel-Constantin Mierla 
Date:   2021-09-16T13:07:01+02:00

core: parser - free local unused param structure

(cherry picked from commit 116ef94420bf6ed9e0ae3bc08a612d8d0c4aa0a7)

- URL:  
https://github.com/kamailio/kamailio/commit/cd4c6ef6022fa6b4453c9e2feb091d3dd7776311
Author: Daniel-Constantin Mierla 
Date:   2021-09-16T13:07:11+02:00

core: parser - ensure content lenght value does not exceed max int

(cherry picked from commit f769011743feccde0fbca8531ab4e1b3563bf155)

- URL:  
https://github.com/kamailio/kamailio/commit/d40de01737781f12cb2383a2891c8590cfb7deba
Author: Daniel-Constantin Mierla 
Date:   2021-09-16T13:07:27+02:00

core: catch empty string on parsing params

(cherry picked from commit 76e6033ff14fec0f2db0b387803b4c5815a91163)

- URL:  
https://github.com/kamailio/kamailio/commit/62e8b4571f746819f460ae83b95e95ecb11472de
Author: Daniel-Constantin Mierla 
Date:   2021-09-16T13:07:56+02:00

core: relocate parse_contact_hader() to parser folder

(cherry picked from commit d2dbe98e072f59138b9974ab8f147bcfef5f983e)

- URL:  
https://github.com/kamailio/kamailio/commit/9ed8820aaf307a756f1f08ccff4459884f62b9a8
Author: Daniel-Constantin Mierla 
Date:   2021-09-16T13:08:05+02:00

core: parser contact - link structure once finishing current one

(cherry picked from commit d6c52a6afdd38cc05a67a25e55e387ad77a9ddf4)

- URL:  
https://github.com/kamailio/kamailio/commit/a0d7837c934df7f4c2223ca7f90f7c439628caf4
Author: Daniel-Constantin Mierla 
Date:   2021-09-16T13:08:35+02:00

core: parser contact - proper update of length in skip_name()

- stop walking name also for unquoted ;, being special char
- small typo

(cherry picked from commit 20db418f1e35f31d7a90d7cabbd22ae989b7266c)

- URL:  
https://github.com/kamailio/kamailio/commit/c6bfa8d8ee14ea27158f09f3b0a04015a1252e1a
Author: Daniel-Constantin Mierla 
Date:   2021-09-16T13:08:46+02:00

core: log unexpected char in parse_param2()

(cherry picked from commit a2511df29adc83544f047cbbdba7a8ba88272930)

- URL:  
https://github.com/kamailio/kamailio/commit/04c7d84874bf60dabede57adb1fc64ebe2260420
Author: Daniel-Constantin Mierla 
Date:   2021-09-16T13:09:43+02:00

core: parser - free unlinked local param structure in parse_to_param()

(cherry picked from commit f624e1701088a94465a06f36a2ef27804b16ec0e)

- URL:  
https://github.com/kamailio/kamailio/commit/92083402b2768b0ab81072feefd94bf754730e7f
Author: Daniel-Constantin Mierla 
Date:   2021-09-16T13:10:00+02:00

core: parse_to_param() check for end of data on escape or start of value

(cherry picked from commit 17a2eec2a8e47939782c1352ddb0fa4d3e73f9d8)

- URL:  
https://github.com/kamailio/kamailio/commit/796e2b203bbe09c6eb30321c579651d96c9b5de5
Author: Daniel-Constantin Mierla 
Date:   2021-09-16T13:12:05+02:00

core: parse content - group operation to avoid overflow

(cherry picked from commit 685817088ff9c72c055e72091fa6f923b824c206)

- URL:  
https://github.com/kamailio/kamailio/commit/5a73c4b2363a533f8a9ed67aff3413223815c52c
Author: Daniel-Constantin Mierla 
Date:   2021-09-16T13:12:17+02:00

core: parse via - safe check for end of buffer

- just in case it is needed to be used for non-zero-terminated strings

(cherry picked from commit 1d3fde1205440296c1d6a54feee5a9d637055bee)

- URL:  
https://github.com/kamailio/kamailio/commit/abbf1fde2efd02f24c806a5be296e4648060b0af
Author: Sergey Safarov 
Date:   2021-09-16T13:12:57+02:00

kazoo: fixed crash when json body is NULL

fixes GH #2794

(cherry picked from commit d8955fc350b48d0c4ca359d03cb9954a48998658)

- URL:  
https://github.com/kamailio/kamailio/commit/b44879a17af848c3acb5524fe1058854c59c95fd
Author: Daniel-Constantin Mierla 

[sr-dev] git:master:32bf3eb2: sqlops: return 1 on success for kemi sql_xquery()

2021-09-16 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 32bf3eb2b27fbefe991a4aabc829f21ecc4e8829
URL: 
https://github.com/kamailio/kamailio/commit/32bf3eb2b27fbefe991a4aabc829f21ecc4e8829

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2021-09-16T13:00:20+02:00

sqlops: return 1 on success for kemi sql_xquery()

- GH #2856

---

Modified: src/modules/sqlops/sql_api.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/32bf3eb2b27fbefe991a4aabc829f21ecc4e8829.diff
Patch: 
https://github.com/kamailio/kamailio/commit/32bf3eb2b27fbefe991a4aabc829f21ecc4e8829.patch

---

diff --git a/src/modules/sqlops/sql_api.c b/src/modules/sqlops/sql_api.c
index d67f30ccef..63c035ca89 100644
--- a/src/modules/sqlops/sql_api.c
+++ b/src/modules/sqlops/sql_api.c
@@ -954,7 +954,7 @@ int sqlops_do_xquery(sip_msg_t *msg, str *scon, str 
*squery, str *xavp)
if(sql_exec_xquery(msg, con, squery, xavp)<0)
goto error;
 
-   return 0;
+   return 1;
 error:
return -1;
 }


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:b8d3971a: slack: reuse http_client api

2021-09-16 Thread Arsen Semenov
Module: kamailio
Branch: master
Commit: b8d3971ab7d2d5d913f629b142dded6322a82172
URL: 
https://github.com/kamailio/kamailio/commit/b8d3971ab7d2d5d913f629b142dded6322a82172

Author: Arsen Semenov 
Committer: Arsen Semenov 
Date: 2021-09-16T15:42:24+05:00

slack: reuse http_client api

---

Modified: src/modules/slack/Makefile
Modified: src/modules/slack/slack.c
Modified: src/modules/slack/slack.h

---

Diff:  
https://github.com/kamailio/kamailio/commit/b8d3971ab7d2d5d913f629b142dded6322a82172.diff
Patch: 
https://github.com/kamailio/kamailio/commit/b8d3971ab7d2d5d913f629b142dded6322a82172.patch


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] topos/topos_redis, error: "could not evaluate a_contact xavu" when in-dialog msg have Record-Route header. (#2852)

2021-09-16 Thread Daniel-Constantin Mierla
@Den4t - as I said I expect to be related to presence of Contact header, not to 
Record-Route header -- it happens that both are set in your example, but 
processing is related to contact header.

Anyhow, till is sorted out how it should work, you can check if the request 
within dialog has Contact header (or Record-Route if really is that case) and 
the set that xavu.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2852#issuecomment-920623348___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] `rpc dispatcher.add group address flags` not work (#2854)

2021-09-16 Thread Daniel-Constantin Mierla
Can you try with master branch or the patch referenced in the commit above?

If works, it will backported.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2854#issuecomment-920620957___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:63ecb827: core: parser - print what is left in buffer if no EoH in get_body()

2021-09-16 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 63ecb827631189d27da6a85d41149985d95fc479
URL: 
https://github.com/kamailio/kamailio/commit/63ecb827631189d27da6a85d41149985d95fc479

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2021-09-16T11:03:52+02:00

core: parser - print what is left in buffer if no EoH in get_body()

---

Modified: src/core/parser/msg_parser.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/63ecb827631189d27da6a85d41149985d95fc479.diff
Patch: 
https://github.com/kamailio/kamailio/commit/63ecb827631189d27da6a85d41149985d95fc479.patch

---

diff --git a/src/core/parser/msg_parser.c b/src/core/parser/msg_parser.c
index 795c96a350..5b7fab524d 100644
--- a/src/core/parser/msg_parser.c
+++ b/src/core/parser/msg_parser.c
@@ -1356,8 +1356,10 @@ char* get_body(sip_msg_t* const msg)
(*(msg->unparsed)=='\n' || 
*(msg->unparsed)=='\r' ) ) {
offset = 1;
} else {
-   LM_ERR("failed to locate end of headers (%p %p - %d %d [%s])\n",
-   msg->buf, msg->unparsed, msg->len, len, 
msg->unparsed);
+   LM_ERR("failed to locate end of headers (%p %p - %d %d 
[%.*s])\n",
+   msg->buf, msg->unparsed, msg->len, len,
+   (lenlen)?(msg->len-len):0,
+   (lenlen)?msg->unparsed:"");
return 0;
}
 


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:489eb674: misctest: sync with fuzz msg code

2021-09-16 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 489eb6742997f8e4f2dc56c894af6b8ed5ef4d33
URL: 
https://github.com/kamailio/kamailio/commit/489eb6742997f8e4f2dc56c894af6b8ed5ef4d33

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2021-09-16T11:00:56+02:00

misctest: sync with fuzz msg code

---

Modified: src/modules/misctest/misctest_mod.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/489eb6742997f8e4f2dc56c894af6b8ed5ef4d33.diff
Patch: 
https://github.com/kamailio/kamailio/commit/489eb6742997f8e4f2dc56c894af6b8ed5ef4d33.patch

---

diff --git a/src/modules/misctest/misctest_mod.c 
b/src/modules/misctest/misctest_mod.c
index 68f70718fc..0867c1ae46 100644
--- a/src/modules/misctest/misctest_mod.c
+++ b/src/modules/misctest/misctest_mod.c
@@ -39,10 +39,14 @@
 #include "../../core/parser/parse_uri.c"
 #include "../../core/parser/parse_hname2.h"
 #include "../../core/parser/contact/parse_contact.h"
+#include "../../core/parser/parse_to.h"
+#include "../../core/parser/parse_from.h"
 #include "../../core/parser/parse_refer_to.h"
 #include "../../core/parser/parse_ppi_pai.h"
 #include "../../core/parser/parse_privacy.h"
 #include "../../core/parser/parse_diversion.h"
+#include "../../core/parser/parse_identityinfo.h"
+#include "../../core/parser/parse_disposition.h"
 
 MODULE_VERSION
 
@@ -325,22 +329,38 @@ static int misctest_message_init(void)
goto cleanup;
}
 
+   parse_headers(, HDR_EOH_F, 0);
+
parse_sdp();
 
-   parse_headers(, HDR_TO_F, 0);
+   parse_from_header();
+
+   parse_from_uri();
+
+   parse_to_header();
+
+   parse_to_uri();
 
parse_contact_header();
 
parse_refer_to_header();
 
-   parse_to_header();
-
parse_pai_header();
 
parse_diversion_header();
 
parse_privacy();
 
+   parse_content_disposition();
+
+   parse_identityinfo_header();
+
+   str uri;
+   get_src_uri(, 0, );
+
+   str ssock;
+   get_src_address_socket(, );
+
 cleanup:
free_sip_msg();
 


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] `rpc dispatcher.add group address flags` not work (#2854)

2021-09-16 Thread hance2010


### Description



kamcmd dispatcher add 1 sip:1.2.3.4  # work

kamcmd dispatcher add 1 sip:1.2.3.4  8 maxload=20 # work

but, kamcmd dispatcher add 1 sip:1.2.3.4 8  # not work

### Troubleshooting

 Reproduction



 Debugging Data



```
(paste your debugging data here)
```

 Log Messages



```
(paste your log messages here)
```

 SIP Traffic



```
(paste your sip traffic here)
```

### Possible Solutions



### Additional Information

  * **Kamailio Version** - output of `kamailio -v`
 kamailio 5.5.2
```
(paste your output here)
```

* **Operating System**:
Debian10


```
(paste your output here)
```


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2854___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:7894fb47: dispatcher: init attrs value when param not given to rpc add

2021-09-16 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 7894fb470e707622b077d565763c9cfb7c654da5
URL: 
https://github.com/kamailio/kamailio/commit/7894fb470e707622b077d565763c9cfb7c654da5

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2021-09-16T08:37:55+02:00

dispatcher: init attrs value when param not given to rpc add

- GH #2854

---

Modified: src/modules/dispatcher/dispatcher.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/7894fb470e707622b077d565763c9cfb7c654da5.diff
Patch: 
https://github.com/kamailio/kamailio/commit/7894fb470e707622b077d565763c9cfb7c654da5.patch

---

diff --git a/src/modules/dispatcher/dispatcher.c 
b/src/modules/dispatcher/dispatcher.c
index 679acbe2aa..4ed98919b7 100644
--- a/src/modules/dispatcher/dispatcher.c
+++ b/src/modules/dispatcher/dispatcher.c
@@ -1854,7 +1854,7 @@ static void dispatcher_rpc_add(rpc_t *rpc, void *ctx)
 {
int group, flags, nparams;
str dest;
-   str attrs;
+   str attrs = STR_NULL;
 
flags = 0;
 
@@ -1862,7 +1862,7 @@ static void dispatcher_rpc_add(rpc_t *rpc, void *ctx)
if(nparams < 2) {
rpc->fault(ctx, 500, "Invalid Parameters");
return;
-   } else if (nparams < 3) {
+   } else if (nparams <= 3) {
attrs.s = 0;
attrs.len = 0;
}


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:f2b133e2: core: free params list at end on error state inside parse_addr_spec

2021-09-16 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: f2b133e24e29f9f0ce7ba568a5d4564c7b0f8f31
URL: 
https://github.com/kamailio/kamailio/commit/f2b133e24e29f9f0ce7ba568a5d4564c7b0f8f31

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2021-09-16T08:08:18+02:00

core: free params list at end on error state inside parse_addr_spec

---

Modified: src/core/parser/parse_addr_spec.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/f2b133e24e29f9f0ce7ba568a5d4564c7b0f8f31.diff
Patch: 
https://github.com/kamailio/kamailio/commit/f2b133e24e29f9f0ce7ba568a5d4564c7b0f8f31.patch

---

diff --git a/src/core/parser/parse_addr_spec.c 
b/src/core/parser/parse_addr_spec.c
index 99138dcaf4..1ff5a16908 100644
--- a/src/core/parser/parse_addr_spec.c
+++ b/src/core/parser/parse_addr_spec.c
@@ -896,6 +896,9 @@ char *parse_addr_spec(char *const buffer, const char *const 
end,
status);
goto error;
}
+   if(to_b->error == PARSE_ERROR) {
+   free_to_params(to_b);
+   }
return tmp;
 
 error:


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev