Gigaset DECT with activation of Direct Dial In

HowTo manage Analog DDI on DECT Phone under Asterisk.

Which base stations provide DDI

The number of high end DECT base station which provide a DDI (Direct Dial in) facility. This is the case of the Siemens DECT 3015, but other brands also provide the functionality (Philips, Sagem, Motorola, Panasonic, ...).
Most high end DECT base stations with an integrated answering system offer a DDI but not all (e.g. the Philips DECT 525 does not).
You must remember that the DDI facility is a base station functionality, not a DECT phone function. If you have GAP base and phone compliant you "should" be able to register any phone on any base "(I once had problems to register Philips phone on a Siemens base)".

What is Analog DDI

The analog DDI consists to offer on an incoming call a facility to select one individual phone out of a group of phone which are registered to an individual DECT base (depending on the base you can register 4 to 6 phones).
When an incoming call is detected, the DECT base accepts the call and plays a prerecorded message which invites the caller to dial a single digit representing the phone that you want to ring "(0 rings all registered phones)". Once the DTMF digit is received by the base, the conresponding phone rings while the others remains silent. When the ringing phone goes off hook, the caller is connected to the called DECT phone.

Why it's nice

DDI on DECT is a very low cost solution for small wireless installations. You can find a DECT base with four phones for less than €300. You need only 1 analog Office port. You don't need extra wiring. DECT works find in large buildings "(repeaters can be added if needed)".
It's a great solution for entreprise where a few wireless phone are needed to chase people, small businesses where no phone calls can be lost, private homes whith kids/teenagers.
You can allocate a unique phone extension to each phone without the need to go through an invite message to select the extention. This assumes that you have a means to identify the called extention on an incoming call (ISDN, VoIP, AIX, ...)

What's are the limit.

Analog DDI is slow for the caller. You need to get the call answered by the DECT base to get the invite (which is automated as we will see later), then the base has to route the call before ringing the selected phone. In reality a minimum of 4 ring tones will be heard by the caller before being connected even if the call goes off hook on the first ring tone.
When a call is running, you cannot transfer/conference via Asterisk that call to an other DECT phone sharing the same base "(in fact the only/share connection to Asterisk is busy)". You need to use the DECT base facilities for any DECT to DECT communication.
When nobody answers the addressed phone you may not be able to stop all the other phones to present the call after a certain time "(this is case on the Gigaset 3015 where a two seconds ringing is unavoidable)".
You cannot decide how long the phone will ring from Asterisk before connecting to voice mail "(that function is controlled by the DECT base, on the Gigaset 3015 it's 40s)".
CLI does not work. As CLI is passed with the first or second ring tone, the selected phone is not yet ringing at that time and so will miss it (this is a bug of the DECT base station and cannot be corrected).

The concept of Analog DDI under Asterisk

The principle consists to create regular extension for each phone that will route all calls to a dedicated unique analog interface (my example use a Digium Zap interface, but it would work in the same way over an Analog Telephone Adapter, if you accept the extra degradation on dialing speed).
When the call is anwsered by the base station (which will start to play a prerecorded message that you will have no time to hear), Asterisk will send the DTMF to select the desired DECT phone.
You must understand that even if nobody answers the DECT phone, as the Base has already accepted the call (to let you activate the DDI), by default you will never get the call back in the extention plan to push it to the voice mail. The trick is to use the option "g" of the DIAL command to recover the call in any case. Note that for the same reason, the provision of a dialing time out has no effect (the base will accept the call on the first ring tone detection).
A simplier alternative consists to use the voice mail provided by the DECT base station but I don't like to share voice mail.

Implementation

In the following example I provide a unique extention for each DECT phone (shared or not). The solution manage DECT base with and without DDI. I use the Asterisk voice mail facility and each phone can have a dedicated voice mail.
Some timing may need adjustment depending of your base, but the principle is fairly generic and should work with any model of DECT base.

[macro-PHONE-EXT]

; This is the marco that will be called later from each extension number.

