Skip to content
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

USRLOC JSONRPC ul.add - ability to set all entry fields #1225

Closed
kbdfck opened this issue Aug 31, 2017 · 2 comments
Closed

USRLOC JSONRPC ul.add - ability to set all entry fields #1225

kbdfck opened this issue Aug 31, 2017 · 2 comments

Comments

@kbdfck
Copy link

kbdfck commented Aug 31, 2017

Looking into code it seems RPC functions of USRLOC don't allow setting all fields for USRLOC entry, for example, Received and Socket.

It would be great if we can set these, because we need to have ability to transfer contacts from other server to Kamailio.

I think at present this can be done sending specially crafted fake REGISTER packets or calling special route from HTTP with some tricks for saving contact and received, but as for me it would be great to set it from RPC because we already have ul.add method.

It also would be cool if we can use named parameters in JSONRPC params: {} section with names corresponding to usrloc fields, like 'table', 'AOR', 'received' and so on. Maybe on specual key not to mix with current 'params'.

@miconda
Copy link
Member

miconda commented Sep 3, 2017

The order of parameters matters, it's how all rpc commands are implemented -- there are other RPC transports than jsonrpc (e.g., binrpc, xmlrpc) and the order is the common requirement that implementation relies on.

For jsonrpc it may work to provide params with names (iirc), but the order must be kept.

@miconda
Copy link
Member

miconda commented Sep 17, 2017

I just pushed the commit that allows setting received and socket fields via rpc ul.add. It is available in master branch.

@miconda miconda closed this as completed Sep 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants