voicemail_1

97 views
Skip to first unread message

Bernard Murphy

unread,
Apr 14, 2012, 5:33:57 PM4/14/12
to 2600hz...@googlegroups.com
bluebox sets the domain for voicemail to voicemail_1 instead of the actual location or domain/ip. How can I overide this to be the ip or location/domain of the server instead?
This is needed to make the MWI work properly and match the subscribe messages.

Thanks

Darren Schreiber

unread,
Apr 14, 2012, 5:43:17 PM4/14/12
to 2600hz...@googlegroups.com
Hi there,
Unfortunately when we originally designed this, it either didn't cause an issue or nobody noticed :-) We can't change the primary identifier I'm afraid, it would be a massive change.

I will see if there's a way to add a parameter to force a different domain name in the MWI subscribes…

What phone is not supporting this behavior properly?

--
Darren Schreiber
CEO / Co-Founder


 visit: www.2600hz.com
 tel: 415-886-7901

Bernard Murphy

unread,
Apr 15, 2012, 3:48:37 AM4/15/12
to 2600hz...@googlegroups.com
Hi Darren,

The phone is an Avaya 9630 running the 2.6 SIP firmware. It subscribes to presence messages with a SIP uri of ext@ipaddress and a vanilla install of freeswitch  will send notifys which match that subscription e.g.

Messages-Waiting: yes
Message-Account: sip:8...@192.168.2.41
Voice-Message: 3/0 (0/0)

Once bluebox has taken over the dialplan the SIP notify for MWI is modified to use domain of voicemail_1 as below which no longer matches the subscription.

Messages-Waiting: yes
Message-Account: sip:86@voicemail_1
Voice-Message: 3/0 (0/0)

If I then edit he dialplan and directory xml configs directly and replace voicemail_1 with the ip address of the freeswitch server the SIP notify will get sent correctly but obviously is overwritten every time bluebox wites the files.

[Dialplan]
<action application="voicemail" data="default 192.168.2.41 86"/> this works
<action application="voicemail" data="default voicemail_1 86"/> this doesn't

[Directory]
default.xml:              <variable name="mwi-account" value="8...@192.168.2.41"/> this works
default.xml:              <param name="mwi-account" value="8...@192.168.2.41"/> this works

default.xml:              <variable name="mwi-account" value="86@voicemail_1"/>this doesn't
default.xml:              <param name="mwi-account" value="86@voicemail_1"/> this doesn't

Is there anyway I can modify bluebox to use $domain instead of "voicemail_1"  ?

Thanks very much
I appreciate the response.
Bernie







On Saturday, April 14, 2012 10:43:17 PM UTC+1, Darren Schreiber wrote:
Hi there,
Unfortunately when we originally designed this, it either didn't cause an issue or nobody noticed :-) We can't change the primary identifier I'm afraid, it would be a massive change.

I will see if there's a way to add a parameter to force a different domain name in the MWI subscribes…

What phone is not supporting this behavior properly?

--
Darren Schreiber
CEO / Co-Founder


 visit: www.2600hz.com
 tel: 415-886-7901

Darren Schreiber

unread,
Apr 16, 2012, 11:22:59 AM4/16/12
to 2600hz...@googlegroups.com
Hi Bernie,
The problem is we use those names to designate where things are stored in the database. That change is easy. But the real problem is that we force people to keep the names consistent because otherwise if you, say, rename a domain we would have to come up with a way to search every single file and convert every occurrence of old_domain to new_domain which is non-trivial for a variety of reasons. The most fundamental reason it's non-trivial is simply because we only change the single file that you edited on a change, not every file, so this would break the logic of the whole system.

One possible solution: I could let you specify the name but then not allow you to rename it, ever.

Thoughts?

--
Darren Schreiber
CEO / Co-Founder


 visit: www.2600hz.com
 tel: 415-886-7901

bernard.da...@gmail.com

unread,
Apr 18, 2012, 4:43:57 AM4/18/12
to 2600hz...@googlegroups.com
Hi Darren,

Thanks for the suggestion. From my tests I think I am ok with the use of voicemail_1 as a name for the domain in which the users id and variables exist , but I have to use an ip address in the mwi-account variable and param of directory/default.xml and as the data in the application line of the dialplan where voicemail is invoked. Does that make sense ?

