New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nathelper : added new function set_alias_to_pv #2124
Conversation
added new function proto type int to str
new function that read alias then write to given avp as sip uri
added description of set_alias_to_avp function
This function , later , will be used for keepalive modules. I have new updates for keepalive module. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks you Yasin for the pull request. I've did a quick review, and have added some comments and questions to the code.
I will solve problems then add a docs. Thanks for support Henning |
fixed memory-leak for new function set_alias_to_avp fixed some spelling added return for functions write_to_avp and alias_to_uri
Hello, |
Looking at the resulting diff of the PR (https://patch-diff.githubusercontent.com/raw/kamailio/kamailio/pull/2124.diff), I see that the src/core/parser/parse_uri.h has a single empty line removed. I guess that is not really needed. The the name of the C function exported to kamailio.cfg file is named Then, you should export the new function to kemi interface as well, which is more or less the |
function set_alias_to_avp_f is renamed to w_set_alias_to_avp added kemi interface
added documents for set_alias_to_avp function
Looking once again at the code, the function can set the value in any (pseduo-)variable, not only in AVP, right? Because it is using pv->setf() function, not the AVP specific functions. Do you want to restrict to writing to AVP or it is fine writing to any variable? |
I dont want to restrict because it will be use to add keepalive module as a destination or it can be use to setting/checking/comparing other variables like $du , $ru etc. |
If you don't want to restrict it to avps, probably it would be good to rename the function (code and configuration file export) to "set_alias_to_pv" or something like this. I guess this was intention of Daniels question. |
set_alias_to_avp renamed to set_alias_to_pv
Thank you, merged. I will add 1-2 small formatting changes directly in git master. If there are more changes, they can be done directly in git master as well. |
Pre-Submission Checklist
in
doc/
subfolder, the README file is autogenerated)Type Of Change
Checklist:
Description
new function that read alias from Contact header then write to given avp as sip uri