[Home]

Summary:ASTERISK-03984: [request] expand functionality of 'mailbox' option in sip.conf
Reporter:Serge Vecher (serge-v)Labels:
Date Opened:2005-04-25 14:01:53Date Closed:2005-04-26 21:52:57
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/NewFeature
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Currently, 'mailbox' option in sip.conf only serves the purpose of identifying mailbox for MWI. It would be very useful to link this option to Voicemail(uEXT) [or bEXT]. I.e., if EXT is 111 and mailbox is 121 a call to Voicemail(uEXT) would result in caller leaving unavailable message for mailbox 121, not 111.

****** ADDITIONAL INFORMATION ******

The following could be done to retain backwards compatibility:
1) if 'mailbox' is not specified, uEXT is u111 in above example
2) if 'mailbox' is specified and is equal to exten, then we have no problem :)

I haven't programmed C for a couple of years, but if someone experienced could point me to code I can use as a template, I would gladly undertake the task.
Comments:By: Michael Jerris (mikej) 2005-04-25 14:07:46

You can acomplish the same sort of thing already by using an additional setvar line in sip.conf right after the mailbox= line.

By: Serge Vecher (serge-v) 2005-04-25 14:35:41

setvar in sip.conf? I must be missing something ... Can you please provide an example?

By: Michael Jerris (mikej) 2005-04-25 15:02:28

From -dev list:

[bob]
type=friend
setvar=TEST=asdf

By: Serge Vecher (serge-v) 2005-04-25 16:44:53

[137]
setvar=mailbox=107

Also tried setvar=MAILBOX=107. I still get u137, not u107. Running HEAD 04/22/05. Anyway, I think the approach I've outlined would enhance the option (rather than adding another) while maintaining backward-compatibility. All I need are some pointers. Thanks

edited on: 04-25-05 16:50

By: Kevin P. Fleming (kpfleming) 2005-04-26 21:52:44

The problem here is that you are sending the call _to_ a mailbox, and the ability to set the variable in sip.conf only applies to the _calling_ channel.

We cannot implement anything in app_voicemail that 'knows' about extensions and where they come from, because they could come from any place. The mailbox associated with a peer/channel can be specified in any channel driver, and the mapping between extensions and peers/channels happens in the dialplan. There is no way to make this 'generic', without putting constraints on the way people build their dialplans.

The simplest way to solve this for you will be to just not try to use sip.conf as a database, and instead use the built-in database via DBPut and DBGet to store the extension->mailbox mapping.