Koozali.org: home of the SME Server
Obsolete Releases => SME VoIP (Asterisk, SAIL etc) => Topic started by: compsos on October 23, 2011, 09:48:42 AM
-
Hi
Looking for a solution to allow a external call to dial an internal extension. Example from Sonoracomm enter-extension works but we would like to allow the caller to just enter a room number and get the extension.
Sonoracomm Code
include => internal-presets
include => extensions
exten => s,1,Set(TIMEOUT(digit)=5) ;Digit Timeout 5 secs
exten => s,n,Set(TIMEOUT(response)=10) ;Response Timeout 10
exten => s,n,Background(usergreeting0002)
exten => s,n,WaitExten ;Wait for an extension to be dialled
exten => s,n,Goto(enter-extension,t,1)
exten => i,1,Playback(pbx-invalid)
exten => i,2,Goto(enter-extension,s,1)
exten => t,1,Goto(extensions,${SYSOP},1)
exten => t,2,Hangup
(ie) Rooms are from 1 to 39
Extension Numbers are 4001 to 4039 (analogue phones on TDM2400 cards)
If the caller presses 23, ext 4023 gets called. Have been trying a Custom App with the LEN function to test for dialled numbers If(${EXTEN}) =1 then add 400 else add 40 to the dialled number. So far the system seems to ignore all the lines we enter. Is ${EXTEN} the right variable to be looking at?
-
Wouldn't it be easier to just set up an alias (callgroup) for each room (e.g. 23 dials 4023)?
S
-
We need to pass them through an IVR like "To dial the room please press the room number now". This would be a 2nd level IVR. Would Sonoracomm's code dial the "Alias"?
-
yes it would because it includes internal-presets, which is where the aliases are generated.
Best
S