OpenSIPS / opensips

OpenSIPS is a GPL implementation of a multi-functionality SIP Server that targets to deliver a high-level technical solution (performance, security and quality) to be used in professional SIP server platforms.
https://opensips.org
Other
1.27k stars 579 forks source link

[FEATURE] Socket tag name to be used in other modules #2303

Open hydrosine opened 3 years ago

hydrosine commented 3 years ago

Is your feature request related to a problem? Please describe.

Deploying lan/wan bridges using dispatcher every instance needs its own variation of socket ip's filled in the Dispatcher DB. Or the outbound socket needs to be rewritten somewhere in the script. this cannot be done without IP information, as you need to set the $socket_x via IP values. There is no method to retrieve socket info based on for example the tag name.

Describe the solution you'd like Expand the new 3.1.x socket_in, socket_out system, maybe add a socket information retrieve function, socket_info()?

  1. Make it possible to set $socket_in/out based on a tag name, ie,$socket_out=$socket_info("tag INTERNAL", "proto:ip:port")

  2. This would also be nice for modules like dispatcher in which you can define a socket to be used in the DB scheme. Maybe give it tag support? so instead of udp:x.x.x.x:port it also get support for " tag:INTERNAL" as value?

Implementation

Describe alternatives you've considered templating the IP's in the script and deploying them via m4. using TXTDB this is also quite doable for DB, for SQL it need a bit more effort.

Additional context Long time no ticket! good to be back ;)

stale[bot] commented 3 years ago

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

bogdan-iancu commented 3 years ago

Hi @hydrosine , this is a great idea. A function to retrieve the socket description (as proto:ip:port) based on its tag will be very useful indeed. Let me give some thoughts here.