Asterisk
  1. Asterisk
  2. ASTERISK-4269

[patch] Voicemail server/client MWI notifier + executing diaplan ext. upon IAX2/SIP registering/unregistering

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Severity: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Target Release Version/s: None
    • Component/s: Core/General
    • Labels:
      None
    • Mantis ID:
      4371
    • Regression:
      No

      Description

      This is a patch against CVS HEAD requested by the Chris A. Icide.
      1) The voicemail server allows notifing the client of MWI information over IAX2.

      The client's sip/iax2 peer entry should have this keyword:
      [peer]
      mailbox=remote_box:remote_context@[ip_of_remote_voicemail_server | iax2_peer_name_of_remote_voicemail_server]

      Then voicemail server has to have in voicemail.conf in general section:
      voicemail_server = [ip_of_the_box | iax2_unique_peer_name]

      the iax2_peer_name_of_remote_voicemail_server = iax2_unique_peer_name has to be unique and in iax.conf pointing either by host=ip or host=dynamic (then the IP of the box is taken from registrations)

      also in voicemail.conf the mailbox has to be configured as follows:

      [context]
      box:[ip_of_the_client_machine | iax2_unique_peer_name_of_the_client_machine] => pin, etc

      2) ChangeMailbox application to change on the fly the mailbox= setting or the mailbox definition in voicemail.conf

      3) on register/unregister event of IAX2/SIP executing some extensions in the dialplan

      you need to add the

      [peer_name]
      onregister-context=context_name

      in the definition of the peer that has to have that feature

      then the dialplan will execute extension peer_name in the context context_name
      the unregister event context has "unreg-" keyword prepended to the oregister-context name

      I think that's ALL!

        Activity

        Hide
        gkloepfer added a comment -

        (cicide requested I look at this re: my patch 0004236 ... my apologies for being completely out of touch on this issue since I suggested my patch – I got dragged away from Asterisk again for something else at work ... argh!)

        Some of the syntax of this, as others have said, is really confusing. I'm still not entirely sure if this solves my issue or not in 0004236, although it SEEMS like it does.

        Let me try to set-up the scenario I was trying to solve, quickly:

        You have Asterisk server "A" which is the centralized voicemail server, and server "B" which is servicing extensions with voicemail boxes on server "A". For SIP phones, this may seem a little redundant, but for Zap channels, it definitely isn't (we're going to have a remote PBX at another location).

        That said:
        I think I get the mailbox= syntax change in the physical extension entries in

        {iax,sip,zapata}

        .conf on server "B". What would need to be added to iax.conf on server "B" (aside from having the normal IAX options in iax.conf)? I think this is where the voicemail_server=peer goes into [general] ... but I have no idea what else goes there.

        What I really don't understand is what goes on server "A".

        If someone could summarize this a little better, I'd probably say "Ah ha!" and realize it does everything I ever wanted including make lemonade in the summertime!

        Here's an example of what I'm looking for, and how I understand how this works (as best as I can):

        Assuming I have a mailbox "200" in VOICEMAIL context "default" on server A (using my description of server A and B above)

        — Server A —
        voicemail.conf:
        [default]
        200@server-a-b-link => 12345,Gil Kloepfer,no@spam.com

        iax.conf:
        [server-a-b-link]
        type=friend
        host=serverb
        context=serverb-incoming
        (blah blah blah)

        — Server B —
        iax.conf:
        [general]
        voicemail_server=server-a-b-link

        [server-a-b-link]
        type=friend
        host=servera
        context=servera-incoming
        (blah blah blah)

        zapata.conf:
        signalling=fxo_ks
        usecallerid=yes
        context=extensions-incoming
        callerid="My Phone" <200>
        voicemail=200:default@server-a-b-link
        channel => 1

        ---------------------------------

        Is this correct?

        Something seems wrong with the voicemail.conf on servera...but I don't think I'd want this on serverb, or I'd have to keep track of voicemail.conf entries on two systems rather than one.

        Show
        gkloepfer added a comment - (cicide requested I look at this re: my patch 0004236 ... my apologies for being completely out of touch on this issue since I suggested my patch – I got dragged away from Asterisk again for something else at work ... argh!) Some of the syntax of this, as others have said, is really confusing. I'm still not entirely sure if this solves my issue or not in 0004236, although it SEEMS like it does. Let me try to set-up the scenario I was trying to solve, quickly: You have Asterisk server "A" which is the centralized voicemail server, and server "B" which is servicing extensions with voicemail boxes on server "A". For SIP phones, this may seem a little redundant, but for Zap channels, it definitely isn't (we're going to have a remote PBX at another location). That said: I think I get the mailbox= syntax change in the physical extension entries in {iax,sip,zapata} .conf on server "B". What would need to be added to iax.conf on server "B" (aside from having the normal IAX options in iax.conf)? I think this is where the voicemail_server=peer goes into [general] ... but I have no idea what else goes there. What I really don't understand is what goes on server "A". If someone could summarize this a little better, I'd probably say "Ah ha!" and realize it does everything I ever wanted including make lemonade in the summertime! Here's an example of what I'm looking for, and how I understand how this works (as best as I can): Assuming I have a mailbox "200" in VOICEMAIL context "default" on server A (using my description of server A and B above) — Server A — voicemail.conf: [default] 200@server-a-b-link => 12345,Gil Kloepfer,no@spam.com iax.conf: [server-a-b-link] type=friend host=serverb context=serverb-incoming (blah blah blah) — Server B — iax.conf: [general] voicemail_server=server-a-b-link [server-a-b-link] type=friend host=servera context=servera-incoming (blah blah blah) zapata.conf: signalling=fxo_ks usecallerid=yes context=extensions-incoming callerid="My Phone" <200> voicemail=200:default@server-a-b-link channel => 1 --------------------------------- Is this correct? Something seems wrong with the voicemail.conf on servera...but I don't think I'd want this on serverb, or I'd have to keep track of voicemail.conf entries on two systems rather than one.
        Hide
        Olle Johansson added a comment -

        You have too many different functions in one mantis issue. Please split this up so we can separate discussion on remote voicemail (stays in this report) and the other functions. Thank you!

        Show
        Olle Johansson added a comment - You have too many different functions in one mantis issue. Please split this up so we can separate discussion on remote voicemail (stays in this report) and the other functions. Thank you!
        Hide
        Olle Johansson added a comment -

        What is the idea behind the simple channel? Please tell us more about it, it lacks documentation

        Show
        Olle Johansson added a comment - What is the idea behind the simple channel? Please tell us more about it, it lacks documentation
        Hide
        Chris A. Icide added a comment -

        I sent an email to martin asking him to drop by and answer Olle's question.

        As for the config questions, to understand the config better I think you need to understand how the system works in general.

        Currently modifications are required to the config files on both the voicemail server as well as the remote asterisk server which hosts the device that we will be providing MWI signalling to.

        You need to tell the voicemail server which remote server to send the MWI updates to (it pushes them out). This is done via the voicemail.conf file on the voicemail server.

        You need to tell the remote asterisk system that it should be checking it's remote MWI table for pushed updates for certain client devices. This is done via the mailbox= parameter in the client configuration file (sip.conf, iax.conf, etc.)

        I spoke with Martin about changing the configuration to one like twisted recommended where you would leave the device configuration file alone (sip.conf...) but modify the local (on the non-voicemail server system) voicemail.conf file to indicate that voicemail for a particular voicemail user is served remotely. He will get to making that change as soon as he can, but currently doesn't have the time.

        Show
        Chris A. Icide added a comment - I sent an email to martin asking him to drop by and answer Olle's question. As for the config questions, to understand the config better I think you need to understand how the system works in general. Currently modifications are required to the config files on both the voicemail server as well as the remote asterisk server which hosts the device that we will be providing MWI signalling to. You need to tell the voicemail server which remote server to send the MWI updates to (it pushes them out). This is done via the voicemail.conf file on the voicemail server. You need to tell the remote asterisk system that it should be checking it's remote MWI table for pushed updates for certain client devices. This is done via the mailbox= parameter in the client configuration file (sip.conf, iax.conf, etc.) I spoke with Martin about changing the configuration to one like twisted recommended where you would leave the device configuration file alone (sip.conf...) but modify the local (on the non-voicemail server system) voicemail.conf file to indicate that voicemail for a particular voicemail user is served remotely. He will get to making that change as soon as he can, but currently doesn't have the time.
        Hide
        Michael Jerris added a comment -

        Suspended due to 3 weeks no response. I would really like to see this work continued. If you are still interested in this bug, please reopen with the responses to oej as requested. Thanks.

        Show
        Michael Jerris added a comment - Suspended due to 3 weeks no response. I would really like to see this work continued. If you are still interested in this bug, please reopen with the responses to oej as requested. Thanks.

          People

          • Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development