[asterisk-dev] *** SPAM *** Re: pjsip and RTP

Joshua C. Colp jcolp at sangoma.com
Wed Nov 27 08:38:42 CST 2019


On Wed, Nov 27, 2019 at 7:16 AM Jaco Kroon <jaco at uls.co.za> wrote:

<snip>

Then also, I think I've asked this before, and it wasn't possible, but
>> maybe things have changed.
>>
>> Is it possible to possible to vary endpoint parameters based on the used
>> transport?  For example:
>>
>> When using SIP/WSS ice_support = yes, else ice_support = no (as but one
>> example).
>>
>> Another idea is to somehow manipulate different transports into different
>> endpoints, eg:
>>
>> [user-rtc]
>> type=endpoint
>> ice_support=yes
>>
>> [user-tls]
>> type=endpoint
>> ... params for tls
>>
>> Possibly point them all at the same AOR.
>>
>> But the I need support from transport to either prefix or suffix the
>> username or the realm with a defined string, eg:
>>
>> [tls]
>> type=transport
>> username_sufix=-tls
>>
>> To suite the above.
>>
>> The other alternative is to vary this client-side ... which is
>> potentially very error prone (but which I'll do to test the concept at
>> least).  For now the urgent one for me to sort out is the ICE candidate
>> selection.
>>
>> Happy to write the patches, would just like to set the direction correct
>> first.
>>
>
> Noone has written such functionality.
>
> Happy.
>
> I'd like to take a crack at this.  I think manipulating the username might
> be simpler and affect far less code at the end.  Your opinion on this, and
> an indication of where to get started would be greatly appreciated.
>

I don't deploy this, so you'd probably want feedback from people who are
doing similar things as to whether it is actually viable/useful for them.
>From a high level perspective as a user it feels strange to place further
meaning into the name of the endpoint with the transport as well, but
that's just me. As for implementation the entire endpoint identification
mechanism is pluggable and a standalone module[1] can be written. Writing a
new one is one method, or extending an existing one. For adding options to
transports you'd need to extend the transport[2], and then you'd have to
determine what transport matches the one the request came in on.

Extending endpoint specific options to transports is also extremely
complicated because things just are fundamentally not written that way
on purpose. You don't know what transport is used until a message is sent
(unless explicitly configured), and the transport can end up changing.

[1]
https://github.com/asterisk/asterisk/blob/master/res/res_pjsip_endpoint_identifier_user.c
[2]
https://github.com/asterisk/asterisk/blob/master/res/res_pjsip/config_transport.c

-- 
Joshua C. Colp
Senior Software Developer
Sangoma Technologies
Check us out at www.sangoma.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20191127/151ff5c3/attachment.html>


More information about the asterisk-dev mailing list