Skip to main content

dial by first or last name

Posted by George on Tue, 07/22/2008

We have had requests for the ability to dial by first name rather then last name.. I was reading in the Asterisk manual and ran across this code..

exten => 8,1,Directory(default,incoming,f)
exten => 9,1,Directory(default,incoming)

If callers press 8, they’ll get a directory by first name. If they dial 9, they’ll get the directory by last name.

I looked in the scripts but have no clue where this can be changed.. anyone know if this can be done or does Alex have to do it..?

Thanks
George


Submitted by fefo on Wed, 07/23/2008 Permalink

Dial by name is performed by a script called 'tl-directory'.

To make it dial by first name, add ' | f ' before the last ')' of the second line.

Then the following...

exten => s,1,Wait(1)

exten => s,2,Directory(default${TL_DASH}${tenant}|local-extensions${TL_DASH}${tenant})

exten => s,3,Wait(1)

exten => s,4,Hangup

exten => h,1,Hangup

...would be changed to

exten => s,1,Wait(1)

exten => s,2,Directory(default${TL_DASH}${tenant}|local-extensions${TL_DASH}${tenant}|f)

exten => s,3,Wait(1)

exten => s,4,Hangup

exten => h,1,Hangup

Alex, is this right?

Submitted by George on Thu, 07/24/2008 Permalink

Hello fefo,

I must have been blind, Thanks I found it created a feature code and it works great..

any chance you know how to add it to the list with the current Comany Directory..?

Thanks again

George

Submitted by eeman on Sun, 07/27/2008 Permalink

it would be cool if the IVR options for Directory had a 'Directory(firstname)' and 'Directory(lastname)' the way they did with voicemail and voicemail(silent). I kinda wish the Directory application would let you match by both first and last name at the same time.

Submitted by IVSCOMM on Thu, 03/17/2011 Permalink

I always thought Dial by first name only or dial by last name only was ridiculous. Some people know first names and some people know last names. Can't you just set it up to search both first and last names and give the appropriate response using one script for both instead of having to choose first or last?

Submitted by eeman on Thu, 03/17/2011 Permalink

its not a script. Directory() is imbedded into the voicemail application. You'll have to make the request to digium.