hnimminh / libresbc

An open source Session Border Controller 🌟 The SBC you dream about 🗽 LibreSBC will help you save thousands of dollars.
https://github.com/hnimminh/libresbc
MIT License
357 stars 80 forks source link

[BUG] Update sipprofile API #94

Closed jj1682000 closed 1 year ago

jj1682000 commented 1 year ago

Describe the bug

Can not update below: "enable_timer" "session_timeout" "minimum_session_expires"

To Reproduce

Actual behavior Detail sipprofile:

{ "name": "sipprofile_FS_loopback", "desc": "sipprofile_FS_loopback", "user_agent": "LibreSBC", "sdp_user": "LibreSBC", "local_network_acl": "nat.auto", "enable_100rel": false, "ignore_183nosdp": true, "sip_options_respond_503_on_busy": true, "disable_transfer": false, "manual_redirect": false, "enable_3pcc": false, "enable_compact_headers": false, "dtmf_type": "rfc2833", "media_timeout": 1800, "rtp_rewrite_timestamps": false, "context": "access", "sip_port": 5080, "sip_address": "netalias_FS_loopback", "rtp_address": "netalias_external", "tls": false, "tls_only": false, "sips_port": 5061, "tls_version": "tlsv1.2", "realm": "sipprofile_FS_loopback.libresbc", "engagements": [ "in:interconnection_loopback" ] }

Expected behavior Detail sipprofile: { "name": "sipprofile_FS_loopback", "desc": "sipprofile_FS_loopback", "user_agent": "LibreSBC", "sdp_user": "LibreSBC", "local_network_acl": "nat.auto", "enable_100rel": false, "ignore_183nosdp": true, "sip_options_respond_503_on_busy": true, "disable_transfer": false, "manual_redirect": false, "enable_3pcc": false, "enable_compact_headers": false, "dtmf_type": "rfc2833", "media_timeout": 1800, "rtp_rewrite_timestamps": false, "context": "access", "sip_port": 5080, "sip_address": "netalias_FS_loopback", "rtp_address": "netalias_external", "tls": false, "tls_only": false, "sips_port": 5061, "tls_version": "tlsv1.2", "realm": "sipprofile_FS_loopback.libresbc", "engagements": [ "in:interconnection_loopback" ] }

Log & Screenshots

Additional context

hnimminh commented 1 year ago

it is not a bug, when enable_timer = false, 'enable_timer', 'session_timeout', 'minimum_session_expires' will be removed since it it default setting as disabling.

what is different between Expected & Actual, can you highlight them?

jj1682000 commented 1 year ago

sorry, this is correct Expected:

{ "name": "sipprofile_FS_loopback", "desc": "sipprofile_FS_loopback", "user_agent": "LibreSBC", "sdp_user": "LibreSBC", "local_network_acl": "nat.auto", "enable_100rel": false, "ignore_183nosdp": true, "sip_options_respond_503_on_busy": true, "disable_transfer": false, "manual_redirect": false, "enable_3pcc": false, "enable_compact_headers": false, "enable_timer": false, "session_timeout": 1800, "minimum_session_expires": 120, "dtmf_type": "rfc2833", "media_timeout": 1800, "rtp_rewrite_timestamps": false, "context": "access", "sip_port": 5080, "sip_address": "netalias_FS_loopback", "rtp_address": "netalias_external", "tls": false, "tls_only": false, "sips_port": 5061 }

hnimminh commented 1 year ago

when enable_timer": false, session_timeout and minimum_session_expires is not take effect. server will work as default behavior. (there fields removed). anyway if you want them appear event it is default. please open new enhancement or Pull Request are welcome.