Re: [asterisk-users] identify caller hangup or callee hangup?

2010-05-17 Thread Klaus Darilion


Am 17.05.2010 10:46, schrieb Zhang Shukun:
 Hello,

 you know , when a call setup, either caller hangup first or callee
 hangup first , the hangupcause will set to 16(means Call Clearing
 Causes)

 My question is how could i identify whether the caller or callee
 hangup the phone first?

AFAIK you can not.

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] identify caller hangup or callee hangup?

2010-05-17 Thread Gareth Blades
Klaus Darilion wrote:
 
 Am 17.05.2010 10:46, schrieb Zhang Shukun:
 Hello,

 you know , when a call setup, either caller hangup first or callee
 hangup first , the hangupcause will set to 16(means Call Clearing
 Causes)

 My question is how could i identify whether the caller or callee
 hangup the phone first?
 
 AFAIK you can not.
 
The only way I can think of doing it is that if one end involves the use 
of ISDN then in the console logs you do get messages like
-- Channel 0/11, span 1 got hangup request, cause 16
but there is no timestamp so it would be tricky matching up to the 
corresponding call

Maybe you can try using the manager interface. The hangup event seems to 
mention the channel so perhaps this is the one which initiated the hangup
http://www.voip-info.org/wiki/view/asterisk+manager+events#HangupEvent

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] identify caller hangup or callee hangup?

2010-05-17 Thread Vardan
I think You can do this if you use local channel.
For example, you do two context
AEL example

context Incoming {
_X. = {
..
Dial(Local/${ext...@outgoing/n);
};
h = {
Noop(Hangup in Incoming);
}
};

context Outgoing {
_X. = {
..
Dial(SIP/d...@dd);
};
h = {
Noop(Hangup in Outgoing);
};
};

I think this is must work. I have like so, but use with callout files.

Vardan

Gareth Blades wrote:
 Klaus Darilion wrote:

 Am 17.05.2010 10:46, schrieb Zhang Shukun:
 Hello,

 you know , when a call setup, either caller hangup first or callee
 hangup first , the hangupcause will set to 16(means Call Clearing
 Causes)

 My question is how could i identify whether the caller or callee
 hangup the phone first?

 AFAIK you can not.

 The only way I can think of doing it is that if one end involves the use
 of ISDN then in the console logs you do get messages like
 -- Channel 0/11, span 1 got hangup request, cause 16
 but there is no timestamp so it would be tricky matching up to the
 corresponding call

 Maybe you can try using the manager interface. The hangup event seems to
 mention the channel so perhaps this is the one which initiated the hangup
 http://www.voip-info.org/wiki/view/asterisk+manager+events#HangupEvent



-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] identify caller hangup or callee hangup?

2010-05-17 Thread Vardan
And the first hangup message is the hangup callee or caller
If you become first message Hangup in Incoming, that mean the hangup was 
make in Incoming context

If you become first message Hangup in Outgoing, that mean the hangup was 
make in Outgoing context

Vardan

P.S.

[default] // In example this is Incoming
exten = vardan,1,Dial(Local/${ext...@vardan/n)
exten = h,1,Noop(Hangup in Demo Vardan)


context vardan {  // In exmaple this is Outgoing

 _. = {
 Dial(SIP/2...@192.168.1.200);
 };
 h = {
 Noop(Hangup in Vardan);
 };
};




I have make this example on my test server and it works.
 -- Executing [var...@default:1] Dial(SIP/66.54.140.46-b6308b38, 
Local/var...@vardan/n) in new stack
 -- Executing [var...@vardan:1] Dial(Local/var...@vardan-a461,2, 
SIP/2...@192.168.1.200) in new stack
 -- Called var...@vardan/n
 -- Called 2...@192.168.1.200
 -- SIP/192.168.1.200-08244400 answered Local/var...@vardan-a461,2
 -- Local/var...@vardan-a461,1 answered SIP/66.54.140.46-b6308b38
astdebian*CLI
astdebian*CLI
astdebian*CLI
astdebian*CLI
 -- Executing [...@vardan:1] NoOp(Local/var...@vardan-a461,2, 
Hangup in Vardan) in new stack
   == Spawn extension (vardan, vardan, 1) exited non-zero on 
'Local/var...@vardan-a461,2'
 -- Executing [...@default:1] NoOp(SIP/66.54.140.46-b6308b38, 
Hangup in Demo Vardan) in new stack
   == Spawn extension (default, vardan, 1) exited non-zero on 
'SIP/66.54.140.46-b6308b38'
 -- Executing [var...@default:1] Dial(SIP/66.54.140.46-b6307510, 
Local/var...@vardan/n) in new stack
 -- Executing [var...@vardan:1] Dial(Local/var...@vardan-fe85,2, 
SIP/2...@192.168.1.200) in new stack
 -- Called var...@vardan/n
 -- Called 2...@192.168.1.200
 -- SIP/192.168.1.200-08244400 answered Local/var...@vardan-fe85,2
 -- Local/var...@vardan-fe85,1 answered SIP/66.54.140.46-b6307510
astdebian*CLI
astdebian*CLI
astdebian*CLI
astdebian*CLI
 -- Executing [...@default:1] NoOp(SIP/66.54.140.46-b6307510, 
Hangup in Demo Vardan) in new stack
 -- Executing [...@vardan:1] NoOp(Local/var...@vardan-fe85,2, 
Hangup in Vardan) in new stack
   == Spawn extension (default, vardan, 1) exited non-zero on 
'SIP/66.54.140.46-b6307510'
   == Spawn extension (vardan, vardan, 1) exited non-zero on 
'Local/var...@vardan-fe85,2'



Vardan wrote:
 I think You can do this if you use local channel.
 For example, you do two context
 AEL example

 context   Incoming {
   _X. =  {
   ..
   Dial(Local/${ext...@outgoing/n);
   };
   h =  {
   Noop(Hangup in Incoming);
   }
 };

 context Outgoing {
   _X. =  {
   ..
   Dial(SIP/d...@dd);
   };
   h =  {
   Noop(Hangup in Outgoing);
   };
 };

 I think this is must work. I have like so, but use with callout files.

 Vardan

 Gareth Blades wrote:
 Klaus Darilion wrote:

 Am 17.05.2010 10:46, schrieb Zhang Shukun:
 Hello,

 you know , when a call setup, either caller hangup first or callee
 hangup first , the hangupcause will set to 16(means Call Clearing
 Causes)

 My question is how could i identify whether the caller or callee
 hangup the phone first?

 AFAIK you can not.

 The only way I can think of doing it is that if one end involves the use
 of ISDN then in the console logs you do get messages like
 -- Channel 0/11, span 1 got hangup request, cause 16
 but there is no timestamp so it would be tricky matching up to the
 corresponding call

 Maybe you can try using the manager interface. The hangup event seems to
 mention the channel so perhaps this is the one which initiated the hangup
 http://www.voip-info.org/wiki/view/asterisk+manager+events#HangupEvent





-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] identify caller hangup or callee hangup?

2010-05-17 Thread Olivier
Have you looked at Dial's g option ?
*g*: When the called party hangs up, exit to execute more commands in the
current context.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] identify caller hangup or callee hangup?

