Summary:ASTERISK-13316: [patch] add option to configure the SIP type in users.conf
Reporter:klaus3000 (klaus3000)Labels:
Date Opened:2009-01-07 09:34:46.000-0600Date Closed:2011-06-07 14:02:55
Versions:Frequency of
Environment:Attachments:( 0) patch_chan_sip_users.conf-types_1.4.22.txt
( 1) patch_chan_sip_users.conf-types_trunk.txt
Description:Currently, users provisioned in users.conf are added to chan_sip as "friend". The attached patch allows to specify the the type in users.conf using the directive siptype=...

Thus it does not influence with other channel types (in chan_h323 and chan_iax)


The trunk patch is untested (but compiles), the patch for 1.4.22 is tested.
Comments:By: Olle Johansson (oej) 2009-01-12 09:14:31.000-0600

At some point we have to put a limit on what we support in users.conf, otherwise ALL options will have to be ported over. I think we really need to rethink this architecture. Users.conf is not a replacement for sip.conf at all.

By: klaus3000 (klaus3000) 2009-01-12 14:54:42.000-0600

on one hand I like users.conf as it provides you with only one file for user provisioning, on the other hand I do not like it because it changes the file when changing the vmsecret. IMO there should be a mechanism to store user provisioning data on one place (done by the admin) and another place to store user preferences  (vmsecret, vm email address, call forwarding ...)

By: klaus3000 (klaus3000) 2009-01-23 11:17:15.000-0600

Nevertheless I think this is a useful addition, for example the simple scenario:

user1: +43111111
user2: +43222222

user 1 calls a mobile phone. The mobile phone forwards to user 2.

user1  user2    Asterisk         GW
  Asterisk challenges
  the SIP friend
                                   ISDN......forwarding to +4322222

                    This INVITE has a From: +431111111
                    although the GW is defined as peer, Asterisk
                    challenges the GW because it thinks
                    that the call is coming from user1 as the
                    "user" of user1 is stronger than the "peer" of the gateway.

Thus, defining the users only as "peer" instead of "friend" is really useful (problem exists in 1.4, not sure about trunk)

By: Olle Johansson (oej) 2009-01-23 15:08:42.000-0600

Well, Klaus, we only add new features in trunk, so I guess you need to check if this is needed in trunk at all.

By: klaus3000 (klaus3000) 2009-01-23 15:28:20.000-0600

Of course I know. I just hoped that you know by heart what matches first - user or peer.

By: Olle Johansson (oej) 2009-01-23 15:35:16.000-0600

Attend my trainings and everything will be very clear :-)

- Asterisk matches first the user with the From: user
- Then the peer on IP/port.

By: klaus3000 (klaus3000) 2009-01-23 17:16:53.000-0600

I fear that even if I would attend your trainings I can't remeber all that stuff.

Nevertheless if in 1.6 still user matches before peer then the problem is for sure also in 1.6/trunk

By: Tilghman Lesher (tilghman) 2009-01-24 08:02:15.000-0600

users.conf is meant to be a "simple" interface to add users to multiple configurations at once.  If you want the functionality you are describing, you should alter sip.conf, not modify users.conf to be a universal config.