; Usage Macro(PHONE-EXT,extension,Channel-type,Channel,ring-timeout,PostDDI)
PHONE-EXT
The call to the macro from the dialling plan
extension
The actual phone extention in your Asterisk numbering plan (e.g. 3120)
Channel-type
any asterisk supported type of interface ZAP for analog SIP or MGCP for ATA
ring-timeout
ignore in DDI mode BUT REQUIRED to respect the macro argument numbering
PostDDI
DDI digit, the actual number of the DECT phone to ring aswhen DECT to DECT call are done via the DECTbase station
; Example of usage
; exten => 125,1,Macro(PHONE-EXT,${EXTEN},ZAP,1,20,3) ; create extention 125 which will call on channel ZAP/1 the SDA ext 3, ringing time will ONLY depend of the DECT base station
; exten => 532,1,Macro(PHONE-EXT,${EXTEN},ZAP,2,40) ; create extention 532 which will call on channel ZAP/2 and ring 40s
;
; Actual macro code
exten => s,1,GotoIf(${ARG5}?20:10) ; If no DDI extention then the phone is not on a shared line as a DECT DDI

; We have a dedicated direct line for that phone
exten => s,10,Verbose(Call on ${ARG1} direct Dial ${ARG2}/${ARG3} ring timout ${ARG4}) ; debug to be displayed when console is open
exten => s,n,Dial(${ARG2}/${ARG3},${ARG4},o L(3600000,3500000,30000)) ; actual dial statment o provides CLI
exten => s,n,Goto(40) ; No reply ; jump to voice mail in no reply mode
exten => s,112,Goto(50) ; Busy (+101 rule) ; jump to voice mail in busy mode

; We have a SDA selection for multiple phone sharing teh same line via a DECT base station
exten => s,20,Verbose(Call on ${ARG1} with SDA Dial ${ARG2}/${ARG3} SDA ${ARG5} ring timout ${ARG4}) ; debug to be displayed when console is open
exten => s,n,Playback(pls-wait-connect-call) ; play a message as the dialing is slow in DDI mode
; DTMF must be pushed multiple time to the Siemens DECT base to succeed with SDA, I repeat it four times.
; NOTE the next Dial statment will be answered by the DECT base station even if no user pick up a phone
; see g option Asterisk Dial statment.
; o push the CLI but it's unlikly to work in DDI anyhow.
; L option limit the call to one hour (see DIAL statment option)
exten => s,n,Dial(${ARG2}/${ARG3},${ARG4},o g D(${ARG5}${ARG5}${ARG5}${ARG5}) L(3600000,3500000,30000))
exten => s,n,Verbose(ANSWEREDTIME=${ANSWEREDTIME}) ; debug useful to tune the default no response time.
; NOTE the only way to differenciate a user answered call from a DECT base station "only" answered call is the duration.
; If you get that value lis tune, caller will get invited to leave a message as if no answer had occured when the called party end the call first.
exten => s,n,GotoIf($[${ANSWEREDTIME}>46] & $[${ANSWEREDTIME}<49]?40:30) ;No reply would create a hang up after 47-48s
exten => s,n,hangup() ; Call of more than 50s have been answered by a user
exten => s,123,Goto(50) ; Busy (+101 rule)

;Call of duration different from 47-48s are considered as answered by someone
exten => s,30,hangup() ; End call

; We need to treat voice mail
exten => s,40,Verbose(Voice mail on no reponse to ${ARG1} to voicebox u${ARG1:-2})
exten => s,n,Wait(2)
exten => s,n,VoiceMail(u${ARG1:-2}@ivybridge)
exten => s,n,hangup()

exten => s,50,Verbose(Voice mail on no reponse to ${ARG1} to voicebox u${ARG1:-2})
exten => s,n,VoiceMail(b${ARG1:-2}@ivybridge)
exten => s,n,hangup()
;
; -------------------- end of macro-PHONE-EXT ----------------------------

;-------------------- Start of the actual dialing plan -------------------------
;
[dect-plan]
;
;
; you will need to add the following statment in the section where you need you DECT active
; include => dect-plan
;

; Phone 101 is on a dedicated analog interface which connects to an UNSHARED DECT phone
exten => 101,1,Macro(PHONE-EXT,${EXTEN},ZAP,1,20) ; This does NOT use DDI

; Phone 102 -> analog interface 2 DDI #2
exten => 102,1,Macro(PHONE-EXT,${EXTEN},ZAP,2,20,2) ; ringing timeout 20s is ignored but a value is required

; Phone 103 -> analog interface 2 DDI #1
exten => 103,1,Macro(PHONE-EXT,${EXTEN},ZAP,2,20,1)

; Phone 104 -> analog interface 3 DDI #4
exten => 104,1,Macro(PHONE-EXT,${EXTEN},ZAP,3,20,4)

; Phone 300 -> ring all DECT phone on analog interface 3
exten => 300,1,Macro(PHONE-EXT,${EXTEN},ZAP,3,20,0)

---------------------------- End dect-plan ---------------------------------------

