[asterisk-users] user address format

Paul Ianas Paul.Ianas at level7.ro
Wed Oct 11 05:51:17 MST 2006


Let's say that I could modify some stuff in register_verify function
(which returns -2 for my request), but I would also need to modify the
sip_request struct and this implies things I don't know very well.

 

As I can see, struct sip_peer doesn't contain any information about user
number (telephone number). So, one can not send number information when
registering? :-(

 

--

Paul Ianas

Programming Engineer

Level 7 Software

Timisoara, 59D Bucovinei

phone: 0744137020

email: paul.ianas at level7.ro

________________________________

From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Paul Ianas
Sent: Wednesday, October 11, 2006 3:17 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] user address format

 

Hello everybody!

 

[Introduction]

This is a quite long message, but I think the problem is interesting.

 

 

 

[The problem]

Does anyone know how can I tell Asterisk that a certain user has a
certain telephone number (or address)? For example, I have some
registered users, but nor the client (X-lite) nor the server (Asterisk)
specifies what telephone number has the user. I don't want to specify
fot each user 2 lines like this in extensions.conf because if I have
let's say 200 user-agents, it will be quite time-consuming to
introduce/change user info or make some modifications to the dial plan:

 

This would be the current solution (user pianas must have address 102):

 

=== Settings in sip.conf for user pianas ===

 

[pianas]

type=friend

username=pianas

secret=somepassword

context=input                            ; see below the input context

callerid="Paul Ianas" <102>

host=dynamic

nat=no

canreinvite=yes

qualify=300

call-limit=10

 

=== Settings in extensions.conf (for specifying that user pianas has
address 102) ===

; input context

[input]

......

//other users

......

exten => 102,1,SetCallerId,${FWDCIDNAME}

exten => 102,2,Dial(SIP/pianas)

......

//other users

//other extensions

......

 

 

[Some logs from the console]

 

I have a media gateway (AT-RG 613 TX) where I define a user (pianas)
with address 102. That means user pianas must register with telephone
number 102. If the server is configured with another address (telephone
number) for user pianas, I should get an "invalid number" log (or
something like that). Here is the response from the server:

 

Oct 11 14:35:14 NOTICE[7877]: chan_sip.c:11084 handle_request_register:
Registration from 'pianas <sip:102 at 85.186.33.226>' failed for
'10.56.74.245' - Username/auth name mismatch

 

If I don't specify the number there is no problem in registering the
user (the same settings without the user's address specified):

 

    -- Registered SIP 'pianas' at 10.56.74.245 port 56742 expires 60

 

And if I don't set the user's address and I give a wrong password, I get
the following message:

 

Oct 11 14:42:36 NOTICE[7877]: chan_sip.c:11084 handle_request_register:
Registration from 'pianas <sip:pianas at 85.186.33.226>' failed for
'10.56.74.245' - Wrong password

 

Please observe the difference between these 2 users:
<sip:102 at 85.186.33.226> and <sip:pianas at 85.186.33.226>

 

 

[My conclusion]

My conclusion is that Asterisk doesn't know to register users with
specified address (it doesn't recognize this user address format) or
there is some setting in sip.conf that I don't know.

Shouldn't the address be specified in [user] definition?

 

[Please help]

Maybe someone had the same problem (I'm a newby in Asterisk) and can
give me the solution; this should be a quite basic facility that a SIP
server provides.

10x, and sorry for this long message! :-)

 

PS: I didn't find any information about this problem in "Asterisk: The
Future of Telephony"

 

--

Paul Ianas

Programming Engineer

Level 7 Software

Timisoara, 59D Bucovinei

phone: 0744137020

email: paul.ianas at level7.ro

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20061011/dc2e39cd/attachment-0001.htm


More information about the asterisk-users mailing list