[asterisk-users] How to restrict registrations by useragent?

Danny Nicholas danny at debsinc.com
Tue Jul 21 11:38:00 CDT 2009


You could always do a force-off using cron and/or AGI.    Here's a better
way (IMO);  instead of 

- exten => s,1,agentlogin

 

Try

 

-          exten => s,1,Set(PHONETYPE=$SIPCHANNEL(useragent))

-          exten => s,2,Gotoif($["${PHONETYPE}" = "XLITE"]?ok

-          exten => s,3,playback(cant-login)

-          exten => s,4,hangup

-          exten => s,5(ok),agentlogin

 

You would have to change XLITE to whatever the actual value was but this
should work.

 

  _____  

From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Zeeshan
Zakaria
Sent: Tuesday, July 21, 2009 10:30 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] How to restrict registrations by useragent?

 

I saw a patch which somebody wrote in 2005, which never made its way into
any releases of Asterisk. It gave an option of "alloweduseragent" in
sip.conf. Is there any other similar solution out there?

Zeeshan

On Mon, Jul 20, 2009 at 6:10 PM, Zeeshan Zakaria <zishanov at gmail.com> wrote:

Hi,

I have an extension which I want to use only for x-lite, and don't want
anybody to register IP phones on it. I can see that 'sip show peer 3547'
shows softphone's id. Is there a way to restrict registrations on this
extension by useragent id?

I googled but so far couldn't find any way to do it.

-- 
Zeeshan A Zakaria




-- 
Zeeshan A Zakaria

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090721/36b9f45c/attachment.htm 


More information about the asterisk-users mailing list