Subject: [Megaco] doubt on Originating and Terminating Suntract

From: "karthik prabhu Balakrishnan" <[email-masked]>
Date: Fri, 20 Apr 2007 12:11:53 +0530

Hello all,
 I am new to this mailing group.
I Have a doubt  in Megaco.
The call flows like this.

Voiceline/1 calls Bratislava/2
Bratislava/2 answered.
They are in speech.
Now Bratislava/2 on-hooked.
The Subtract command applied to remove rtp termination
and bratislava/2 from the created context looks lilke
T=46{C=2{S=*{AT{}}},C=-{MF=Bratislava/2{SG{},E=68{al/of{EM{SG{cg/dt},E=69{dd/ce{DigitMap=G_DGT_MAP},al/on{strict=exact}}},
strict=exact}}}}}

Voiceline/1 listens congestion tone since Bratislava/2 on-hooked.
T=47{C=2{MF=Voiceline/1{SG{cg/ct},E=70{al/on{strict=failWrong}}}}}

Now please note Subtract command applied for voiceline/1.
T=48{C=2{S=*{AT{}}},C=-{MF=Voiceline/1{E=71{al/of{EM{SG{*srvtn/mwt*
},E=72{dd/ce{DigitMap=G_DGT_MAP},al/on{strict=exact}}},
*strict=failWrong*}}}}}

>From my understanding,
strict = failwrong for off hook scanning,
will check if off-hook has occured.
If not then applies the embedded token.
But the originating subtract(T=46), exact off-hook is expected.
Please let why is the terminating subtract different from originating
subtract?

PS:- voiceline/1 is subscribed to Message wait tone.
Hence *srvtn/mwt *is applied.

Thanks,
karthik Prabhu
_______________________________________________
Megaco mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/megaco

---

From: Dmitry Pavlenko <[email-masked]>
Date: Fri, 20 Apr 2007 15:39:56 +0600

Hello Karthik

T=46{C=2{S=*{AT{}}},
S=* - means SUBTRACT ALL from this Context so this context disappears.
But in the Transaction=47 you once again refer to the Context 2 which 
has already been destroyed in the previous transaction.

regards,

Dmitry Pavlenko

karthik prabhu Balakrishnan wrote:
> T=48{C=2{S=*{AT{}}},C=-{MF=Voiceline/1{E=71{al/of{EM{SG{*srvtn/mwt*},E=72{dd/ce{DigitMap=G_DGT_MAP},al/on{strict=exact}}}, 
>
> *strict=failWrong*}}}}}
>
> >From my understanding,
> ------------------------------------------------------------------------
>
> __________ Èíôîðìàöèÿ NOD32 2203 (20070419) __________
>
> Ýòî ñîîáùåíèå ïðîâåðåíî Àíòèâèðóñíîé ñèñòåìîé NOD32.
> http://www.eset.com
>
>

---

From: "Stephen Mell \(CV/ETL\)" <[email-masked]>
Date: Fri, 20 Apr 2007 18:50:06 +0200

Dmitry,

I think that Bratislava/2 and Voiceline/1 may be on different Gateways, the fact that context=2 on both gateways is coincidental.

Karthik,

The failwrong means that transaction 47 fails and returns an error 540 if the line is already OnHook. In this case it would NOT then go on to apply an embedded descriptor (there is non present in transaction 47 anyway), then entire command has failed and the cg/ct would NOT be applied and the state of the line is completely unaltered.

The MGC would not put a "failwrong" parameter against an al/on or al/off when its in an embedded descriptor, because the MG cannot send an error 540 when the descriptor is actually applied. The MG is only allowed to send error 518 in an unsolicited manner (in a NOTIFY command). This is probably why the al/on strict parameters differ when they appear in an embed descriptor.

If the MGC did put "failwrong" parameter into an embedded events descriptor and the hook state was found to be inconsitent at the time that events descriptor was applied, then the H.248 stack on the MG would probably have to restart the line (if it had not already rejected failwrong when parsing the original embedded events descriptor)

The "exact" is OK is the embedded descriptors because the embedded descriptor is applied locally on the MG in such a way that the window of time for crossovers is reduced to zero, so the MGC does not need to specify a stategy to deal with the crossover case, when embedding is used.

One thing that worries me is that the MGC primes for al/of without giving the strict parameter, I don't think the "al" package states what the default is for this parameter, so that it is open to interpretation by the MG.

Steve 

-----Original Message-----
From: Dmitry Pavlenko [mailto:[email-masked]] 
Sent: Friday, April 20, 2007 10:40
To: karthik prabhu Balakrishnan
Cc: [email-masked]
Subject: Re: [Megaco] doubt on Originating and Terminating Suntract

Hello Karthik

T=46{C=2{S=*{AT{}}},
S=* - means SUBTRACT ALL from this Context so this context disappears.
But in the Transaction=47 you once again refer to the Context 2 which has already been destroyed in the previous transaction.

regards,

Dmitry Pavlenko

karthik prabhu Balakrishnan wrote:
> The Subtract command applied to remove rtp termination and 
> bratislava/2 from the created context looks lilke 
> T=46{C=2{S=*{AT{}}},C=-{MF=Bratislava/2{SG{},E=68{al/of{EM{SG{cg/dt},E
> =69{dd/ce{DigitMap=G_DGT_MAP},al/on{strict=exact}}},
> strict=exact}}}}}
>
> T=48{C=2{S=*{AT{}}},C=-{MF=Voiceline/1{E=71{al/of{EM{SG{*srvtn/mwt*},E
> =72{dd/ce{DigitMap=G_DGT_MAP},al/on{strict=exact}}},
>
> *strict=failWrong*}}}}}
>
> >From my understanding,
> strict = failwrong for off hook scanning, will check if off-hook has 
> occured.

---

From: "Stephen Mell \(CV/ETL\)" <[email-masked]>
Date: Fri, 20 Apr 2007 18:57:14 +0200

Correction on last point.

In H.248v3 Annex E the default for the al/on, al/off strict parameter is now given as "exact", however it was missing from H.248v2
So if you working in v2 it's a good idea for MGC to specify the value of the strict parameter (treat as mandatory).

Steve 

-----Original Message-----
From: Stephen Mell (CV/ETL) [mailto:[email-masked]] 
Sent: Friday, April 20, 2007 17:50
To: Dmitry Pavlenko; karthik prabhu Balakrishnan
Cc: [email-masked]
Subject: RE: [Megaco] doubt on Originating and Terminating Suntract

Dmitry,

Karthik,

Steve 

-----Original Message-----
From: Dmitry Pavlenko [mailto:[email-masked]]
Sent: Friday, April 20, 2007 10:40
To: karthik prabhu Balakrishnan
Cc: [email-masked]
Subject: Re: [Megaco] doubt on Originating and Terminating Suntract

Hello Karthik

T=46{C=2{S=*{AT{}}},

regards,

Dmitry Pavlenko

---

From: "Stephen Mell \(CV/ETL\)" <[email-masked]>
Date: Sun, 22 Apr 2007 18:34:36 +0200

Karthik,

Apologies,

I did not read Transaction 48 properly. There are no al/on or al/of requested events without an explicit state parameter.

The "al/of" event in T=48 has both an embed descriptor (containing events and signals) and a "failwrong" parameter:

T=48 {
   C=2 {
      S=* {
         AT{}
      }
   },
   C=- {
      MF=Voiceline/1
      {
         E=71 {
            al/of {
               EM {
                  SG {
                     srvtn/mwt
                  },
                  E=72 {
                     dd/ce{DigitMap=G_DGT_MAP},
                     al/on{strict=exact}
                  }
               },
               * strict=failWrong *
            }
         }
      }
   }
}

The same reasoning still applies though. If a command fails on the MG then the termination is left completely unchanged, as commands are considered to be "atomic" instructions in H.248, so that all parts of it are applied or no part of it is applied. The MGC forces the MG to fail the modify command with error 540 when the MG finds that the termination's hook state is already OffHook, and in that case the terminations previous event descriptor "E=70" would still be in force after the error 540 has been issued. If the termination is OnHook when the modify is received then the new priming "al/of" in E=71 is applied. The embedded events desciptor "E=72" is only applied after the termination subsequently goes offHook. 

The embedding should definitely should not be applied at the point the Modify fails with error 540 (when the termination is already offHook). If the MGC vendor expects that behaviour, then they are wrong to do so (to acheieve that they should use * strict=state *)

Its not immediately obvious (to me at least) why the al/of strict parameter is "failwrong" for Voiceline/1 in T=48 and "exact" for Bratislava/2 in T=46. I can't see why the MGC would wish to know about a state mismatch on one line but not the other.

Steve 

-----Original Message-----
From: Stephen Mell (CV/ETL) [mailto:[email-masked]] 
Sent: Friday, April 20, 2007 17:57
To: Dmitry Pavlenko; karthik prabhu Balakrishnan
Cc: [email-masked]
Subject: RE: [Megaco] doubt on Originating and Terminating Suntract

In H.248v3 Annex E the default for the al/on, al/off strict parameter is now given as "exact", however it was missing from H.248v2 So if you working in v2 it's a good idea for MGC to specify the value of the strict parameter (treat as mandatory).

Steve 

-----Original Message-----
From: Stephen Mell (CV/ETL) [mailto:[email-masked]]
Sent: Friday, April 20, 2007 17:50
To: Dmitry Pavlenko; karthik prabhu Balakrishnan
Cc: [email-masked]
Subject: RE: [Megaco] doubt on Originating and Terminating Suntract

Dmitry,

Karthik,

Steve 

-----Original Message-----
From: Dmitry Pavlenko [mailto:[email-masked]]
Sent: Friday, April 20, 2007 10:40
To: karthik prabhu Balakrishnan
Cc: [email-masked]
Subject: Re: [Megaco] doubt on Originating and Terminating Suntract

Hello Karthik

T=46{C=2{S=*{AT{}}},

regards,

Dmitry Pavlenko

---

From: "karthik prabhu Balakrishnan" <[email-masked]>
Date: Tue, 24 Apr 2007 14:15:15 +0530

Hello Steve, Dmitry,

Sincere thanks for your support.
I could find a strategy implemented for special tone in this megaco stack.
The implementation handles the exception scenario to be treated as you had
mentioned in your mail.

In case Served User for special tone( voiceline/1) went offhook before
Subtract to apply specail tone just arrives,
Subtract command with offhook scanning with Failwrong fails. Hence Media
Gateway will send Modify
Reply with Error descriptor as=540{"Unexpected initial hook state"}
Hence the MGC will re-send a modify command to apply specail tone.

Thanks and Regards,
Karthik prabhu

On 4/22/07, Stephen Mell (CV/ETL) <[email-masked]> wrote:
>
> Karthik,
>
> Apologies,
>
> I did not read Transaction 48 properly. There are no al/on or al/of
> requested events without an explicit state parameter.
>
> The "al/of" event in T=48 has both an embed descriptor (containing events
> and signals) and a "failwrong" parameter:
>
> T=48 {
>    C=2 {
>       S=* {
>          AT{}
>       }
>    },
>    C=- {
>       MF=Voiceline/1
>       {
>          E=71 {
>             al/of {
>                EM {
>                   SG {
>                      srvtn/mwt
>                   },
>                   E=72 {
> The same reasoning still applies though. If a command fails on the MG then
> the termination is left completely unchanged, as commands are considered to
> be "atomic" instructions in H.248, so that all parts of it are applied or
> no part of it is applied. The MGC forces the MG to fail the modify command
> with error 540 when the MG finds that the termination's hook state is
> already OffHook, and in that case the terminations previous event descriptor
> "E=70" would still be in force after the error 540 has been issued. If the
> termination is OnHook when the modify is received then the new priming
> "al/of" in E=71 is applied. The embedded events desciptor "E=72" is only
> applied after the termination subsequently goes offHook.
>
> The embedding should definitely should not be applied at the point the
> Modify fails with error 540 (when the termination is already offHook). If
> the MGC vendor expects that behaviour, then they are wrong to do so (to
> acheieve that they should use * strict=state *)
>
> Its not immediately obvious (to me at least) why the al/of strict
> parameter is "failwrong" for Voiceline/1 in T=48 and "exact" for
> Bratislava/2 in T=46. I can't see why the MGC would wish to know about a
> state mismatch on one line but not the other.
>
> Steve
>
>
>
> In H.248v3 Annex E the default for the al/on, al/off strict parameter is
> now given as "exact", however it was missing from H.248v2 So if you
> working in v2 it's a good idea for MGC to specify the value of the strict
> parameter (treat as mandatory).
>
> Steve
>
> I think that Bratislava/2 and Voiceline/1 may be on different Gateways,
> the fact that context=2 on both gateways is coincidental.
>
> Karthik,
>
> The failwrong means that transaction 47 fails and returns an error 540 if
> the line is already OnHook. In this case it would NOT then go on to apply an
> embedded descriptor (there is non present in transaction 47 anyway), then
> entire command has failed and the cg/ct would NOT be applied and the state
> of the line is completely unaltered.
>
> The MGC would not put a "failwrong" parameter against an al/on or al/off
> when its in an embedded descriptor, because the MG cannot send an error 540
> when the descriptor is actually applied. The MG is only allowed to send
> error 518 in an unsolicited manner (in a NOTIFY command). This is probably
> why the al/on strict parameters differ when they appear in an embed
> descriptor.
>
> If the MGC did put "failwrong" parameter into an embedded events
> descriptor and the hook state was found to be inconsitent at the time that
> events descriptor was applied, then the H.248 stack on the MG would
> probably have to restart the line (if it had not already rejected failwrong
> when parsing the original embedded events descriptor)
>
> The "exact" is OK is the embedded descriptors because the embedded
> descriptor is applied locally on the MG in such a way that the window of
> time for crossovers is reduced to zero, so the MGC does not need to specify
> a stategy to deal with the crossover case, when embedding is used.
>
> One thing that worries me is that the MGC primes for al/of without giving
> the strict parameter, I don't think the "al" package states what the default
> is for this parameter, so that it is open to interpretation by the MG.
>
> Steve
>
>
>
>
>
>
>
> But in the Transaction=47 you once again refer to the Context 2 which has
> already been destroyed in the previous transaction.
>
> regards,
>
> Dmitry Pavlenko
>
>
>
> > __________ Информация NOD32 2203 (20070419) __________
> >
> > Это сообщение проверено Антивирусной системой NOD32.
> > http://www.eset.com
> >
> >
>