HowTo manage Analog DDI on DECT Phone under Asterisk.

Which base stations provide DDI

The number of high end DECT base station which provide a DDI (Direct Dial in) facility. This is the case of the Siemens DECT 3015, but other brands also provide the functionality (Philips, Sagem, Motorola, Panasonic, ...).
Most high end DECT base stations with an integrated answering system offer a DDI but not all (e.g. the Philips DECT 525 does not).
You must remember that the DDI facility is a base station functionality, not a DECT phone function. If you have GAP base and phone compliant you "should" be able to register any phone on any base "(I once had problems to register Philips phone on a Siemens base)".

What is Analog DDI

The analog DDI consists to offer on an incoming call a facility to select one individual phone out of a group of phone which are registered to an individual DECT base (depending on the base you can register 4 to 6 phones).
When an incoming call is detected, the DECT base accepts the call and plays a prerecorded message which invites the caller to dial a single digit representing the phone that you want to ring "(0 rings all registered phones)". Once the DTMF digit is received by the base, the conresponding phone rings while the others remains silent. When the ringing phone goes off hook, the caller is connected to the called DECT phone.

Why it's nice

DDI on DECT is a very low cost solution for small wireless installations. You can find a DECT base with four phones for less than €300. You need only 1 analog Office port. You don't need extra wiring. DECT works find in large buildings "(repeaters can be added if needed)".
It's a great solution for entreprise where a few wireless phone are needed to chase people, small businesses where no phone calls can be lost, private homes whith kids/teenagers.
You can allocate a unique phone extension to each phone without the need to go through an invite message to select the extention. This assumes that you have a means to identify the called extention on an incoming call (ISDN, VoIP, AIX, ...)

What's are the limit.

Analog DDI is slow for the caller. You need to get the call answered by the DECT base to get the invite (which is automated as we will see later), then the base has to route the call before ringing the selected phone. In reality a minimum of 4 ring tones will be heard by the caller before being connected even if the call goes off hook on the first ring tone.
When a call is running, you cannot transfer/conference via Asterisk that call to an other DECT phone sharing the same base "(in fact the only/share connection to Asterisk is busy)". You need to use the DECT base facilities for any DECT to DECT communication.
When nobody answers the addressed phone you may not be able to stop all the other phones to present the call after a certain time "(this is case on the Gigaset 3015 where a two seconds ringing is unavoidable)".
You cannot decide how long the phone will ring from Asterisk before connecting to voice mail "(that function is controlled by the DECT base, on the Gigaset 3015 it's 40s)".
CLI does not work. As CLI is passed with the first or second ring tone, the selected phone is not yet ringing at that time and so will miss it (this is a bug of the DECT base station and cannot be corrected).

The concept of Analog DDI under Asterisk

The principle consists to create regular extension for each phone that will route all calls to a dedicated unique analog interface (my example use a Digium Zap interface, but it would work in the same way over an Analog Telephone Adapter, if you accept the extra degradation on dialing speed).
When the call is anwsered by the base station (which will start to play a prerecorded message that you will have no time to hear), Asterisk will send the DTMF to select the desired DECT phone.
You must understand that even if nobody answers the DECT phone, as the Base has already accepted the call (to let you activate the DDI), by default you will never get the call back in the extention plan to push it to the voice mail. The trick is to use the option "g" of the DIAL command to recover the call in any case. Note that for the same reason, the provision of a dialing time out has no effect (the base will accept the call on the first ring tone detection).
A simplier alternative consists to use the voice mail provided by the DECT base station but I don't like to share voice mail.

Implementation

In the following example I provide a unique extention for each DECT phone (shared or not). The solution manage DECT base with and without DDI. I use the Asterisk voice mail facility and each phone can have a dedicated voice mail.
Some timing may need adjustment depending of your base, but the principle is fairly generic and should work with any model of DECT base.

[macro-PHONE-EXT]

; This is the marco that will be called later from each extension number.

; Usage Macro(PHONE-EXT,extension,Channel-type,Channel,ring-timeout,PostDDI)
PHONE-EXT
The call to the macro from the dialling plan
extension
The actual phone extention in your Asterisk numbering plan (e.g. 3120)
Channel-type
any asterisk supported type of interface ZAP for analog SIP or MGCP for ATA
ring-timeout
ignore in DDI mode BUT REQUIRED to respect the macro argument numbering
PostDDI
DDI digit, the actual number of the DECT phone to ring aswhen DECT to DECT call are done via the DECTbase station
; Example of usage
; exten => 125,1,Macro(PHONE-EXT,${EXTEN},ZAP,1,20,3) ; create extention 125 which will call on channel ZAP/1 the SDA ext 3, ringing time will ONLY depend of the DECT base station
; exten => 532,1,Macro(PHONE-EXT,${EXTEN},ZAP,2,40) ; create extention 532 which will call on channel ZAP/2 and ring 40s
;
; Actual macro code
exten => s,1,GotoIf(${ARG5}?20:10) ; If no DDI extention then the phone is not on a shared line as a DECT DDI