2010-05-17 Thread Vardan
Yes, I know about this option, You can you this also, but, how you want 
to see what leg was hangup the channel?

Olivier wrote:
 Have you looked at Dial's g option ?
 *g*: When the called party hangs up, exit to execute more commands in
 the current context.


-- 
Vardan Harutyunyan,
Senior System Administrator

Enterprise Incubator Foundation
123 Hovsep Emin Street,
Yerevan 0051, Republic of Armenia
Tel: + 374 10 219735
Fax: + 374 10 219777
E-mail: i...@eif.am
www.eif-it.com


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] identify caller hangup or callee hangup?

2010-05-17 Thread Aurimas Skirgaila
so you can go for it.
the basic idea:

Dian(***,***,g)
Noop(Called party hung up first)
Hangup



On Mon, May 17, 2010 at 1:23 PM, Vardan hvarda...@gmail.com wrote:

 Yes, I know about this option, You can you this also, but, how you want
 to see what leg was hangup the channel?

 Olivier wrote:
  Have you looked at Dial's g option ?
  *g*: When the called party hangs up, exit to execute more commands in
  the current context.
 

 --
 Vardan Harutyunyan,
 Senior System Administrator

 Enterprise Incubator Foundation
 123 Hovsep Emin Street,
 Yerevan 0051, Republic of Armenia
 Tel: + 374 10 219735
 Fax: + 374 10 219777
 E-mail: i...@eif.am
 www.eif-it.com


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




-- 
Mvh,
Aurimas Skirgaila
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] identify caller hangup or callee hangup?

2010-05-17 Thread Vardan
And how you want check the both leg?
Look, you have to channel.
Incoming and Outgoing.

You want to see, who first do hangup.
How you want do this with g?


-- 
Vardan Harutyunyan,
Senior System Administrator

Enterprise Incubator Foundation
123 Hovsep Emin Street,
Yerevan 0051, Republic of Armenia
Tel: + 374 10 219735
Fax: + 374 10 219777
E-mail: i...@eif.am
www.eif-it.com

Aurimas Skirgaila wrote:
 so you can go for it.
 the basic idea:

 Dian(***,***,g)
 Noop(Called party hung up first)
 Hangup



 On Mon, May 17, 2010 at 1:23 PM, Vardan hvarda...@gmail.com
 mailto:hvarda...@gmail.com wrote:

 Yes, I know about this option, You can you this also, but, how you want
 to see what leg was hangup the channel?

 Olivier wrote:
   Have you looked at Dial's g option ?
   *g*: When the called party hangs up, exit to execute more
 commands in
   the current context.
  

 --
 Vardan Harutyunyan,
 Senior System Administrator

 Enterprise Incubator Foundation
 123 Hovsep Emin Street,
 Yerevan 0051, Republic of Armenia
 Tel: + 374 10 219735
 Fax: + 374 10 219777
 E-mail: i...@eif.am mailto:i...@eif.am
 www.eif-it.com http://www.eif-it.com


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
 http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
 http://lists.digium.com/mailman/listinfo/asterisk-users




 --
 Mvh,
 Aurimas Skirgaila



-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users