News & Reviews
More How-To's & Tips More News
More Reviews Device Configuration Tools
No account yet? Create one
Forgot your Username or Password?

Welcome to the Voxilla VoIP Forum.

Voxilla has been a trusted source for accurate, up-to-date information on the IP Communications industry since 2002. A dedicated staff of reporters and engineers produce feature articles and product reviews to keep industry watchers abreast of the people, companies, and trends driving a fast moving market.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.





Closed Thread
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old October 22nd, 2005, 11:17 PM
jmattwood jmattwood is offline
Senior Member
 
Join Date: Feb 2005
Location: Bradford UK
Posts: 195
jmattwood
Default Authenticate DISA with CLID (A@H1.3)

I apologise if this has been asked & answered before, however, I find the forum search rather unhelpful!

I've successfully set up a "one-ringy-dingy" to enable me to dial in remotely & have my asterisk hang up the call, ring me back, ask for a PIN & provide me with a VIOP dialtone.

I would like to be able to authenticate the call by CLID as well as by PIN. ie. I want asterisk to only call back & ask for the PIN if it recognises the CLID of the caller.

Is this possible?

Below are the relevant entries in extensions_custom.conf

[custom-sip-in]
exten => 1234567,1,NoOp(Incoming call from Sip #1234567)
exten => 1234567,2,Congestion
exten => 1234567,3,Hangup
exten => h,1,SetCIDNum(${CALLERIDNUM:0})
exten => h,2,System(echo channel: SIP/spa mobile/${CALLERIDNUM} > /tmp/${CALLERIDNUM})
exten => h,3,System(echo context: custom-disa-callout >> /tmp/${CALLERIDNUM})
exten => h,4,System(echo extension: ${CALLERIDNUM} >> /tmp/${CALLERIDNUM})
exten => h,5,System(echo priority: 1 >> /tmp/${CALLERIDNUM})
exten => h,6,System(echo callerid: 012345678 >> /tmp/${CALLERIDNUM}) ; Your CallerID for your SIP account goes here
exten => h,7,System(echo sleep 8 > /tmp/${CALLERIDNUM}.2)
exten => h,8,System(echo cp /tmp/${CALLERIDNUM} /var/spool/asterisk/outgoing >> /tmp/${CALLERIDNUM}.2)
exten => h,9,System(chmod 775 /tmp/${CALLERIDNUM}.2)
exten => h,10,System(/tmp/${CALLERIDNUM}.2)
exten => h,11,Hangup()

[custom-disa-callout]
exten => s,1,Playback(enter_pin)
exten => s,2,Authenticate(987654)
exten => s,3,Background(pls-wait-connect-call)
exten => s,4,DISA(no-password|from-internal)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2 (permalink)  
Old October 23rd, 2005, 08:10 AM
chandave chandave is offline
Senior Member
 
Join Date: Jul 2005
Posts: 362
chandave is an unknown quantity at this point
Send a message via MSN to chandave
Default Re: Authenticate DISA with CLID (A@H1.3)

Quote:
Originally Posted by jmattwood
...I would like to be able to authenticate the call by CLID as well as by PIN. ie. I want asterisk to only call back & ask for the PIN if it recognises the CLID of the caller.
entries in extensions_custom.conf
[custom-sip-in]
exten => 1234567,1,NoOp(Incoming call from Sip #1234567)
exten => 1234567,2,Congestion
exten => 1234567,3,Hangup
exten => h,1,SetCIDNum(${CALLERIDNUM:0})
exten => h,2,GotoIf($["x${CALLERIDNUM}x" = "xOK_CID1x"]?100)
exten => h,3,GotoIf($["x${CALLERIDNUM}x" = "xOK_CID2x"]?100)
exten => h,4,GotoIf($["x${CALLERIDNUM}x" = "xOK_CID3x"]?100)
exten => h,5,GotoIf($["x${CALLERIDNUM}x" = "xOK_CID4x"]?100)
:
exten => h,98,GotoIf($["x${CALLERIDNUM}x" = "xOK_CID97x"]?100)
exten => h,99,Goto(999)

exten => h,100,System(echo channel: SIP/spa mobile/${CALLERIDNUM} > /tmp/${CALLERIDNUM})
exten => h,101,System(echo context: custom-disa-callout >> /tmp/${CALLERIDNUM})
exten => h,102,System(echo extension: ${CALLERIDNUM} >> /tmp/${CALLERIDNUM})
exten => h,103,System(echo priority: 1 >> /tmp/${CALLERIDNUM})
exten => h,104,System(echo callerid: 012345678 >> /tmp/${CALLERIDNUM}) ; Your CallerID for your SIP account goes here
exten => h,105,System(echo sleep 8 > /tmp/${CALLERIDNUM}.2)
exten => h,106,System(echo cp /tmp/${CALLERIDNUM} /var/spool/asterisk/outgoing >> /tmp/${CALLERIDNUM}.2)
exten => h,107,System(chmod 775 /tmp/${CALLERIDNUM}.2)
exten => h,108,System(/tmp/${CALLERIDNUM}.2)
exten => h,109,Goto(999)
exten => h,999,Hangup()

[custom-disa-callout]
exten => s,1,Playback(enter_pin)
exten => s,2,Authenticate(987654)
exten => s,3,Background(pls-wait-connect-call)
exten => s,4,DISA(no-password|from-internal)

Fill in the OK_CID1...OK_CID97 with callerID numbers (or sip:uris) you want authorized to use your ring back. This version wil support up to 97 authorized entries. Anymore and it would be best to put it into the Asterisk database (Astdb) system instead (actually, anything more than 10 should be in the Astdb).

If the CID did not match one of your authorized numbers, then Asterisk will fall to priority 99 which tells it to goto priority 999 which hangs up the line.

See ya...

d.c.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3 (permalink)  
Old October 23rd, 2005, 09:56 AM
jmattwood jmattwood is offline
Senior Member
 
Join Date: Feb 2005
Location: Bradford UK
Posts: 195
jmattwood
Default RE: Re: Authenticate DISA with CLID (A@H1.3)

Thank you very much for the informative reply.

What does the : (colon) mean between h,5 and h,98? (Edit: Just DITTO?)

When you say "Fill in the OK_CID1...OK_CID97 with callerID numbers ", which bit do I replace with the numbers I want to authorize? I presume the CID1x bit
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4 (permalink)  
Old October 23rd, 2005, 10:53 AM
jmattwood jmattwood is offline
Senior Member
 
Join Date: Feb 2005
Location: Bradford UK
Posts: 195
jmattwood
Default RE: Re: Authenticate DISA with CLID (A@H1.3)

I've tried replacing the CID1x bit & the whole entry between the " " and cannot get it to work - I never get a call back from an authorised number.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5 (permalink)  
Old October 23rd, 2005, 04:07 PM
chandave chandave is offline
Senior Member
 
Join Date: Jul 2005
Posts: 362
chandave is an unknown quantity at this point
Send a message via MSN to chandave
Default Re: RE: Re: Authenticate DISA with CLID (A@H1.3)

Quote:
Originally Posted by jmattwood
Thank you very much for the informative reply.

What does the : (colon) mean between h,5 and h,98? (Edit: Just DITTO?)
Yes, the ':' was my ditto denotation. They should not be explicitly in the dialplan.
Quote:
Originally Posted by jmattwood
When you say "Fill in the OK_CID1...OK_CID97 with callerID numbers ", which bit do I replace with the numbers I want to authorize? I presume the CID1x bit
If you have 5 numbers:
  1. 1114321
  2. 2221234
  3. 3330000
  4. 4449999
  5. 5551212
Then your diaplan should include:
exten => h,1,SetCIDNum(${CALLERIDNUM:0})
exten => h,2,GotoIf($["x${CALLERIDNUM}x" = "x1114321x"]?100)
exten => h,3,GotoIf($["x${CALLERIDNUM}x" = "x2221234x"]?100)
exten => h,4,GotoIf($["x${CALLERIDNUM}x" = "x3330000x"]?100)
exten => h,5,GotoIf($["x${CALLERIDNUM}x" = "x4449999x"]?100)
exten => h,6,GotoIf($["x${CALLERIDNUM}x" = "x5551212x"]?100)
exten => h,7,Goto(999)
exten => h,100,System(echo channel: SIP/spa mobile/${CALLERIDNUM} > /tmp/${CALLERIDNUM})

If you have problems, get access to an Asterisk console (either start asterisk from the command line or use "asterisk -r"). Set verbose level to 5 ("set verbose 5" at the Asterisk CLI) and debug to 2 ("set debug 2" at the Asterisk CLI). Then call again. You should have a verbose debugging log of the dialplan steps Asterisk executed. If you can't interprete them, then post the results here.

See ya...

d.c.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old October 23rd, 2005, 04:07 PM
  #6 (permalink)  
Old October 23rd, 2005, 04:12 PM
jmattwood jmattwood is offline
Senior Member
 
Join Date: Feb 2005
Location: Bradford UK
Posts: 195
jmattwood
Default RE: Re: RE: Re: Authenticate DISA with CLID (A@H1.3)

Ah. I would have missed putting an x either side of the number. Thank you, it is now working perfectly.

Another question, I hope you can answer - How do I get the call back to respect the dial rules for the chosen trunk? At the moment, it is dialling exactly the CLID of the remote number, ignoring all the dial rules - I have prefixes configured on the trunk & certain number ranges barred.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7 (permalink)  
Old October 23rd, 2005, 04:28 PM
chandave chandave is offline
Senior Member
 
Join Date: Jul 2005
Posts: 362
chandave is an unknown quantity at this point
Send a message via MSN to chandave
Default Re: RE: Re: RE: Re: Authenticate DISA with CLID (A@H1.3)

Quote:
Originally Posted by jmattwood
...Another question, I hope you can answer - How do I get the call back to respect the dial rules for the chosen trunk? At the moment, it is dialling exactly the CLID of the remote number, ignoring all the dial rules - I have prefixes configured on the trunk & certain number ranges barred.
exten => s,4,DISA(no-password|from-internal)

The second parameter for the DISA() command specifies the context Asterisk should use. Currently, you have it set for the context from-internal. If you want to limit what numbers the authenticated person can dial, then create a different context with different dialplans. Look at the description of DISA() on the voip-info.org wiki http://www.voip-info.org/wiki/view/Asterisk+cmd+DISA.

You could even setup DISA() to look into a file for the PIN|context so you could have different PINs for different access levels.

See ya...

d.c.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #8 (permalink)  
Old October 23rd, 2005, 04:33 PM
jmattwood jmattwood is offline
Senior Member
 
Join Date: Feb 2005
Location: Bradford UK
Posts: 195
jmattwood
Default RE: Re: RE: Re: RE: Re: Authenticate DISA with CLID (A@H1.3)

Once again, I am imprerssed with the service levels here!

I think I didn't make myself clear. I'm happy with the from-internal context as I want to be able to ring out on any of my trunks, once I've received the callback.

It's the trunk that's being used for the actual callback (line h,100)that is ignoring all the dial rules. (before any authentication even occurs)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #9 (permalink)  
Old October 23rd, 2005, 06:01 PM
chandave chandave is offline
Senior Member
 
Join Date: Jul 2005
Posts: 362
chandave is an unknown quantity at this point
Send a message via MSN to chandave
Default Re: RE: Re: RE: Re: RE: Re: Authenticate DISA with CLID (A@H

Quote:
Originally Posted by jmattwood
...It's the trunk that's being used for the actual callback (line h,100)that is ignoring all the dial rules. (before any authentication even occurs)
That's because you are telling Asterisk to specifically create a SIP channel. You completely bypass any dial rules you might have established.

You might be able to do what you want using a Local channel. I haven't tried using a Local channel in a call-file before.

Code:
exten => h,100,System(echo channel: SIP/spa mobile/${CALLERIDNUM} > /tmp/${CALLERIDNUM})
might look like:
Code:
exten => h,100,System(echo channel: Local/from-internal/${CALLERIDNUM} > /tmp/${CALLERIDNUM})
Or whatever context besides the from-internal that would have your dial rules you want followed.

More info about Local channels:
http://www.voip-info.org/wiki/view/A...Local+channels

See ya...

d.c.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #10 (permalink)  
Old October 24th, 2005, 02:00 PM
jmattwood jmattwood is offline
Senior Member
 
Join Date: Feb 2005
Location: Bradford UK
Posts: 195
jmattwood
Default RE: Re: RE: Re: RE: Re: RE: Re: Authenticate DISA with CLID

chandave, thank you for your help so far - it's almost perfect.

I think now the only thing I'm wanting to tweak is...............

As you know, the callback is being dialled directly to the trunk which is set up in line h.100. I would like to use a (different) particular trunk which requires the international format for dialling. What I need to do, somewhere in line h,1 I think, is strip off the leading zero in the remote number and add 0044 before sending it to the trunk. Is this possible?

Thanks again.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old October 24th, 2005, 02:00 PM
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:



Similar Threads for: Authenticate DISA with CLID (A@H1.3)
Thread Thread Starter Forum Replies Last Post
486 CLID huggons Grandstream Support Forum 1 June 12th, 2006 09:55 PM
Asteridex CLID lookup jmattwood Asterisk Support Forum 5 May 9th, 2006 10:19 PM
Log DISA Authenticate passwords in CDR? supa Asterisk Support Forum 2 March 17th, 2006 03:39 PM
Another DISA after the 1st DISA Call is completed ferdies Asterisk Support Forum 0 January 27th, 2006 06:43 AM
SPA 3000 and UK CLID Dirky Linksys (Sipura) VoIP Support Forum 3 March 28th, 2005 11:53 PM



All times are GMT. The time now is 07:58 PM.


vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc. Logos and trademarks are the property of Voxilla or their respective owner. All other content © 2003-2007 by Voxilla, Inc.