Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   UK VOIP (http://www.velocityreviews.com/forums/f34-uk-voip.html)
-   -   Accessing voice mail on a SIP system (http://www.velocityreviews.com/forums/t735461-accessing-voice-mail-on-a-sip-system.html)

davehigton 10-14-2010 06:49 AM

Accessing voice mail on a SIP system
 
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

Gordon Henderson 10-14-2010 08:37 AM

Re: Accessing voice mail on a SIP system
 
In article <f188709f-b7fa-452d-a4cb-806cd8c2676a@28g2000yqm.googlegroups.com>,
davehigton <davehigton@dsl.pipex.com> 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

davehigton 10-14-2010 08:55 AM

Re: Accessing voice mail on a SIP system
 
On 14 Oct, 09:37, gor...@lion.drogon.net (Gordon Henderson) wrote:
> In article <f188709f-b7fa-452d-a4cb-806cd8c26...@28g2000yqm.googlegroups.com>,
>
> davehigton *<davehig...@dsl.pipex.com> 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


Gordon Henderson 10-14-2010 05:18 PM

Re: Accessing voice mail on a SIP system
 
In article <796012a7-9588-4b8b-b91c-1786d08b6c8e@l8g2000yql.googlegroups.com>,
davehigton <davehigton@dsl.pipex.com> wrote:
>On 14 Oct, 09:37, gor...@lion.drogon.net (Gordon Henderson) wrote:
>> In article <f188709f-b7fa-452d-a4cb-806cd8c26...@28g2000yqm.googlegroups.=

>com>,
>>
>> davehigton =A0<davehig...@dsl.pipex.com> 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



All times are GMT. The time now is 10:19 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.