# Asterisk voicemail.C modification

**URL:** <https://community.asterisk.org/t/asterisk-voicemail-c-modification/36266>\
**Category:** Asterisk Support\
**Created:** [August 6, 2011, 11:02pm UTC](https://community.asterisk.org/t/asterisk-voicemail-c-modification/36266 "2011-08-06T23:02:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mos33](https://avatars.discourse-cdn.com/v4/letter/m/c77e96/32.png) [@mos33](https://community.asterisk.org/u/mos33)\
**Post date:** [August 6, 2011, 11:02pm UTC](https://community.asterisk.org/t/asterisk-voicemail-c-modification/36266/1 "2011-08-06T23:02:05Z")

</div>

i wants to make some changes in asterisk voice mail system, so i modified the source code in app\_voicemail.c, now i need to create a special DTMF input to browse the old messages folder, i found the follwoing function that used for changing folder:

[code]case ‘2’: /\* Change folders \*/  
if (useadsi)  
adsi\_folders(chan, 0, “Change to folder…”);  
cmd = get\_folder2(chan, “vm-changeto”, 0);  
if (cmd == ‘#’) {  
cmd = 0;  
} else if (cmd \> 0) {  
cmd = cmd - ‘0’;  
res = close\_mailbox(&vms, vmu);  
if (res == ERROR\_LOCK\_PATH)  
goto out;  
res = open\_mailbox(&vms, vmu, cmd);  
if (res == ERROR\_LOCK\_PATH)  
goto out;  
play\_folder = cmd;  
cmd = 0;  
}  
if (useadsi)  
adsi\_status2(chan, &vms);

```
		if (!cmd)
cmd = vm_play_folder_name(chan, vms.vmbox);

```

vms.starting = 1;[/code]

how can i modify it to press 2 for old message directly

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [August 7, 2011, 9:54am UTC](https://community.asterisk.org/t/asterisk-voicemail-c-modification/36266/2 "2011-08-07T09:54:48Z")

</div>

I think you need to use the developer mailing list or IRC channel.
