This sounds like one of those dating services where people call in and leave messages for whoever they are seeing. There is a way to do this, what you need to do is when the calls come in you can implement a dialplan that will have an option such as ‘to leave a message for your party, press 1’. So when they press 1 it takes them to a dialplan that says something like ‘please enter your parties 4-digit code’, so when they enter this number * dials the number but since there is no phone configured for the number it will go straight to the number’s voicemail. The next thing you will have to do is to modify the unavailable voicemail IVR to say something like ‘after the tone please leave a message for this person’ or even batter if you can find a way for * to replace “this person” with the person’s name.
extensions.conf
[sip.inbound.com] ;This is going to be your inbound trunk, telling all incoming calls where to go, whether to go to the same or diferent dialplans
exten=>18001234567,1,Goto(inbound|s|1)
exten=>18007654321,1,Goto(inbound|s|1)
[inbound]
exten=>s,1,Ringing
exten=>s,2,Answer
exten=>s,3,Wait,2
exten=>s,4,SetMusicOnHold(default)
exten=>s,5,Background(welcome to …, to leave a message for your party press 1, etc)
exten=>s,6,WaitExten(10)
exten=>s,7,Background(r-u-still-there…,to-leave-a-message-for-your-party-press-1, etc)
exten=>s,8,WaitExten(10)
exten=>s,9,Hangup
exten=>1,1,Goto(inbound-client|s|1)
[inbound-client]
include=>4-digit-numbers
exten=>s,1,DigitTimeout(10)
exten=>s,2,Set(TIMEOUT(absolute)=240)
exten=>s,3,Wait(1)
exten=>s,4,SetMusicOnHold(default)
exten=>s,5,Background(please-enter-your-partys-4-digit-number)
exten=>s,6,Read(extension,4)
exten=>s,7,Dial(SIP/${extension},30,m)
exten=>s,8,Voicemail,u${extension}@default
exten=>s,9,Playback(invalid)
exten=>s,10,Goto,s|3
exten=>s,11,Background(r-u-still-there-plz-enter-partys-number)
exten=>s,12,Read(extension,4)
exten=>s,13,Dial(SIP/${extension},30,m)
exten=>s,14,Voicemail,u${extension}@default
exten=>s,15,Playback(invalid)
exten=>s,14,Playback(goodbye)
exten=>s,15,Hangup
[4-digit-numbers] ;All 4-digit numbers entered by inbound callers must be configured in sip.conf to register to this context
exten=>s,1,Dial(SIP/${extension},30,m)
exten=>s,2,Voicemail,u${extension}@default
I hope this helps.