Asterisk voicemail realtime

over the weekend I migrated my entire system from all the php scripts which configured all the asterisk. now i’ve switched over to asterisk realtime and everything works apart from the voicemail, even my custom apps work, just not the voicemail.

calls seem to hungup when it gets to the Voicemail app.

Thanks for any help that is provided.

[settings]
sipusers => mysql,asteriskrealtime,sipbuddies
sippeers => mysql,asteriskrealtime,sipbuddies
iaxusers => mysql,asteriskrealtime,iaxbuddies
iaxpeers => mysql,asteriskrealtime,iaxbuddies
extensions => mysql,asteriskrealtime,extensions
iaxinbound => mysql,asteriskrealtime,extensions
voicemail => mysql,asteriskrealtime,voicemail_users
queues => mysql,asteriskrealtime,queues
queue_members => mysql,asteriskrealtime,queue_members

CREATE TABLE asteriskrealtime.voicemail_users (
uniqueid int(11) NOT NULL auto_increment,
customer_id varchar(11) NOT NULL default ‘0’,
context varchar(50) NOT NULL default ‘’,
mailbox varchar(11) NOT NULL default ‘0’,
password varchar(5) NOT NULL default ‘0’,
fullname varchar(150) NOT NULL default ‘’,
email varchar(50) NOT NULL default ‘’,
pager varchar(50) NOT NULL default ‘’,
tz varchar(10) NOT NULL default ‘gmt’,
attach varchar(4) NOT NULL default ‘yes’,
saycid varchar(4) NOT NULL default ‘yes’,
dialout varchar(10) NOT NULL default ‘’,
callback varchar(10) NOT NULL default ‘’,
review varchar(4) NOT NULL default ‘no’,
operator varchar(4) NOT NULL default ‘no’,
envelope varchar(4) NOT NULL default ‘no’,
sayduration varchar(4) NOT NULL default ‘no’,
saydurationm tinyint(4) NOT NULL default ‘1’,
sendvoicemail varchar(4) NOT NULL default ‘no’,
delete varchar(4) NOT NULL default ‘no’,
nextaftercmd varchar(4) NOT NULL default ‘yes’,
forcename varchar(4) NOT NULL default ‘no’,
forcegreetings varchar(4) NOT NULL default ‘no’,
hidefromdir varchar(4) NOT NULL default ‘yes’,
stamp timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (uniqueid),
KEY mailbox_context (mailbox,context)
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;

$data = array(
‘password’ => $rs->getString(‘vpexVoicemailPin’),
‘email’ => $rs->getString(‘vpexVoicemailEmail’),
‘pager’ => $rs->getString(‘vpexVoicemailEmail’),
‘fullname’ => $rs->getString(‘name’),
‘mailbox’ => $rs->getString(‘vpexExtension’),
‘customer_id’ => $rs->getInt(‘vpexCustomerId’)
);

		# now add the extension
		$this->database->insert('voicemail_users', $data, 'asteriskrealtime');

So when a call comes in and goes to voice mail it just hands up?

Could you post the context script as well as the CLI for a call going to voice mail, this would expedite the troubleshooting.

Thanks when I do voicemail show users, there’s nothing. although

the table has many entries.

extensions.conf

[macro-iaxdial]
exten => s,1,Dial(${ARG2}/${ARG1},20,r)
exten => s,2,Goto(s-${DIALSTATUS},1)
exten => s-CONGESTION,1,Voicemail(u${ARG1}@default)
exten => s-NOANSWER,1,Voicemail(u{$ARG1}@default)
exten => s-CHANUNAVAIL,1,Voicemail(u${ARG1}@default)
exten => s-BUSY,1,Voicemail(b${ARG1}@default)
exten => _s-.,1,Voicemail(u${ARG1}@default)

/var/log/asterisk/full

[Feb 9 19:27:40] VERBOSE[27693] logger.c: – Executing Macro(“IAX2/quebix-11141”, “iaxdial|100002|SIP”)
[Feb 9 19:27:40] VERBOSE[27693] logger.c: – Executing [s@macro-iaxdial:1] Dial(“IAX2/quebix-11141”, “SIP/100002|20|r”) in new stack
[Feb 9 19:27:40] VERBOSE[27693] logger.c: – Called 100002
[Feb 9 19:27:40] VERBOSE[27693] logger.c: – SIP/100002-08a64728 is ringing
[Feb 9 19:28:01] VERBOSE[27693] logger.c: – Nobody picked up in 20000 ms
[Feb 9 19:28:01] DEBUG[27693] app_macro.c: Executed application: Dial
[Feb 9 19:28:01] VERBOSE[27693] logger.c: – Executing [s@macro-iaxdial:2] Goto(“IAX2/quebix-11141”, “s-NOANSWER|1”) in new stack
[Feb 9 19:28:01] VERBOSE[27693] logger.c: – Goto (macro-iaxdial,s-NOANSWER,1)
[Feb 9 19:28:01] DEBUG[27693] app_macro.c: Executed application: Goto
[Feb 9 19:28:01] VERBOSE[27693] logger.c: – Executing [s-NOANSWER@macro-iaxdial:1] VoiceMail(“IAX2/quebix-11141”, “u{$ARG1}@default”) in new stack
[Feb 9 19:28:01] DEBUG[27693] res_config_mysql.c: MySQL RealTime: Everything is fine.
[Feb 9 19:28:01] DEBUG[27693] res_config_mysql.c: MySQL RealTime: Retrieve SQL: SELECT * FROM voicemail_users WHERE mailbox = ‘{$ARG1}’ AND context = ‘default’
[Feb 9 19:28:01] WARNING[27693] app_voicemail.c: No entry in voicemail config file for ‘{$ARG1}’
[Feb 9 19:28:01] DEBUG[27693] app_macro.c: Executed application: Voicemail

Change {$arg1} to ${arg1}

You’ve got the money in the wrong spot! :stuck_out_tongue:

lol it’s always the money :smiley: :smiley:

thanks m8

When using mysql for storing voicemail users, do I need voicemail.conf file? Can I store and read general section of voicemail in mysql?