; We have a dedicated direct line for that phone
exten => s,10,Verbose(Call on ${ARG1} direct Dial ${ARG2}/${ARG3} ring timout ${ARG4}) ; debug to be displayed when console is open
exten => s,n,Dial(${ARG2}/${ARG3},${ARG4},o L(3600000,3500000,30000)) ; actual dial statment o provides CLI
exten => s,n,Goto(40) ; No reply ; jump to voice mail in no reply mode
exten => s,112,Goto(50) ; Busy (+101 rule) ; jump to voice mail in busy mode

; We have a SDA selection for multiple phone sharing teh same line via a DECT base station
exten => s,20,Verbose(Call on ${ARG1} with SDA Dial ${ARG2}/${ARG3} SDA ${ARG5} ring timout ${ARG4}) ; debug to be displayed when console is open
exten => s,n,Playback(pls-wait-connect-call) ; play a message as the dialing is slow in DDI mode
; DTMF must be pushed multiple time to the Siemens DECT base to succeed with SDA, I repeat it four times.
; NOTE the next Dial statment will be answered by the DECT base station even if no user pick up a phone
; see g option Asterisk Dial statment.
; o push the CLI but it's unlikly to work in DDI anyhow.
; L option limit the call to one hour (see DIAL statment option)
exten => s,n,Dial(${ARG2}/${ARG3},${ARG4},o g D(${ARG5}${ARG5}${ARG5}${ARG5}) L(3600000,3500000,30000))
exten => s,n,Verbose(ANSWEREDTIME=${ANSWEREDTIME}) ; debug useful to tune the default no response time.
; NOTE the only way to differenciate a user answered call from a DECT base station "only" answered call is the duration.
; If you get that value lis tune, caller will get invited to leave a message as if no answer had occured when the called party end the call first.
exten => s,n,GotoIf($[${ANSWEREDTIME}>46] & $[${ANSWEREDTIME}<49]?40:30) ;No reply would create a hang up after 47-48s
exten => s,n,hangup() ; Call of more than 50s have been answered by a user
exten => s,123,Goto(50) ; Busy (+101 rule)

;Call of duration different from 47-48s are considered as answered by someone
exten => s,30,hangup() ; End call

; We need to treat voice mail
exten => s,40,Verbose(Voice mail on no reponse to ${ARG1} to voicebox u${ARG1:-2})
exten => s,n,Wait(2)
exten => s,n,VoiceMail(u${ARG1:-2}@ivybridge)
exten => s,n,hangup()

exten => s,50,Verbose(Voice mail on no reponse to ${ARG1} to voicebox u${ARG1:-2})
exten => s,n,VoiceMail(b${ARG1:-2}@ivybridge)
exten => s,n,hangup()
;
; -------------------- end of macro-PHONE-EXT ----------------------------

;-------------------- Start of the actual dialing plan -------------------------
;
[dect-plan]
;
;
; you will need to add the following statment in the section where you need you DECT active
; include => dect-plan
;

; Phone 101 is on a dedicated analog interface which connects to an UNSHARED DECT phone
exten => 101,1,Macro(PHONE-EXT,${EXTEN},ZAP,1,20) ; This does NOT use DDI

; Phone 102 -> analog interface 2 DDI #2
exten => 102,1,Macro(PHONE-EXT,${EXTEN},ZAP,2,20,2) ; ringing timeout 20s is ignored but a value is required

; Phone 103 -> analog interface 2 DDI #1
exten => 103,1,Macro(PHONE-EXT,${EXTEN},ZAP,2,20,1)

; Phone 104 -> analog interface 3 DDI #4
exten => 104,1,Macro(PHONE-EXT,${EXTEN},ZAP,3,20,4)

; Phone 300 -> ring all DECT phone on analog interface 3
exten => 300,1,Macro(PHONE-EXT,${EXTEN},ZAP,3,20,0)

---------------------------- End dect-plan ---------------------------------------
Created by: dominig, Last modification: Tue 13 of Jun, 2006 (17:36 UTC)
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+