[asterisk-dev] res_pjsip: sending to arbitrary URI
kharwell at digium.com
Tue Nov 12 11:38:03 CST 2013
So I think this was mentioned at AstriDevCon 2013 - Do we want to or
should we be able to send outbound SIP messages to an arbitrary URI vs
always having to specify an endpoint?
Currently in res_pjsip land in order to send stuff outbound an endpoint
is required. Since there will be cases where one may need to send to a
URI with no associated endpoint this poses a problem.
One solution is to just implement the ability to send to an arbitrary
URI. Unfortunately, this doesn't exactly fit in with the current way of
doing things and might lead to some unexpected side effects. Also this
might lead people wondering why this functionality is allowed in one
place and not another (inconsistency not good).
Two other solutions have been suggested by Mark Michelson that fit in
better with the current framework:
1) Use a specially-named endpoint (maybe called "default_outbound").
This endpoint can be automatically created when res_pjsip is loaded and
contain nothing but the default values for the endpoint. If people want
to tweak default behavior, then they can create an endpoint called
"default_outbound" in their pjsip.conf file and set appropriate values
on it. This approach has the advantage of "just working" out of the box
and allowing for overriding of the default behavior if desired.
2) Create a new option for PJSIP global configuration (maybe called
"default_outbound_endpoint") that indicates an endpoint to be used when
sending an outbound request to a URI. This approach has the advantage of
not creating any "secret" endpoints that the user did not explicitly
place in the configuration file.
I kind of like #2 as there is nothing hidden and it allows the end user
to name the default outbound endpoint. Thoughts? Other ideas?
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
More information about the asterisk-dev