12a13,14
>  
> /* vmid patch: Oliver Welter <areaz2@php.net> */
1114c1116
< static int invent_message(struct ast_channel *chan, char *context, char *ext, int busy, char *ecodes)
---
> static int invent_message(struct ast_channel *chan, char *context, char *ext, int busy, char *ecodes, char *toldnum)
1133c1135,1144
< 		res = ast_say_digit_str(chan, ext, ecodes, chan->language);
---
> 		if (!toldnum)
> 		{
> 			ast_log(LOG_VERBOSE, "No vmid override. Using '%s' as vmid\n", ext);
> 			res = ast_say_digit_str(chan, ext, ecodes, chan->language);
> 		}
> 		else
> 		{
> 			ast_log(LOG_VERBOSE, "Got override. Using '%s' as vm-identifier\n", toldnum);
> 			res = ast_say_digit_str(chan, toldnum, ecodes, chan->language);		
> 		}
1298c1309
< static int leave_voicemail(struct ast_channel *chan, char *ext, int silent, int busy, int unavail)
---
> static int leave_voicemail(struct ast_channel *chan, char *ext, int silent, int busy, int unavail, char *toldnum)
1385c1396
< 				res = invent_message(chan, vmu->context, ext, busy, ecodes);
---
> 				res = invent_message(chan, vmu->context, ext, busy, ecodes, toldnum);
2318c2329
< 		cmd=leave_voicemail(chan,username,0,0,0);
---
> 		cmd=leave_voicemail(chan,username,0,0,0, NULL);
3720a3732
> 	char * tmp2, *toldnum;
3734c3746,3753
< 	ext = tmp;
---
> 	
> 	ast_log(LOG_DEBUG, "Got data token '%s'\n",tmp);
> 	tmp2 = strtok(tmp, "|");
> 	ext = tmp2;
> 	tmp2 = strtok(NULL, "|");
> 	toldnum = tmp2;
> 		
> 	//ext = tmp;
3748c3767,3768
< 	res = leave_voicemail(chan, ext, silent, busy, unavail);
---
> 	
> 	res = leave_voicemail(chan, ext, silent, busy, unavail, toldnum);
4567c4587
< 					leave_voicemail(chan, num, 1, 0, 1);
---
> 					leave_voicemail(chan, num, 1, 0, 1, NULL);