[asterisk-dev] classifying SIP peers

Daniel Pocock daniel at pocock.com.au
Mon Feb 10 13:16:13 CST 2014



I'm looking at the way chan_sip.c matches peers (by name or by IP/port)

It may be possible to add an extra discriminator, for example, it could
be called "class"

[my-proxy-a]
host=192.168.100.1
class=group-a
dtlsenable=no

[my-proxy-b]
host=192.168.100.1
class=group-b
dtlsenable=yes


The proxy then signals the desired class in the request URI, e.g.

   INVITE sip:1234 at 192.168.100.2;x-asterisk-class=group-b

If no tag is supplied or it doesn't match, it would fall back to a peer
with class=<nothing> (ensuring existing behavior is consistent)

It appears that this logic can be inserted in most of the places where
callbackexten is used as a discriminator for peer selection.

Has anybody else already started on anything like this on a branch or in
any third-party patch?



More information about the asterisk-dev mailing list