I have modified voicemail.php to hard code an ip at the moment to do this but would something like $base['user']['location'] be the right value to use instead of hard coding ?

Thanks
Bernie
Sent from my BlackBerry® wireless device

From: Darren Schreiber <dar...@2600hz.com>
Date: Mon, 16 Apr 2012 15:22:59 +0000

Darren Schreiber

unread,
Apr 18, 2012, 12:55:37 PM4/18/12
to 2600hz...@googlegroups.com
Hi Bernie,
Thanks for this great investigation! So you are stating if we add the domain in the MWI indicator field it will work? If so that's a MUCH easier change to accomplish and something I also did not know. I think we can get that patched…

--
Darren Schreiber
CEO / Co-Founder


 visit: www.2600hz.com
 tel: 415-886-7901
A31237D7-F921-41E3-B066-8EA5557A5A7D[2].png

Bernard Murphy

unread,
Apr 21, 2012, 5:27:10 PM4/21/12
to 2600hz...@googlegroups.com
Hi Darren,

I have modified my /var/www/html/bluebox/modules/voicemail-1.0/libraries/drivers/freeswitch/voicemail.php as below(changes in red and bold)
The only other change I need to make is to the file that writes the dialplan out with the following line, which also needs to be IP instead.

 <action application="voicemail" data="default voicemail_1 86"/>

any idea which file needs modifiying ?

Domain name still remains as   <domain name="voicemail_1"> in default.xml which is OK.

This obviously doesn't update all the extensions if the IP is changed via location manager but at least once correct the directory and dialplan get written correctly.

thanks for your help
Bernie

_____________________________________________________________________
        {
            $voicemail = $base['plugins']['voicemail'];

            $domain = '$${location_' .$base['User']['location_id'] .'}';

            $xml = FreeSwitch::setSection('user', $domain, $base['device_id']);

            if (empty($base['plugins']['voicemail']['mwi_box']))
            {
                 $xml->deleteNode('/variables/variable[@name="mwi-account"]');
                 $xml->deleteNode('/params/param[@name="mwi-account"]');
            }
            else
            {
                $location_id = $base['User']['location_id'];
                $location = Doctrine::getTable('Location')->findOneBy('location_id',$location_id) ;
                $domainip = $location['domain'];


                $voicemail = Doctrine::getTable('Voicemail')->find($base['plugins']['voicemail']['mwi_box']);

                if (!$voicemail)
                {
                    $xml->deleteNode('/variables/variable[@name="mwi-account"]');
                    $xml->deleteNode('/params/param[@name="mwi-account"]');
                }
                else
                {
                    $xml->update('/variables/variable[@name="mwi-account"]{@value="' .$voicemail['mailbox'] .'@'.$domainip .'"}');
                    $xml->update('/params/param[@name="mwi-account"]{@value="' .$voicemail['mailbox'] .'@' .$domainip .'"}');
                }
            }
        }
_______________________________________________________________________
A31237D7-F921-41E3-B066-8EA5557A5A7D[2].png
A31237D7-F921-41E3-B066-8EA5557A5A7D[45].png

Darren Schreiber

unread,
Apr 23, 2012, 10:01:07 AM4/23/12
to 2600hz...@googlegroups.com
Thanks Bernie! Let me see if this patch breaks any other functionality. If not, I'll commit it on your behalf! Awesome patch :-)
                    $xml->update('/variables/variable[@name="mwi-account"]{@value="' .$voicemail['mailbox'] .'@'.$domainip.'"}');
A31237D7-F921-41E3-B066-8EA5557A5A7D[2].png
A31237D7-F921-41E3-B066-8EA5557A5A7D[45].png

Scott Crawford

unread,
Dec 9, 2013, 3:22:48 PM12/9/13
to 2600hz...@googlegroups.com
Sorry to revive and old thread.   I found this thread when trying to troubleshoot email delivery of voicemail.
I tried these steps to change the FROM email from voicemail_1.<mydomain.com>
I've implemented this change       $xml->update('/variables/variable[@name="mwi-account"]{@value="' .$voicemail['mailbox'] .'@'.$domainip.'"}');, but it still didn't fix it.
I'd like to fix it right, rather than cheat and fix it with sendmail rules....but I'm struggling here.

Thanks for any help.
Reply all
Reply to author
Forward
0 new messages