Saturday, May 19, 2012

chan_sip.c: Received SIP subscribe for peer without mailbox: 1000

Asterisk is receiving this error:

chan_sip.c: Received SIP subscribe for peer without mailbox: 1000


To fix it: we must add "mailbox=user@default" to each user in sip.conf:

[1000]
...
...
...
mailbox=1000@default

Asterisk error: WARNING[xxxxx] app_voicemail.c: Failed to obtain database object for 'DATABASE_NAME'!


I received below error on /var/log/asterisk/message:

[2012-05-20 10:28:48] WARNING[12496] app_voicemail.c: Failed to obtain database object for 'DATABASE_NAME'!
[2012-05-20 10:28:48] WARNING[12496] app_voicemail.c: Failed to obtain database object for 'DATABASE_NAME'!
[2012-05-20 10:28:48] WARNING[12496] app_voicemail.c: Failed to obtain database object for 'DATABASE_NAME'!

to fix it we must add below lines to /etc/asterisk/res_odbc.conf


and below lines to /etc/odbc.ini
[ut_a2b]
dsn => DSN_NAME
pre-connect => yes
enabled => yes


[DSN_NAME]
Description=Asterisk voicemail odbc storage
Driver=MySQL
Server=SERVER_ADDRESS
User=DB_USER
Password=SOME_PASSWORD
Database=DB_NAME
Option=1
Trace=yes
Tracefile=/tmp/odbc.log


Asterisk voicemail error: file.c: Unable to open format wav


After upgrading asterisk to latest version on a new server our voicemail gets below error:


[2012-05-20 09:21:53] WARNING[25083] format_wav.c: Not a wav file 49
[2012-05-20 09:21:53] WARNING[25083] file.c: Unable to open format wav
[2012-05-20 09:21:53] WARNING[25083] file.c: Unable to open /var/spool/asterisk/voicemail/default/9001/unavail (format 0x4 (ulaw)): No such file or directory

To resolve this we had to fix the database name and table in voicemail.conf to make sure it is using odbc configuration same as our res_config