[Home]

Summary:ASTERISK-01767: Message waiting doesnt work when using MYSQL for sipfriends.
Reporter:deon (deon)Labels:
Date Opened:2004-06-05 02:15:47Date Closed:2011-06-07 14:05:06
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Hi, I've discovered that the message waiting doesnt tell the phone that there are new message if the SIP phone is configured in MYSQL.

I'm using asterisk v1-0 stable CVS and the asterisk-addons checked out today 5/Jun.

I've patched chan_sip.c so that it will get the "mailbox" string out of SQL too (in mysql_peer), as if it was defined in the config file.

I then tried to patch chan_sip.c to make calls to:

ast_mutex_lock(&peerl.lock);
p->next = peerl.peers;
peerl.peers = p;
ast_mutex_unlock(&peerl.lock);

in mysql_peer - as is done in reload_config around line 6561 in chan_sip.c.

It does work - but unfortunately, if a phone has messages waiting, it DOES get the message waiting signal, then asterisk Segfaults and dies (probably because I'm not a C/C++ programmer).

(If it doesnt have any messages waiting the asterisk happily runs).

Would you have a proper patch for this for v1.0 stable?
Comments:By: Brian West (bkw918) 2004-06-06 22:34:33

Well if you can provide a backtrace we can figure out where it segs... :)

By: Olle Johansson (oej) 2004-06-09 11:45:54

Mysql SIP peers is not kept in memory, thus we can't track them for message waiting signals. It's impossible with the current MYSQL_FRIENDS architecture, sorry. Guess your best bet is to load the peers from mysql with a script from the contrib directory instead of using mysql_friends.

Guess your patch broke the link list for messages waiting.

This is no bug in CVS. If you want to file it as a feature request, please open another bug #.