Accessing voice mail on a SIP system

Discussion in 'UK VOIP' started by davehigton, Oct 14, 2010.

  1. davehigton

    davehigton Guest

    A SIP client can register to an Asterisk server. The server offers
    a voice mail service by dialling *79.

    However, I don't understand how this can work. Registration and
    OPTIONS messages and responses don't specify RTP destination
    ports, of course; and, as far as I know, dialling is done via RTP,
    either out of band (RFC2833) or in band (DTMF), which is not
    possible unless an RTP destination port is specified.

    So how does dialling VM work?

    Dave
    davehigton, Oct 14, 2010
    #1
    1. Advertising

  2. In article <>,
    davehigton <> wrote:
    >A SIP client can register to an Asterisk server. The server offers
    >a voice mail service by dialling *79.
    >
    >However, I don't understand how this can work. Registration and
    >OPTIONS messages and responses don't specify RTP destination
    >ports, of course; and, as far as I know, dialling is done via RTP,
    >either out of band (RFC2833) or in band (DTMF), which is not
    >possible unless an RTP destination port is specified.
    >
    >So how does dialling VM work?


    In an Asterisk system, the number you dial on a phone runs a small program
    inside the PBX. That program is user-defined and writtin in a variety of
    ways - the lowest level is Asterisk Dialplan. But before it gets there,
    the SIP call is setup, RTP ports, CODECS negitiated, then it can run
    the program.

    Often the program simply Dials another number then bridges the 2 legs
    together, but it can do many other things - such as voicemail...

    My own systems use 900 as the gateway to voicemail, and that looks like this:

    exten => 900,1,Answer()
    exten => 900,n,Playback(silence/1)
    exten => 900,n,VoiceMailMain(${CALLERID(num)})

    The internal function VoiceMailMain is what does the hard work...

    It is an interactive application controlled by key pushes on the phone -
    those keys are transfered from the phone to the application by whatever
    means the phone and Asterisk server have negotiated - in-band tones
    (unlikely), RFC2388 (which is also in-band, but carried digitally),
    or SIP-INFO which is out of band.

    But by the time the application starts, all the negotiations regarding
    RTP, ports, etc. have already happened.

    Not sure if this answers your question though...

    Gordon
    Gordon Henderson, Oct 14, 2010
    #2
    1. Advertising

  3. davehigton

    davehigton Guest

    On 14 Oct, 09:37, (Gordon Henderson) wrote:
    > In article <>,
    >
    > davehigton  <> wrote:
    > >A SIP client can register to an Asterisk server.  The server offers
    > >a voice mail service by dialling *79.

    >
    > >However, I don't understand how this can work.  Registration and
    > >OPTIONS messages and responses don't specify RTP destination
    > >ports, of course; and, as far as I know, dialling is done via RTP,
    > >either out of band (RFC2833) or in band (DTMF), which is not
    > >possible unless an RTP destination port is specified.

    >
    > >So how does dialling VM work?

    >
    > In an Asterisk system, the number you dial on a phone runs a small program
    > inside the PBX. That program is user-defined and writtin in a variety of
    > ways - the lowest level is Asterisk Dialplan. But before it gets there,
    > the SIP call is setup, RTP ports, CODECS negitiated, then it can run
    > the program.
    >
    > Often the program simply Dials another number then bridges the 2 legs
    > together, but it can do many other things - such as voicemail...
    >
    > My own systems use 900 as the gateway to voicemail, and that looks like this:
    >
    > exten => 900,1,Answer()
    > exten => 900,n,Playback(silence/1)
    > exten => 900,n,VoiceMailMain(${CALLERID(num)})
    >
    > The internal function VoiceMailMain is what does the hard work...
    >
    > It is an interactive application controlled by key pushes on the phone -
    > those keys are transfered from the phone to the application by whatever
    > means the phone and Asterisk server have negotiated - in-band tones
    > (unlikely), RFC2388 (which is also in-band, but carried digitally),
    > or SIP-INFO which is out of band.
    >
    > But by the time the application starts, all the negotiations regarding
    > RTP, ports, etc. have already happened.
    >
    > Not sure if this answers your question though...


    Thanks for your reply, but, no, it doesn't answer the question -
    because
    "the number you dial on the phone" can't get to Asterisk because there
    is no SIP, no call, and therefore no port has been agreed for the RTP
    to
    go to.

    If I place a call to sip:*79@ip_address, authentication fails.

    Dave
    davehigton, Oct 14, 2010
    #3
  4. In article <>,
    davehigton <> wrote:
    >On 14 Oct, 09:37, (Gordon Henderson) wrote:
    >> In article <.=

    >com>,
    >>
    >> davehigton =A0<> wrote:
    >> >A SIP client can register to an Asterisk server. =A0The server offers
    >> >a voice mail service by dialling *79.

    >>
    >> >However, I don't understand how this can work. =A0Registration and
    >> >OPTIONS messages and responses don't specify RTP destination
    >> >ports, of course; and, as far as I know, dialling is done via RTP,
    >> >either out of band (RFC2833) or in band (DTMF), which is not
    >> >possible unless an RTP destination port is specified.

    >>
    >> >So how does dialling VM work?

    >>
    >> Not sure if this answers your question though...

    >
    >Thanks for your reply, but, no, it doesn't answer the question -
    >because
    >"the number you dial on the phone" can't get to Asterisk because there
    >is no SIP, no call, and therefore no port has been agreed for the RTP
    >to
    >go to.
    >
    >If I place a call to sip:*79@ip_address, authentication fails.


    OK. Take 2.

    Dialling a SIP server works by sending commands over the SIP channel. So
    you dial a number on your phone, the phone has 2 choices - it can send
    the number to the server as you dial each digit effectively saying:
    "Try to dial this", or it can store the number, then send everything at
    once when you push the "send" key on the phone, or don't push any more
    buttons for some time... Lets assume we're doing it the latter way:

    At that point the phone asks the PBX to dial this number. This happens
    via SIP commands. RTP has not been setup at this point. This is the SIP
    INVITE part of it all.

    So phone sends an INVITE command - this might look like:

    INVITE sip:900@81.31.100.108 SIP/2.0

    (this is from my own system - I dialled 900)

    inside that SIP command packet there were other "stuff" too - eg. a list
    of the port the phone would like to use to carry the RTP data on -

    m=audio 5034 RTP/AVP 18 8 0 2 4 97 9 101

    and what codecs are supported.

    e.g.
    a=rtpmap:8 PCMA/8000

    and so on

    So basically the number you dial is carried in the SIP INVITE message
    and not in the RTP data - as we're not running RTP yet!

    At this stage, there is some authentication and negotiation between the
    phone and the server, then assuming thats OK, the call is placed and
    the RTP stream activated.

    If it's not working for you, then the phone has not registered with
    the PBX, or the PBX is not supporting anonymous calls. Registration
    involves the phone sending what's basically a username and password to
    the PBX periodically. (There are registration methods by IP address too)

    Once the RTP stream is going, DTMF digits are transmitted between the
    phone and server in one of 3 ways - the basic way is to simply send the
    audio inside the RTP stream - this is fine but don't work on compressed
    codecs. The next way is RFC2833 which is in-band in that it's carried
    in the RTP stream, however it's encoded as a special digital message
    in the stream. Finally there is SIP info and this is sent out of band
    (not in the RTP stream), and via the SIP channel.

    So I think the answer to your question is that the number dialled is
    crried in the SIP INVITE command, as well as the RTP port negotiation,
    then there is some authentication, then RTP.

    Incidentally, there can be multiple INVITES - as it's possible to change
    the RTP endpoints during a call - so 2 phones on the same server/PBX can
    talk directly to each other without their data going via the server -
    and then switch back to the server if required (e.g. you put a call on
    hold, the other end gets music on hold)

    Does that help?

    Gordon
    Gordon Henderson, Oct 14, 2010
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. A. Toprak

    Accessing Netscape mail via Netscape mail client

    A. Toprak, Dec 24, 2004, in forum: Computer Support
    Replies:
    0
    Views:
    579
    A. Toprak
    Dec 24, 2004
  2. Sven Holm
    Replies:
    0
    Views:
    1,504
    Sven Holm
    Sep 7, 2003
  3. Sven Holm
    Replies:
    0
    Views:
    1,414
    Sven Holm
    Sep 9, 2003
  4. Sven Holm
    Replies:
    5
    Views:
    4,497
    Arnold Ligtvoet
    Sep 12, 2003
  5. Thaqalain
    Replies:
    3
    Views:
    610
Loading...

Share This Page