### Description What I did: I enabled the pua_dialoginfo module to publish changes for both the caller and the callee. What I expected: PUBLISH to be generated for the caller and the callee What actually happened: PUBLISH is only generated for the callee.
### Troubleshooting I troubleshooted the issue by adding LM_ERR messages at various point in the pua_dialoginfo.c
#### Reproduction Add a db-url as modparam to pua Do not add any modparam to pua_dialoginfo. Then make a phone call while making sure dialog.dlg_manage() is called to track the call.
#### Debugging Data Not applicable
#### Log Messages pua_dialoginfo [dialog_publish.c:303]: dialog_publish(): failed to parse the PUBLISH R-URI
### Possible Solutions I tracked the issue to line 840 of pua_dialoginfo.c (see enclosed patch file), where dlginfo->pubruris_caller->s.s is set to the value of dlginfo->from_uri but dlginfo->pubruris_caller->s.len is not set to anything (left at zero). So I added a line to set the len value to the len value of dlginfo->from_uri.len See patch below:
``` diff -ru a/src/modules/pua_dialoginfo/pua_dialoginfo.c b/src/modules/pua_dialoginfo/pua_dialoginfo.c --- a/src/modules/pua_dialoginfo/pua_dialoginfo.c 2024-05-02 11:14:34.150097771 -0600 +++ b/src/modules/pua_dialoginfo/pua_dialoginfo.c 2024-05-02 11:09:30.855960974 -0600 @@ -838,6 +838,8 @@ } memset(dlginfo->pubruris_caller, 0, sizeof(struct str_list)); dlginfo->pubruris_caller->s.s = shm_str2char_dup(&dlginfo->from_uri); + dlginfo->pubruris_caller->s.len = dlginfo->from_uri.len; + if(!dlginfo->pubruris_caller->s.s) { free_dlginfo_cell(dlginfo); return NULL;
```
### Additional Information version: kamailio 5.8.1 (x86_64/linux) 384843 flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: 384843 compiled on 13:45:08 May 2 2024 with gcc 10.2.1
* **Operating System**: Linux yto11-stg-smf-vtr1.vcn.ms 5.10.0-27-amd64 #1 SMP Debian 5.10.205-2 (2023-12-31) x86_64 GNU/Linux
Hey @michelpelletier07,
Thanks for reporting this! Your patch seems to fix the problem and is in line with the rest of the code in the file regarding the `s.len` variables.
Would you like to create the PR yourself since you did the work? Otherwise, I can do it of course.
If you choose to do so, please make sure to keep in line with the contributing guidelines (mainly the commit message format):
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md#com...
Thanks
Hi Xenofon, Please go ahead and do the PR. Thank you. Cheers,
Michel Pelletier
On Fri, Jun 7, 2024 at 6:41 AM Xenofon Karamanos ***@***.***> wrote:
Hey @michelpelletier07 https://github.com/michelpelletier07,
Thanks for reporting this! Your patch seems to fix the problem and is in line with the rest of the code in the file regarding the s.len variables.
Would you like to create the PR yourself since you did the work? Otherwise, I can do it of course.
If you choose to do so, please make sure to keep in line with the contributing guidelines (mainly the commit message format):
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md#com...
Thanks
— Reply to this email directly, view it on GitHub https://github.com/kamailio/kamailio/issues/3838#issuecomment-2154756479, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYYXXBGW4RJP5QXAWX6KIDZGGS7ZAVCNFSM6AAAAABHEFX5B2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJUG42TMNBXHE . You are receiving this because you were mentioned.Message ID: ***@***.***>
PR got merged and will be also backported in one of the next minor releases, closed.
Closed #3838 as completed.