Re: [asterisk-users] DIALSTATUS vs HANGUPCAUSE

2018-03-15 Thread Patrick Wakano
That's really good info Tony!
Thanks very much for the response!
I will consider this to implement a better approach for the failed cases!

Cheers,
Patrick Wakano

On 14 March 2018 at 20:44, Tony Mountifield  wrote:

> In article  t...@mail.gmail.com>,
> Patrick Wakano  wrote:
> >
> > Thanks Dovid!
> > Indeed looks a bug but regardless of this, this problem made me think
> that
> > the HANGUPCAUSE could be used for this purpose with benefits.
> > I couldn't find an explanation about when DIALSTATUS would actually be
> > better.
> > The HANGUPCAUSE was reworked in version 11 (
> > https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause) but I didn't
> find
> > someone actually stating it is a better alternative or replacement to the
> > DIALSTATUS or something similar.
>
> I think you should always check DIALSTATUS, as that will be set regardless
> of
> the way in which a dial fails. I believe HANGUPCAUSE is set to the Q.931
> code
> received from PRI or SIP when a call is rejected or terminated. However,
> there
> could be other mechanisms for failure (such as failure to create a channel
> within Asterisk, or an attempt to send to an unreachable peer), that may
> set
> DIALSTATUS without setting HANGUPCAUSE.
>
> So HANGUPCAUSE should be considered as extra detail, rather than a
> replacement
> or alternative to DIALSTATUS.
>
> Cheers
> Tony
> --
> Tony Mountifield
> Work: t...@softins.co.uk - http://www.softins.co.uk
> Play: t...@mountifield.org - http://tony.mountifield.org
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] DIALSTATUS vs HANGUPCAUSE

2018-03-14 Thread Tony Mountifield
In article ,
Patrick Wakano  wrote:
> 
> Thanks Dovid!
> Indeed looks a bug but regardless of this, this problem made me think that
> the HANGUPCAUSE could be used for this purpose with benefits.
> I couldn't find an explanation about when DIALSTATUS would actually be
> better.
> The HANGUPCAUSE was reworked in version 11 (
> https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause) but I didn't find
> someone actually stating it is a better alternative or replacement to the
> DIALSTATUS or something similar.

I think you should always check DIALSTATUS, as that will be set regardless of
the way in which a dial fails. I believe HANGUPCAUSE is set to the Q.931 code
received from PRI or SIP when a call is rejected or terminated. However, there
could be other mechanisms for failure (such as failure to create a channel
within Asterisk, or an attempt to send to an unreachable peer), that may set
DIALSTATUS without setting HANGUPCAUSE.

So HANGUPCAUSE should be considered as extra detail, rather than a replacement
or alternative to DIALSTATUS.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] DIALSTATUS vs HANGUPCAUSE

2018-03-13 Thread Patrick Wakano
Thanks Dovid!
Indeed looks a bug but regardless of this, this problem made me think that
the HANGUPCAUSE could be used for this purpose with benefits.
I couldn't find an explanation about when DIALSTATUS would actually be
better.
The HANGUPCAUSE was reworked in version 11 (
https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause) but I didn't find
someone actually stating it is a better alternative or replacement to the
DIALSTATUS or something similar.

Cheers,
Patrick Wakano


On 14 March 2018 at 13:30, Dovid Bender  wrote:

> I would think that is a bug since the only time DIALSTATUS = BUSY is where
> you got a 486 or 600 (as per https://wiki.asterisk.org/
> wiki/display/AST/Hangup+Cause+Mappings).
>
> On Tue, Mar 13, 2018 at 10:11 PM, Patrick Wakano 
> wrote:
>
>> Hello list,
>> Hope all doing well!
>>
>> I've been checking some cases when a Dial fails and dialplan execution
>> continues to handle this. I am finding it a little confusing how we should
>> handle the DIALSTATUS and the HANGUPCAUSE in this situation
>> More specifically, I am facing a case in version 13.6.0 where I am
>> getting a DIALSTATUS=BUSY and HANGUPCAUSE=19 after receiving a 480 SIP
>> error. Seems wrong to me, since 480 should be converted to HANGUPCAUSE=19
>> and DIALSTATUS = NOANSWER (https://wiki.asterisk.org/wik
>> i/display/AST/Hangup+Cause+Mappings). Anyway I am thinking about
>> actually not checking the DIALSTATUS anymore and just rely on the
>> HANGUPCAUSE, which seems more powerful.
>> Looks like for a pure SIP environment the HANGUPCAUSE would have a more
>> accurate information about the error. So question is can I always use this
>> info and completely ignore what the DIALSTATUS is?
>> Or does someone knows exactly where is more suitable to use one over the
>> other?
>>
>> Thanks,
>> Kind regards,
>> Patrick Wakano
>>
>> --
>> _
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> Check out the new Asterisk community forum at:
>> https://community.asterisk.org/
>>
>> New to Asterisk? Start here:
>>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] DIALSTATUS vs HANGUPCAUSE

2018-03-13 Thread Dovid Bender
I would think that is a bug since the only time DIALSTATUS = BUSY is where
you got a 486 or 600 (as per
https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause+Mappings).

On Tue, Mar 13, 2018 at 10:11 PM, Patrick Wakano  wrote:

> Hello list,
> Hope all doing well!
>
> I've been checking some cases when a Dial fails and dialplan execution
> continues to handle this. I am finding it a little confusing how we should
> handle the DIALSTATUS and the HANGUPCAUSE in this situation
> More specifically, I am facing a case in version 13.6.0 where I am getting
> a DIALSTATUS=BUSY and HANGUPCAUSE=19 after receiving a 480 SIP error. Seems
> wrong to me, since 480 should be converted to HANGUPCAUSE=19 and DIALSTATUS
> = NOANSWER (https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause+
> Mappings). Anyway I am thinking about actually not checking the
> DIALSTATUS anymore and just rely on the HANGUPCAUSE, which seems more
> powerful.
> Looks like for a pure SIP environment the HANGUPCAUSE would have a more
> accurate information about the error. So question is can I always use this
> info and completely ignore what the DIALSTATUS is?
> Or does someone knows exactly where is more suitable to use one over the
> other?
>
> Thanks,
> Kind regards,
> Patrick Wakano
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

[asterisk-users] DIALSTATUS vs HANGUPCAUSE

2018-03-13 Thread Patrick Wakano
Hello list,
Hope all doing well!

I've been checking some cases when a Dial fails and dialplan execution
continues to handle this. I am finding it a little confusing how we should
handle the DIALSTATUS and the HANGUPCAUSE in this situation
More specifically, I am facing a case in version 13.6.0 where I am getting
a DIALSTATUS=BUSY and HANGUPCAUSE=19 after receiving a 480 SIP error. Seems
wrong to me, since 480 should be converted to HANGUPCAUSE=19 and DIALSTATUS
= NOANSWER (https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause+Mappings).
Anyway I am thinking about actually not checking the DIALSTATUS anymore and
just rely on the HANGUPCAUSE, which seems more powerful.
Looks like for a pure SIP environment the HANGUPCAUSE would have a more
accurate information about the error. So question is can I always use this
info and completely ignore what the DIALSTATUS is?
Or does someone knows exactly where is more suitable to use one over the
other?

Thanks,
Kind regards,
Patrick Wakano
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] DIALSTATUS not being set

2015-12-22 Thread Matthew Jordan
On Tue, Dec 22, 2015 at 7:26 AM, Marcos Prates 
wrote:

> Hi,
>
> I'm having a strange problem with Asterisk 13 i can't seem to find out
> whats causing it.
> After a Dial call from one SIP peer to another, if the calling side hangs
> up, DIALSTATUS is not set, but when the called side hangs up, it does.
> The strangest thing is when debugging SIP, it sends/receives the BYE
> signal normaly on both situations.
> I'm using DIALSTATUS on my accounting/billing scripts, so when this
> happens it break the routine.
>
> Can anyone shed some light into this for me? i'm running out of ideas here.
>
> Thanks.
>
> Marcos O.
>
>
Works for me. Given the following dialplan, which has a hardcoded Dial to
PJSIP endpoint 'alice':

exten => _,1,NoOp()
 same => n,Dial(PJSIP/alice,15)
 same => n,Hangup()

exten => h,1,NoOp()
 same => n,Log(NOTICE, ${DIALSTATUS})


Calling party (bob) hangs up first:

   -- Executing [1000@default:1] NoOp("PJSIP/bob-0001", "") in new stack
-- Executing [1000@default:2] Dial("PJSIP/bob-0001",
"PJSIP/alice,15") in new stack
-- Called PJSIP/alice
-- PJSIP/alice-0002 is ringing
-- PJSIP/alice-0002 answered PJSIP/bob-0001
-- Channel PJSIP/alice-0002 joined 'simple_bridge' basic-bridge
<593321e8-d105-4075-94f3-20480cae3c45>
-- Channel PJSIP/bob-0001 joined 'simple_bridge' basic-bridge
<593321e8-d105-4075-94f3-20480cae3c45>
-- Channel PJSIP/bob-0001 left 'native_rtp' basic-bridge
<593321e8-d105-4075-94f3-20480cae3c45>
  == Spawn extension (default, 1000, 2) exited non-zero on
'PJSIP/bob-0001'
-- Channel PJSIP/alice-0002 left 'native_rtp' basic-bridge
<593321e8-d105-4075-94f3-20480cae3c45>
-- Executing [h@default:1] NoOp("PJSIP/bob-0001", "") in new stack
-- Executing [h@default:2] Log("PJSIP/bob-0001", "NOTICE, ANSWER")
in new stack
[Dec 22 16:32:47] NOTICE[9668][C-0001]: Ext. h:2 @ default:  ANSWER

Called party (alice) hangs up first:

*CLI> -- Executing [1000@default:1] NoOp("PJSIP/bob-", "") in
new stack
-- Executing [1000@default:2] Dial("PJSIP/bob-",
"PJSIP/alice,15") in new stack
-- Called PJSIP/alice
-- PJSIP/alice-0001 is ringing
-- PJSIP/alice-0001 answered PJSIP/bob-
-- Channel PJSIP/alice-0001 joined 'simple_bridge' basic-bridge
<0be9ceeb-014b-477c-b993-a4600ad7f9b0>
-- Channel PJSIP/bob- joined 'simple_bridge' basic-bridge
<0be9ceeb-014b-477c-b993-a4600ad7f9b0>
-- Channel PJSIP/alice-0001 left 'native_rtp' basic-bridge
<0be9ceeb-014b-477c-b993-a4600ad7f9b0>
-- Channel PJSIP/bob- left 'native_rtp' basic-bridge
<0be9ceeb-014b-477c-b993-a4600ad7f9b0>
  == Spawn extension (default, 1000, 2) exited non-zero on
'PJSIP/bob-'
-- Executing [h@default:1] NoOp("PJSIP/bob-", "") in new stack
-- Executing [h@default:2] Log("PJSIP/bob-", "NOTICE, ANSWER")
in new stack
[Dec 22 16:34:17] NOTICE[9740][C-]: Ext. h:2 @ default:  ANSWER


-- 
Matthew Jordan
Digium, Inc. | Director of Technology
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
-- 
_
-- 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

[asterisk-users] DIALSTATUS not being set

2015-12-22 Thread Marcos Prates
Hi, 

I'm having a strange problem with Asterisk 13 i can't seem to find out whats 
causing it. 
After a Dial call from one SIP peer to another, if the calling side hangs up, 
DIALSTATUS is not set, but when the called side hangs up, it does. 
The strangest thing is when debugging SIP, it sends/receives the BYE signal 
normaly on both situations. 
I'm using DIALSTATUS on my accounting/billing scripts, so when this happens it 
break the routine. 

Can anyone shed some light into this for me? i'm running out of ideas here. 

Thanks. 

Marcos O. 
-- 
_
-- 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] DIALSTATUS Values

2012-01-04 Thread Zohair Raza
This works fine for me,

$dialstatus = $agi->get_variable("DIALSTATUS");
$cdr['dialstatus'] = $dialstatus['data'];

Try as it is, I believe it's because of concatenation.

Regards,
Zohair Raza




On Fri, Dec 2, 2011 at 4:27 PM, Tony Mountifield  wrote:

> In article ,
> Kamlesh Kumar  wrote:
> > In addition to my reply:
> >
> > I used to fetch the value using print_r function but that also tells
> that there is no value
> > in data section.
> > $dialstatus=$agi->get_variable(DIALSTATUS);
> > print_r($dialstatus);
> >
> > AGI Rx << GET VARIABLE DIALSTATUS
> > AGI Tx >> 200 result=1 (CANCEL)
> > AGI Rx << Array
> > AGI Tx >> 510 Invalid or unknown command
> > [Dec  3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write()
> returned error: Broken pipe
> > AGI Rx << (
> > AGI Tx >> 510 Invalid or unknown command
> > [Dec  3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write()
> returned error: Broken pipe
> > AGI Rx << [code] => 200
> > AGI Tx >> 510 Invalid or unknown command
> > [Dec  3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write()
> returned error: Broken pipe
> > AGI Rx << [result] => 1
> > AGI Tx >> 510 Invalid or unknown command
> > [Dec  3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write()
> returned error: Broken pipe
> > AGI Rx << [data] =>
>
> Well since the AGI return string does indeed contain the value, shown
> above as (CANCEL), that suggests there is definitely a bug in php-agi.
> It appears to be creating a ['data'] element, but not setting it.
> You will have to study the source code and work out how to fix it.
> I did a quick google for "php agi get variable" and found other reports
> of it not working properly, but I didn't see anyone offer a solution.
> It's only programming, so it shouldn't be hard to fix.
>
> Cheers
> Tony
> --
> Tony Mountifield
> Work: t...@softins.co.uk - http://www.softins.co.uk
> Play: t...@mountifield.org - http://tony.mountifield.org
>
> --
> _
> -- 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
>
--
_
-- 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] DIALSTATUS Values

2012-01-04 Thread Kamlesh Kumar

Can anybody please reply on this?
 
Regards,
Kamlesh
 



From: kamlesh_...@hotmail.com
To: asterisk-users@lists.digium.com
Date: Tue, 27 Dec 2011 09:49:21 +
Subject: Re: [asterisk-users] DIALSTATUS Values





Hello,
 
After investing some time, I could come to know the reason for not getting the 
data value is that if I use system command with any of asterisk cli command as 
given below, data value is returned blank.
 
$output=system("/usr/sbin/asterisk -rx 'sip show peers' | grep OK | cut -f 1 -d 
/ | grep '100' ")
 
Could you please suggest now how to rectify this?
 
Regards,
Kamlesh
 


> To: asterisk-users@lists.digium.com
> From: t...@softins.co.uk
> Date: Fri, 2 Dec 2011 12:27:19 +
> Subject: Re: [asterisk-users] DIALSTATUS Values
> 
> In article ,
> Kamlesh Kumar  wrote:
> > In addition to my reply:
> > 
> > I used to fetch the value using print_r function but that also tells that 
> > there is no value
> > in data section.
> > $dialstatus=$agi->get_variable(DIALSTATUS);
> > print_r($dialstatus);
> > 
> > AGI Rx << GET VARIABLE DIALSTATUS
> > AGI Tx >> 200 result=1 (CANCEL)
> > AGI Rx << Array
> > AGI Tx >> 510 Invalid or unknown command
> > [Dec 3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() 
> > returned error: Broken pipe
> > AGI Rx << (
> > AGI Tx >> 510 Invalid or unknown command
> > [Dec 3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() 
> > returned error: Broken pipe
> > AGI Rx << [code] => 200
> > AGI Tx >> 510 Invalid or unknown command
> > [Dec 3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() 
> > returned error: Broken pipe
> > AGI Rx << [result] => 1
> > AGI Tx >> 510 Invalid or unknown command
> > [Dec 3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() 
> > returned error: Broken pipe
> > AGI Rx << [data] =>
> 
> Well since the AGI return string does indeed contain the value, shown
> above as (CANCEL), that suggests there is definitely a bug in php-agi.
> It appears to be creating a ['data'] element, but not setting it.
> You will have to study the source code and work out how to fix it.
> I did a quick google for "php agi get variable" and found other reports
> of it not working properly, but I didn't see anyone offer a solution.
> It's only programming, so it shouldn't be hard to fix.
> 
> Cheers
> Tony
> -- 
> Tony Mountifield
> Work: t...@softins.co.uk - http://www.softins.co.uk
> Play: t...@mountifield.org - http://tony.mountifield.org
> 
> --
> _
> -- 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

-- _ -- 
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   
 --
_
-- 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] DIALSTATUS Values

2011-12-27 Thread Kamlesh Kumar

Hello,
 
After investing some time, I could come to know the reason for not getting the 
data value is that if I use system command with any of asterisk cli command as 
given below, data value is returned blank.
 
$output=system("/usr/sbin/asterisk -rx 'sip show peers' | grep OK | cut -f 1 -d 
/ | grep '100' ")
 
Could you please suggest now how to rectify this?
 
Regards,
Kamlesh
 

> To: asterisk-users@lists.digium.com
> From: t...@softins.co.uk
> Date: Fri, 2 Dec 2011 12:27:19 +
> Subject: Re: [asterisk-users] DIALSTATUS Values
> 
> In article ,
> Kamlesh Kumar  wrote:
> > In addition to my reply:
> > 
> > I used to fetch the value using print_r function but that also tells that 
> > there is no value
> > in data section.
> > $dialstatus=$agi->get_variable(DIALSTATUS);
> > print_r($dialstatus);
> > 
> > AGI Rx << GET VARIABLE DIALSTATUS
> > AGI Tx >> 200 result=1 (CANCEL)
> > AGI Rx << Array
> > AGI Tx >> 510 Invalid or unknown command
> > [Dec 3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() 
> > returned error: Broken pipe
> > AGI Rx << (
> > AGI Tx >> 510 Invalid or unknown command
> > [Dec 3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() 
> > returned error: Broken pipe
> > AGI Rx << [code] => 200
> > AGI Tx >> 510 Invalid or unknown command
> > [Dec 3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() 
> > returned error: Broken pipe
> > AGI Rx << [result] => 1
> > AGI Tx >> 510 Invalid or unknown command
> > [Dec 3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() 
> > returned error: Broken pipe
> > AGI Rx << [data] =>
> 
> Well since the AGI return string does indeed contain the value, shown
> above as (CANCEL), that suggests there is definitely a bug in php-agi.
> It appears to be creating a ['data'] element, but not setting it.
> You will have to study the source code and work out how to fix it.
> I did a quick google for "php agi get variable" and found other reports
> of it not working properly, but I didn't see anyone offer a solution.
> It's only programming, so it shouldn't be hard to fix.
> 
> Cheers
> Tony
> -- 
> Tony Mountifield
> Work: t...@softins.co.uk - http://www.softins.co.uk
> Play: t...@mountifield.org - http://tony.mountifield.org
> 
> --
> _
> -- 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
  --
_
-- 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] DIALSTATUS Values

2011-12-02 Thread Tony Mountifield
In article ,
Kamlesh Kumar  wrote:
> In addition to my reply:
>  
> I used to fetch the value using print_r function but that also tells that 
> there is no value
> in data section.
> $dialstatus=$agi->get_variable(DIALSTATUS);
> print_r($dialstatus);
>  
> AGI Rx << GET VARIABLE DIALSTATUS
> AGI Tx >> 200 result=1 (CANCEL)
> AGI Rx << Array
> AGI Tx >> 510 Invalid or unknown command
> [Dec  3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() 
> returned error: Broken pipe
> AGI Rx << (
> AGI Tx >> 510 Invalid or unknown command
> [Dec  3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() 
> returned error: Broken pipe
> AGI Rx << [code] => 200
> AGI Tx >> 510 Invalid or unknown command
> [Dec  3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() 
> returned error: Broken pipe
> AGI Rx << [result] => 1
> AGI Tx >> 510 Invalid or unknown command
> [Dec  3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() 
> returned error: Broken pipe
> AGI Rx << [data] =>

Well since the AGI return string does indeed contain the value, shown
above as (CANCEL), that suggests there is definitely a bug in php-agi.
It appears to be creating a ['data'] element, but not setting it.
You will have to study the source code and work out how to fix it.
I did a quick google for "php agi get variable" and found other reports
of it not working properly, but I didn't see anyone offer a solution.
It's only programming, so it shouldn't be hard to fix.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

--
_
-- 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] DIALSTATUS Values

2011-12-02 Thread Kamlesh Kumar

In addition to my reply:
 
I used to fetch the value using print_r function but that also tells that there 
is no value in data section.
$dialstatus=$agi->get_variable(DIALSTATUS);
print_r($dialstatus);
 
AGI Rx << GET VARIABLE DIALSTATUS
AGI Tx >> 200 result=1 (CANCEL)
AGI Rx << Array
AGI Tx >> 510 Invalid or unknown command
[Dec  3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() returned 
error: Broken pipe
AGI Rx << (
AGI Tx >> 510 Invalid or unknown command
[Dec  3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() returned 
error: Broken pipe
AGI Rx << [code] => 200
AGI Tx >> 510 Invalid or unknown command
[Dec  3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() returned 
error: Broken pipe
AGI Rx << [result] => 1
AGI Tx >> 510 Invalid or unknown command
[Dec  3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() returned 
error: Broken pipe
AGI Rx << [data] =>

Regards,
Kamlesh

 



From: kamlesh_...@hotmail.com
To: asterisk-users@lists.digium.com
Subject: RE: [asterisk-users] DIALSTATUS Values
Date: Fri, 2 Dec 2011 11:58:26 +





I believe the syntax is correct because,
 
If I use 
$dd=$dialstatus["code"];
> > $agi->verbose("Status".$dd);

it gives me: 
AGI Rx << GET VARIABLE DIALSTATUS
AGI Tx >> 200 result=1 (ANSWER)
AGI Rx << VERBOSE "Status200" 1
 
If I use
$dd=$dialstatus["result"];
> > $agi->verbose("Status".$dd);

it gives me:
 
AGI Rx << GET VARIABLE DIALSTATUS
AGI Tx >> 200 result=1 (CANCEL)
AGI Rx << VERBOSE "Status1" 1
 
but if I use
$dd=$dialstatus["data"];
> > $agi->verbose("Status".$dd);

AGI Rx << GET VARIABLE DIALSTATUS
AGI Tx >> 200 result=1 (CANCEL)
AGI Rx << VERBOSE "Status" 1

Regards,
Kamlesh
 
 
 

> To: asterisk-users@lists.digium.com
> From: t...@softins.co.uk
> Date: Fri, 2 Dec 2011 11:44:34 +
> Subject: Re: [asterisk-users] DIALSTATUS Values
> 
> In article ,
> Kamlesh Kumar  wrote:
> > I tried to search the answer of my problem but unable to get resolution so 
> > sending to you
> > guys. I'm using asterisk 1.6.2.7 and writing the AGI scripts using PHP. I'm 
> > unable to
> > retrieve the DIALSTATUS value, during execution of AGI script, I get empty 
> > value.
> > 
> > Extracts from AGI Script:
> > 
> > #!/usr/bin/php -q
> > #!/bin/bash
> >  > include_once ("phpagi-2.14/phpagi.php");
> > $agi = new AGI();
> > 
> > some codes for dial out
> > 
> > $dialstatus=$agi->get_variable(DIALSTATUS);
> 
> Shouldn't that be: $dialstatus=$agi->get_variable("DIALSTATUS");
> 
> Having DIALSTATUS as a bare word might work in some versions of php,
> but is likely to produce a warning. Although in your case, it does
> appear to have worked.
> 
> > $dd=$dialstatus["data"];
> > $agi->verbose("Status".$dd);
> > 
> > In AGI debug, I get: 
> > AGI Tx >> agi_channel: SIP/10036-0096
> > AGI Tx >> agi_language: en
> > AGI Tx >> agi_type: SIP
> > AGI Tx >> agi_uniqueid: 1322848927.172
> > AGI Tx >> agi_version: 1.6.2.7
> > AGI Tx >> agi_callerid: 10036
> > AGI Tx >> agi_calleridname: 10036
> > AGI Tx >> agi_dnid: 0012127773456
> > AGI Tx >> agi_rdnis: unknown
> > AGI Tx >> agi_context: privoip
> > AGI Tx >> agi_extension: 0012127773456
> > AGI Rx << GET VARIABLE DIALSTATUS
> > AGI Tx >> 200 result=1 (ANSWER)
> 
> This shows that AGI is indeed returning the value of DIALSTATUS,
> which is ANSWER.
> 
> > AGI Rx << VERBOSE "Status" 1
> 
> But you are not picking it up.
> 
> > AGI Tx >> 200 result=1
> > 
> > Please help me in this.
> 
> I'm not familiar with php-agi (I usualy write my AGI in C), but it
> looks like $dialstatus["data"] is not the correct way to retrieve
> the returned value. Or else there is a bug in php-agi.
> 
> Cheers
> Tony
> -- 
> Tony Mountifield
> Work: t...@softins.co.uk - http://www.softins.co.uk
> Play: t...@mountifield.org - http://tony.mountifield.org
> 
> --
> _
> -- 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
  --
_
-- 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] DIALSTATUS Values

2011-12-02 Thread Kamlesh Kumar

I believe the syntax is correct because,
 
If I use 
$dd=$dialstatus["code"];
> > $agi->verbose("Status".$dd);

it gives me: 
AGI Rx << GET VARIABLE DIALSTATUS
AGI Tx >> 200 result=1 (ANSWER)
AGI Rx << VERBOSE "Status200" 1
 
If I use
$dd=$dialstatus["result"];
> > $agi->verbose("Status".$dd);

it gives me:
 
AGI Rx << GET VARIABLE DIALSTATUS
AGI Tx >> 200 result=1 (CANCEL)
AGI Rx << VERBOSE "Status1" 1
 
but if I use
$dd=$dialstatus["data"];
> > $agi->verbose("Status".$dd);

AGI Rx << GET VARIABLE DIALSTATUS
AGI Tx >> 200 result=1 (CANCEL)
AGI Rx << VERBOSE "Status" 1

Regards,
Kamlesh
 
 
 

> To: asterisk-users@lists.digium.com
> From: t...@softins.co.uk
> Date: Fri, 2 Dec 2011 11:44:34 +
> Subject: Re: [asterisk-users] DIALSTATUS Values
> 
> In article ,
> Kamlesh Kumar  wrote:
> > I tried to search the answer of my problem but unable to get resolution so 
> > sending to you
> > guys. I'm using asterisk 1.6.2.7 and writing the AGI scripts using PHP. I'm 
> > unable to
> > retrieve the DIALSTATUS value, during execution of AGI script, I get empty 
> > value.
> > 
> > Extracts from AGI Script:
> > 
> > #!/usr/bin/php -q
> > #!/bin/bash
> >  > include_once ("phpagi-2.14/phpagi.php");
> > $agi = new AGI();
> > 
> > some codes for dial out
> > 
> > $dialstatus=$agi->get_variable(DIALSTATUS);
> 
> Shouldn't that be: $dialstatus=$agi->get_variable("DIALSTATUS");
> 
> Having DIALSTATUS as a bare word might work in some versions of php,
> but is likely to produce a warning. Although in your case, it does
> appear to have worked.
> 
> > $dd=$dialstatus["data"];
> > $agi->verbose("Status".$dd);
> > 
> > In AGI debug, I get: 
> > AGI Tx >> agi_channel: SIP/10036-0096
> > AGI Tx >> agi_language: en
> > AGI Tx >> agi_type: SIP
> > AGI Tx >> agi_uniqueid: 1322848927.172
> > AGI Tx >> agi_version: 1.6.2.7
> > AGI Tx >> agi_callerid: 10036
> > AGI Tx >> agi_calleridname: 10036
> > AGI Tx >> agi_dnid: 0012127773456
> > AGI Tx >> agi_rdnis: unknown
> > AGI Tx >> agi_context: privoip
> > AGI Tx >> agi_extension: 0012127773456
> > AGI Rx << GET VARIABLE DIALSTATUS
> > AGI Tx >> 200 result=1 (ANSWER)
> 
> This shows that AGI is indeed returning the value of DIALSTATUS,
> which is ANSWER.
> 
> > AGI Rx << VERBOSE "Status" 1
> 
> But you are not picking it up.
> 
> > AGI Tx >> 200 result=1
> > 
> > Please help me in this.
> 
> I'm not familiar with php-agi (I usualy write my AGI in C), but it
> looks like $dialstatus["data"] is not the correct way to retrieve
> the returned value. Or else there is a bug in php-agi.
> 
> Cheers
> Tony
> -- 
> Tony Mountifield
> Work: t...@softins.co.uk - http://www.softins.co.uk
> Play: t...@mountifield.org - http://tony.mountifield.org
> 
> --
> _
> -- 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
  --
_
-- 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] DIALSTATUS Values

2011-12-02 Thread Tony Mountifield
In article ,
Kamlesh Kumar  wrote:
> I tried to search the answer of my problem but unable to get resolution so 
> sending to you
> guys. I'm using asterisk 1.6.2.7 and writing the AGI scripts using PHP. I'm 
> unable to
> retrieve the DIALSTATUS value, during execution of AGI script, I get empty 
> value.
>  
> Extracts from AGI Script:
>  
> #!/usr/bin/php -q
> #!/bin/bash
>  include_once ("phpagi-2.14/phpagi.php");
> $agi = new AGI();
> 
> some codes for dial out
>  
>$dialstatus=$agi->get_variable(DIALSTATUS);

Shouldn't that be: $dialstatus=$agi->get_variable("DIALSTATUS");

Having DIALSTATUS as a bare word might work in some versions of php,
but is likely to produce a warning. Although in your case, it does
appear to have worked.

>$dd=$dialstatus["data"];
>$agi->verbose("Status".$dd);
>  
> In AGI debug, I get: 
> AGI Tx >> agi_channel: SIP/10036-0096
> AGI Tx >> agi_language: en
> AGI Tx >> agi_type: SIP
> AGI Tx >> agi_uniqueid: 1322848927.172
> AGI Tx >> agi_version: 1.6.2.7
> AGI Tx >> agi_callerid: 10036
> AGI Tx >> agi_calleridname: 10036
> AGI Tx >> agi_dnid: 0012127773456
> AGI Tx >> agi_rdnis: unknown
> AGI Tx >> agi_context: privoip
> AGI Tx >> agi_extension: 0012127773456
> AGI Rx << GET VARIABLE DIALSTATUS
> AGI Tx >> 200 result=1 (ANSWER)

This shows that AGI is indeed returning the value of DIALSTATUS,
which is ANSWER.

> AGI Rx << VERBOSE "Status" 1

But you are not picking it up.

> AGI Tx >> 200 result=1
>  
> Please help me in this.

I'm not familiar with php-agi (I usualy write my AGI in C), but it
looks like $dialstatus["data"] is not the correct way to retrieve
the returned value. Or else there is a bug in php-agi.

Cheers
Tony
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

--
_
-- 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] DIALSTATUS Values

2011-12-02 Thread Kamlesh Kumar

Here it is:
 
AGI Tx >> agi_request: isdcall.php
AGI Tx >> agi_channel: SIP/10036-00a8
AGI Tx >> agi_language: en
AGI Tx >> agi_type: SIP
AGI Tx >> agi_uniqueid: 1322853473.198
AGI Tx >> agi_version: 1.6.2.7
AGI Tx >> agi_callerid: 10036
AGI Tx >> agi_calleridname: 10036
AGI Tx >> agi_callingpres: 0
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: 0012127773456
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: privoip
AGI Tx >> agi_extension: 0012127773456
AGI Tx >> agi_priority: 3
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode: 10036
AGI Tx >> agi_threadid: -1220478064
AGI Rx << VERBOSE "10036" 1
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "0012127773456" 1
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "10036" 1
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "Dialling" 1
AGI Tx >> 200 result=1
AGI Tx >> 200 result=1
AGI Rx << EXEC Dial SIP/202.89.78.21/12127773456
AGI Tx >> 200 result=-1
AGI Rx << GET VARIABLE DIALSTATUS
AGI Tx >> 200 result=1 (ANSWER)
AGI Rx << VERBOSE "Status" 1
AGI Tx >> 200 result=1
 
Regards,
Kamlesh
 
 



Date: Fri, 2 Dec 2011 16:26:50 +0500
From: govoi...@gmail.com
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] DIALSTATUS Values

Can you also paste the Asterisk Console logs around the part where AGI is 
dialing and after the dialing part ! make sure AGi debug is enabled as well.



On Fri, Dec 2, 2011 at 4:24 PM, Kamlesh Kumar  wrote:



Hello,
 
in /etc/extension.conf
 
[privoip]
exten => _00X.,n,AGI(isdcall.php)

Regards,
Kamlesh
 



Date: Fri, 2 Dec 2011 16:16:27 +0500
From: govoi...@gmail.com
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] DIALSTATUS Values



Hi, 
How are you calling this AGI in your dialplan !!? 


Regards,
Sammy.


On Fri, Dec 2, 2011 at 3:18 PM, Kamlesh Kumar  wrote:



Hello,
 
I tried to search the answer of my problem but unable to get resolution so 
sending to you guys. I'm using asterisk 1.6.2.7 and writing the AGI scripts 
using PHP. I'm unable to retrieve the DIALSTATUS value, during execution of AGI 
script, I get empty value.
 
Extracts from AGI Script:
 
#!/usr/bin/php -q
#!/bin/bash
get_variable(DIALSTATUS);
   $dd=$dialstatus["data"];
   $agi->verbose("Status".$dd);
 
In AGI debug, I get: 
AGI Tx >> agi_channel: SIP/10036-0096
AGI Tx >> agi_language: en
AGI Tx >> agi_type: SIP
AGI Tx >> agi_uniqueid: 1322848927.172
AGI Tx >> agi_version: 1.6.2.7
AGI Tx >> agi_callerid: 10036
AGI Tx >> agi_calleridname: 10036
AGI Tx >> agi_dnid: 0012127773456
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: privoip
AGI Tx >> agi_extension: 0012127773456
AGI Rx << GET VARIABLE DIALSTATUS
AGI Tx >> 200 result=1 (ANSWER)
AGI Rx << VERBOSE "Status" 1
AGI Tx >> 200 result=1
 
Please help me in this.
 
Thanks,
Kamlesh
 
 



--
_
-- 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


-- _ -- 
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
--
_
-- 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


-- _ -- 
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   
 --
_
-- 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] DIALSTATUS Values

2011-12-02 Thread Sammy Govind
Can you also paste the Asterisk Console logs around the part where AGI is
dialing and after the dialing part ! make sure AGi debug is enabled as well.


On Fri, Dec 2, 2011 at 4:24 PM, Kamlesh Kumar wrote:

>  Hello,
>
> in /etc/extension.conf
>
> [privoip]
> exten => _00X.,n,AGI(isdcall.php)
>
> Regards,
> Kamlesh
>
>  --
> Date: Fri, 2 Dec 2011 16:16:27 +0500
> From: govoi...@gmail.com
> To: asterisk-users@lists.digium.com
> Subject: Re: [asterisk-users] DIALSTATUS Values
>
>
> Hi,
> How are you calling this AGI in your dialplan !!?
>
> Regards,
> Sammy.
>
> On Fri, Dec 2, 2011 at 3:18 PM, Kamlesh Kumar wrote:
>
>  Hello,
>
> I tried to search the answer of my problem but unable to get resolution so
> sending to you guys. I'm using asterisk 1.6.2.7 and writing the AGI scripts
> using PHP. I'm unable to retrieve the DIALSTATUS value, during execution of
> AGI script, I get empty value.
>
> Extracts from AGI Script:
>
> #!/usr/bin/php -q
> #!/bin/bash
>  include_once ("phpagi-2.14/phpagi.php");
> $agi = new AGI();
>
> some codes for dial out
>
>$dialstatus=$agi->get_variable(DIALSTATUS);
>$dd=$dialstatus["data"];
>$agi->verbose("Status".$dd);
>
> In AGI debug, I get:
> AGI Tx >> agi_channel: SIP/10036-0096
> AGI Tx >> agi_language: en
> AGI Tx >> agi_type: SIP
> AGI Tx >> agi_uniqueid: 1322848927.172
> AGI Tx >> agi_version: 1.6.2.7
> AGI Tx >> agi_callerid: 10036
> AGI Tx >> agi_calleridname: 10036
> AGI Tx >> agi_dnid: 0012127773456
> AGI Tx >> agi_rdnis: unknown
> AGI Tx >> agi_context: privoip
> AGI Tx >> agi_extension: 0012127773456
> *AGI Rx << GET VARIABLE DIALSTATUS
> AGI Tx >> 200 result=1 (ANSWER)
> AGI Rx << VERBOSE "Status" 1
> AGI Tx >> 200 result=1*
> **
> Please help me in this.
>
> Thanks,
> Kamlesh
> **
> *
>
>
> *
>
> --
> _
> -- 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
>
>
>
> -- _
> -- 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
>
> --
> _
> -- 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
>
--
_
-- 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] DIALSTATUS Values

2011-12-02 Thread Kamlesh Kumar

Hello,
 
in /etc/extension.conf
 
[privoip]
exten => _00X.,n,AGI(isdcall.php)

Regards,
Kamlesh
 



Date: Fri, 2 Dec 2011 16:16:27 +0500
From: govoi...@gmail.com
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] DIALSTATUS Values

Hi,
How are you calling this AGI in your dialplan !!? 


Regards,
Sammy.


On Fri, Dec 2, 2011 at 3:18 PM, Kamlesh Kumar  wrote:



Hello,
 
I tried to search the answer of my problem but unable to get resolution so 
sending to you guys. I'm using asterisk 1.6.2.7 and writing the AGI scripts 
using PHP. I'm unable to retrieve the DIALSTATUS value, during execution of AGI 
script, I get empty value.
 
Extracts from AGI Script:
 
#!/usr/bin/php -q
#!/bin/bash
get_variable(DIALSTATUS);
   $dd=$dialstatus["data"];
   $agi->verbose("Status".$dd);
 
In AGI debug, I get: 
AGI Tx >> agi_channel: SIP/10036-0096
AGI Tx >> agi_language: en
AGI Tx >> agi_type: SIP
AGI Tx >> agi_uniqueid: 1322848927.172
AGI Tx >> agi_version: 1.6.2.7
AGI Tx >> agi_callerid: 10036
AGI Tx >> agi_calleridname: 10036
AGI Tx >> agi_dnid: 0012127773456
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: privoip
AGI Tx >> agi_extension: 0012127773456
AGI Rx << GET VARIABLE DIALSTATUS
AGI Tx >> 200 result=1 (ANSWER)
AGI Rx << VERBOSE "Status" 1
AGI Tx >> 200 result=1
 
Please help me in this.
 
Thanks,
Kamlesh
 
 



--
_
-- 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


-- _ -- 
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   
 --
_
-- 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] DIALSTATUS Values

2011-12-02 Thread Sammy Govind
Hi,
How are you calling this AGI in your dialplan !!?

Regards,
Sammy.

On Fri, Dec 2, 2011 at 3:18 PM, Kamlesh Kumar wrote:

>  Hello,
>
> I tried to search the answer of my problem but unable to get resolution so
> sending to you guys. I'm using asterisk 1.6.2.7 and writing the AGI scripts
> using PHP. I'm unable to retrieve the DIALSTATUS value, during execution of
> AGI script, I get empty value.
>
> Extracts from AGI Script:
>
> #!/usr/bin/php -q
> #!/bin/bash
>  include_once ("phpagi-2.14/phpagi.php");
> $agi = new AGI();
>
> some codes for dial out
>
>$dialstatus=$agi->get_variable(DIALSTATUS);
>$dd=$dialstatus["data"];
>$agi->verbose("Status".$dd);
>
> In AGI debug, I get:
> AGI Tx >> agi_channel: SIP/10036-0096
> AGI Tx >> agi_language: en
> AGI Tx >> agi_type: SIP
> AGI Tx >> agi_uniqueid: 1322848927.172
> AGI Tx >> agi_version: 1.6.2.7
> AGI Tx >> agi_callerid: 10036
> AGI Tx >> agi_calleridname: 10036
> AGI Tx >> agi_dnid: 0012127773456
> AGI Tx >> agi_rdnis: unknown
> AGI Tx >> agi_context: privoip
> AGI Tx >> agi_extension: 0012127773456
> *AGI Rx << GET VARIABLE DIALSTATUS
> AGI Tx >> 200 result=1 (ANSWER)
> AGI Rx << VERBOSE "Status" 1
> AGI Tx >> 200 result=1*
> **
> Please help me in this.
>
> Thanks,
> Kamlesh
> **
> *
>
>
> *
>
> --
> _
> -- 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
>
--
_
-- 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

[asterisk-users] DIALSTATUS Values

2011-12-02 Thread Kamlesh Kumar

Hello,
 
I tried to search the answer of my problem but unable to get resolution so 
sending to you guys. I'm using asterisk 1.6.2.7 and writing the AGI scripts 
using PHP. I'm unable to retrieve the DIALSTATUS value, during execution of AGI 
script, I get empty value.
 
Extracts from AGI Script:
 
#!/usr/bin/php -q
#!/bin/bash
get_variable(DIALSTATUS);
   $dd=$dialstatus["data"];
   $agi->verbose("Status".$dd);
 
In AGI debug, I get: 
AGI Tx >> agi_channel: SIP/10036-0096
AGI Tx >> agi_language: en
AGI Tx >> agi_type: SIP
AGI Tx >> agi_uniqueid: 1322848927.172
AGI Tx >> agi_version: 1.6.2.7
AGI Tx >> agi_callerid: 10036
AGI Tx >> agi_calleridname: 10036
AGI Tx >> agi_dnid: 0012127773456
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: privoip
AGI Tx >> agi_extension: 0012127773456
AGI Rx << GET VARIABLE DIALSTATUS
AGI Tx >> 200 result=1 (ANSWER)
AGI Rx << VERBOSE "Status" 1
AGI Tx >> 200 result=1
 
Please help me in this.
 
Thanks,
Kamlesh
 
 

  --
_
-- 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] DIALSTATUS on CANCEL

2011-01-01 Thread Bryant Zimmerman
Vandar

I know understand what you are saying here. Once I turned on CEL I was able 
to see when and where each hangup was firing for each channel and the order 
of operations here.  I am now moving very aggressively to get to CEL as I 
now see why CDR's are so broken. I have my CEL to CDR translator in testing 
and this is looking very promising.

Thanks for your help.
Bryant


 From: brya...@zktech.com
Sent: Friday, December 24, 2010 9:28 AM
To: "Asterisk Users Mailing List - Non-Commercial Discussion" 

Subject: Re: [asterisk-users] DIALSTATUS on CANCEL

If a call is hung up before an answer our "h" extension is not running in 
our dial macro 

Bryant

On Dec 24, 2010, at 3:47 AM, Vardan Harutyunyan  
wrote:

> Hello Bryant
> Extension "h" is worked in any case of hangup.
> It not important to that the call was answered or no.
> It also be more flexible, if you use instead of ${DIALSTATUS}use 
${HANGUPCAUSE}, while in most of cause ${DIALSTATUS} is returned the same 
return code.
> http://www.voip-info.org/wiki/view/Asterisk+variable+hangupcause
> 
> 
> -- 
> 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
> 
> Bryant Zimmerman wrote:
>> Vardan
>> 
>> I have not use AEL so it is a bit hard to follow with the formatting 
the
>> way it is but it looks like correct.
>> Please note the "h" extension only appears to run if a call is 
connected
>> so I do not know when the "CANCEL" would ever be set.
>> There may be someone else who can speak to this. It also appears thet
>> ${DIALSTATUS} may not be set if the call is not allowed to time out or
>> dialed. To me it would make sense to set the inital state of the
>> ${DIALSTATUS} to CANCEL and if nothing changes it that would stand, but
>> I may be missing the point on this can anyone else speak to it?
>> 
>> Bryant
>> 
>> 
--------
>> *From*: "Vardan Harutyunyan" 
>> *Sent*: Thursday, December 23, 2010 2:11 AM
>> *To*: asterisk-users@lists.digium.com
>> *Subject*: Re: [asterisk-users] DIALSTATUS on CANCEL
>> 
>> I have make test in AEL.
>> 
>> context fu {
>> 
>> _000./userN => {
>> Dial(SIP/${EXTEN:3...@prov);
>> Noop(${DIALSTATUS});
>> };
>> h => {
>> Noop(${DIALSTATUS});
>> };
>> };
>> 
>> And look CLI
>> -- Executing [00018185402...@fu:1] NoOp("SIP/userN-b6317738", "")
>> in new stack
>> -- Executing [00018185402...@fo:2] Dial("SIP/user3-b6317738",
>> "SIP/18185402...@prov") in new stack
>> -- Called 18185402...@prov
>> -- SIP/Prov-082a83b8 is making progress passing it to
>> SIP/userN-b6317738
>> == Spawn extension (fu, 00018185402020, 2) exited non-zero on
>> 'SIP/user3-b6317738'
>> -- Executing [...@fu:1] NoOp("SIP/userN-b6317738", "CANCEL") in new stack
>> 
>> I think, I am right
>> 
>> --
>> 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
>> 
>> Bryant Zimmerman wrote:
>>> The Dial Status is not set when accessing it from the h extension.
>>> 
>>> Bryant
>>> 
>>> 

>>> *From*: "Vardan Harutyunyan" 
>>> *Sent*: Wednesday, December 22, 2010 10:39 AM
>>> *To*: asterisk-users@lists.digium.com
>>> *Subject*: Re: [asterisk-users] DIALSTATUS on CANCEL
>>> 
>>> Try to use h extension
>>> 
>>> --
>>> 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
>>> 
>>> Michael wrote:
>>> > Hi Nikhil,
>>> >
>>> > Both debug and verbose are set to 20. That's all I got, but as you 
can
>>> > see, for the other types of reasons, the DIALSTATUS got a value (and 
we
>>> > see the events

Re: [asterisk-users] DIALSTATUS on CANCEL

2010-12-24 Thread BryantZ
I am using the g option and it does not run the next statement or "h" extension 
 if the caller hangs up before an answers or time out event occurs during a 
dial comand.

Bryant

On Dec 24, 2010, at 9:55 AM, Jim Dickenson  wrote:

> If on the dial command you add option g, if the call is not answered, it will 
> fall through to the next statement which can be a hangup command and then it 
> will go to the h extension. If that does not then make the statement after 
> the dial command a goto h extension.
> -- 
> Jim Dickenson
> mailto:dicken...@cfmc.com
> 
> CfMC
> http://www.cfmc.com/
> 
> 
> 
> On Dec 24, 2010, at 6:03 AM, brya...@zktech.com wrote:
> 
>> If a call is hung up before an answer our "h" extension is not running in 
>> our dial macro 
>> 
>> Bryant
>> 
>> On Dec 24, 2010, at 3:47 AM, Vardan Harutyunyan  wrote:
>> 
>>> Hello Bryant
>>> Extension "h" is worked in any case of hangup.
>>> It not important to that the call was answered or no.
>>> It also be more flexible, if you use instead of ${DIALSTATUS}use 
>>> ${HANGUPCAUSE}, while in most of cause ${DIALSTATUS} is returned the same 
>>> return code.
>>> http://www.voip-info.org/wiki/view/Asterisk+variable+hangupcause
>>> 
>>> 
>>> -- 
>>> 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
>>> 
>>> Bryant Zimmerman wrote:
>>>> Vardan
>>>> 
>>>> I have not use AEL so it is a bit hard to follow with the formatting the
>>>> way it is but it looks like correct.
>>>> Please note the "h" extension only appears to run if a call is connected
>>>> so I do not know when the "CANCEL" would ever be set.
>>>> There may be someone else who can speak to this. It also appears thet
>>>> ${DIALSTATUS} may not be set if the call is not allowed to time out or
>>>> dialed. To me it would make sense to set the inital state of the
>>>> ${DIALSTATUS} to CANCEL and if nothing changes it that would stand, but
>>>> I may be missing the point on this can anyone else speak to it?
>>>> 
>>>> Bryant
>>>> 
>>>> 
>>>> *From*: "Vardan Harutyunyan" 
>>>> *Sent*: Thursday, December 23, 2010 2:11 AM
>>>> *To*: asterisk-users@lists.digium.com
>>>> *Subject*: Re: [asterisk-users] DIALSTATUS on CANCEL
>>>> 
>>>> I have make test in AEL.
>>>> 
>>>> context fu {
>>>> 
>>>> _000./userN => {
>>>> Dial(SIP/${EXTEN:3...@prov);
>>>> Noop(${DIALSTATUS});
>>>> };
>>>> h => {
>>>> Noop(${DIALSTATUS});
>>>> };
>>>> };
>>>> 
>>>> And look CLI
>>>> -- Executing [00018185402...@fu:1] NoOp("SIP/userN-b6317738", "")
>>>> in new stack
>>>> -- Executing [00018185402...@fo:2] Dial("SIP/user3-b6317738",
>>>> "SIP/18185402...@prov") in new stack
>>>> -- Called 18185402...@prov
>>>> -- SIP/Prov-082a83b8 is making progress passing it to
>>>> SIP/userN-b6317738
>>>> == Spawn extension (fu, 00018185402020, 2) exited non-zero on
>>>> 'SIP/user3-b6317738'
>>>> -- Executing [...@fu:1] NoOp("SIP/userN-b6317738", "CANCEL") in new stack
>>>> 
>>>> I think, I am right
>>>> 
>>>> --
>>>> 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
>>>> 
>>>> Bryant Zimmerman wrote:
>>>>> The Dial Status is not set when accessing it from the h extension.
>>>>> 
>>>>> Bryant
>>>>> 
>>>>> 

Re: [asterisk-users] DIALSTATUS on CANCEL

2010-12-24 Thread Vardan Harutyunyan

In AEL macro you must use catch h

for example

macro DialToSIPProv (tech,number,prov) {

Dial(${tech}/${numb...@${prov});
switch(${DIALSTATUS}) {
case BUSY:
Noop(BUSY);
[Do some one]
break;
case CHANUNAVAIL:
Noop(CHANUN);
[Do some one]
break;
case NOANSWER:
Noop(NOANS);
[Do some one]
break;
case CANCEL:
Noop(CANCEL);
[Do some one]
break;
case CONGESTION:
Noop(CONG);
[Do some one]
break;
case ANSWER:
Noop(ANS);
[Do some one]
break;
default:
Noop(default);
[Do some one]
break;
};

catch h {
Noop(Hangup in macro);
Noop(${DIALSTATUS});
Hangup;
};

return;
};


--
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

brya...@zktech.com wrote:

If a call is hung up before an answer our "h" extension is not running in our 
dial macro

Bryant

On Dec 24, 2010, at 3:47 AM, Vardan Harutyunyan  wrote:


Hello Bryant
Extension "h" is worked in any case of hangup.
It not important to that the call was answered or no.
It also be more flexible, if you use instead of ${DIALSTATUS}use 
${HANGUPCAUSE}, while in most of cause ${DIALSTATUS} is returned the same 
return code.
http://www.voip-info.org/wiki/view/Asterisk+variable+hangupcause


--
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

Bryant Zimmerman wrote:

Vardan

I have not use AEL so it is a bit hard to follow with the formatting the
way it is but it looks like correct.
Please note the "h" extension only appears to run if a call is connected
so I do not know when the "CANCEL" would ever be set.
There may be someone else who can speak to this. It also appears thet
${DIALSTATUS} may not be set if the call is not allowed to time out or
dialed. To me it would make sense to set the inital state of the
${DIALSTATUS} to CANCEL and if nothing changes it that would stand, but
I may be missing the point on this can anyone else speak to it?

Bryant


*From*: "Vardan Harutyunyan"
*Sent*: Thursday, December 23, 2010 2:11 AM
*To*: asterisk-users@lists.digium.com
*Subject*: Re: [asterisk-users] DIALSTATUS on CANCEL

I have make test in AEL.

context fu {

_000./userN =>  {
Dial(SIP/${EXTEN:3...@prov);
Noop(${DIALSTATUS});
};
h =>  {
Noop(${DIALSTATUS});
};
};

And look CLI
-- Executing [00018185402...@fu:1] NoOp("SIP/userN-b6317738", "")
in new stack
-- Executing [00018185402...@fo:2] Dial("SIP/user3-b6317738",
"SIP/18185402...@prov") in new stack
-- Called 18185402...@prov
-- SIP/Prov-082a83b8 is making progress passing it to
SIP/userN-b6317738
== Spawn extension (fu, 00018185402020, 2) exited non-zero on
'SIP/user3-b6317738'
-- Executing [...@fu:1] NoOp("SIP/userN-b6317738", "CANCEL") in new stack

I think, I am right

--
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

Bryant Zimmerman wrote:

The Dial Status is not set when accessing it from the h extension.

Bryant


*From*: "Vardan Harutyunyan"
*Sent*: Wednesday, December 22, 2010 10:39 AM
*To*: asterisk-users@lists.digium.com
*Subject*: Re: [asterisk-users] DIALSTATUS on CANCEL

Try to use h extension

--
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

Michael wrote:

Hi Nikhil,

Both debug and verbose are set to 20. That's all I got, but as you can
see, for the other types of reasons, the DIALSTATUS got a value (and we
see the events). I'm pretty sure it's a bug.

Michael

On Wed, Dec 22, 2010 at 9:01 AM, Nikhilmailto:d.nik...@cem-solutions.net>>  wrote:

Hi
Ena

Re: [asterisk-users] DIALSTATUS on CANCEL

2010-12-24 Thread Jim Dickenson
If on the dial command you add option g, if the call is not answered, it will 
fall through to the next statement which can be a hangup command and then it 
will go to the h extension. If that does not then make the statement after the 
dial command a goto h extension.
-- 
Jim Dickenson
mailto:dicken...@cfmc.com

CfMC
http://www.cfmc.com/



On Dec 24, 2010, at 6:03 AM, brya...@zktech.com wrote:

> If a call is hung up before an answer our "h" extension is not running in our 
> dial macro 
> 
> Bryant
> 
> On Dec 24, 2010, at 3:47 AM, Vardan Harutyunyan  wrote:
> 
>> Hello Bryant
>> Extension "h" is worked in any case of hangup.
>> It not important to that the call was answered or no.
>> It also be more flexible, if you use instead of ${DIALSTATUS}use 
>> ${HANGUPCAUSE}, while in most of cause ${DIALSTATUS} is returned the same 
>> return code.
>> http://www.voip-info.org/wiki/view/Asterisk+variable+hangupcause
>> 
>> 
>> -- 
>> 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
>> 
>> Bryant Zimmerman wrote:
>>> Vardan
>>> 
>>> I have not use AEL so it is a bit hard to follow with the formatting the
>>> way it is but it looks like correct.
>>> Please note the "h" extension only appears to run if a call is connected
>>> so I do not know when the "CANCEL" would ever be set.
>>> There may be someone else who can speak to this. It also appears thet
>>> ${DIALSTATUS} may not be set if the call is not allowed to time out or
>>> dialed. To me it would make sense to set the inital state of the
>>> ${DIALSTATUS} to CANCEL and if nothing changes it that would stand, but
>>> I may be missing the point on this can anyone else speak to it?
>>> 
>>> Bryant
>>> 
>>> 
>>> *From*: "Vardan Harutyunyan" 
>>> *Sent*: Thursday, December 23, 2010 2:11 AM
>>> *To*: asterisk-users@lists.digium.com
>>> *Subject*: Re: [asterisk-users] DIALSTATUS on CANCEL
>>> 
>>> I have make test in AEL.
>>> 
>>> context fu {
>>> 
>>> _000./userN => {
>>> Dial(SIP/${EXTEN:3...@prov);
>>> Noop(${DIALSTATUS});
>>> };
>>> h => {
>>> Noop(${DIALSTATUS});
>>> };
>>> };
>>> 
>>> And look CLI
>>> -- Executing [00018185402...@fu:1] NoOp("SIP/userN-b6317738", "")
>>> in new stack
>>> -- Executing [00018185402...@fo:2] Dial("SIP/user3-b6317738",
>>> "SIP/18185402...@prov") in new stack
>>> -- Called 18185402...@prov
>>> -- SIP/Prov-082a83b8 is making progress passing it to
>>> SIP/userN-b6317738
>>> == Spawn extension (fu, 00018185402020, 2) exited non-zero on
>>> 'SIP/user3-b6317738'
>>> -- Executing [...@fu:1] NoOp("SIP/userN-b6317738", "CANCEL") in new stack
>>> 
>>> I think, I am right
>>> 
>>> --
>>> 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
>>> 
>>> Bryant Zimmerman wrote:
>>>> The Dial Status is not set when accessing it from the h extension.
>>>> 
>>>> Bryant
>>>> 
>>>> 
>>>> *From*: "Vardan Harutyunyan" 
>>>> *Sent*: Wednesday, December 22, 2010 10:39 AM
>>>> *To*: asterisk-users@lists.digium.com
>>>> *Subject*: Re: [asterisk-users] DIALSTATUS on CANCEL
>>>> 
>>>> Try to use h extension
>>>> 
>>>> --
>>>> 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

Re: [asterisk-users] DIALSTATUS on CANCEL

2010-12-24 Thread BryantZ
If a call is hung up before an answer our "h" extension is not running in our 
dial macro 

Bryant

On Dec 24, 2010, at 3:47 AM, Vardan Harutyunyan  wrote:

> Hello Bryant
> Extension "h" is worked in any case of hangup.
> It not important to that the call was answered or no.
> It also be more flexible, if you use instead of ${DIALSTATUS}use 
> ${HANGUPCAUSE}, while in most of cause ${DIALSTATUS} is returned the same 
> return code.
> http://www.voip-info.org/wiki/view/Asterisk+variable+hangupcause
> 
> 
> -- 
> 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
> 
> Bryant Zimmerman wrote:
>> Vardan
>> 
>> I have not use AEL so it is a bit hard to follow with the formatting the
>> way it is but it looks like correct.
>> Please note the "h" extension only appears to run if a call is connected
>> so I do not know when the "CANCEL" would ever be set.
>> There may be someone else who can speak to this. It also appears thet
>> ${DIALSTATUS} may not be set if the call is not allowed to time out or
>> dialed. To me it would make sense to set the inital state of the
>> ${DIALSTATUS} to CANCEL and if nothing changes it that would stand, but
>> I may be missing the point on this can anyone else speak to it?
>> 
>> Bryant
>> 
>> --------
>> *From*: "Vardan Harutyunyan" 
>> *Sent*: Thursday, December 23, 2010 2:11 AM
>> *To*: asterisk-users@lists.digium.com
>> *Subject*: Re: [asterisk-users] DIALSTATUS on CANCEL
>> 
>> I have make test in AEL.
>> 
>> context fu {
>> 
>> _000./userN => {
>> Dial(SIP/${EXTEN:3...@prov);
>> Noop(${DIALSTATUS});
>> };
>> h => {
>> Noop(${DIALSTATUS});
>> };
>> };
>> 
>> And look CLI
>> -- Executing [00018185402...@fu:1] NoOp("SIP/userN-b6317738", "")
>> in new stack
>> -- Executing [00018185402...@fo:2] Dial("SIP/user3-b6317738",
>> "SIP/18185402...@prov") in new stack
>> -- Called 18185402...@prov
>> -- SIP/Prov-082a83b8 is making progress passing it to
>> SIP/userN-b6317738
>> == Spawn extension (fu, 00018185402020, 2) exited non-zero on
>> 'SIP/user3-b6317738'
>> -- Executing [...@fu:1] NoOp("SIP/userN-b6317738", "CANCEL") in new stack
>> 
>> I think, I am right
>> 
>> --
>> 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
>> 
>> Bryant Zimmerman wrote:
>>> The Dial Status is not set when accessing it from the h extension.
>>> 
>>> Bryant
>>> 
>>> 
>>> *From*: "Vardan Harutyunyan" 
>>> *Sent*: Wednesday, December 22, 2010 10:39 AM
>>> *To*: asterisk-users@lists.digium.com
>>> *Subject*: Re: [asterisk-users] DIALSTATUS on CANCEL
>>> 
>>> Try to use h extension
>>> 
>>> --
>>> 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
>>> 
>>> Michael wrote:
>>> > Hi Nikhil,
>>> >
>>> > Both debug and verbose are set to 20. That's all I got, but as you can
>>> > see, for the other types of reasons, the DIALSTATUS got a value (and we
>>> > see the events). I'm pretty sure it's a bug.
>>> >
>>> > Michael
>>> >
>>> > On Wed, Dec 22, 2010 at 9:01 AM, Nikhil >> > <mailto:d.nik...@cem-solutions.net>> wrote:
>>> >
>>> > Hi
>>> > Enable debug level to more than 1 ,you may get something.
>>> >
>>> > Thanks
>>> > Nikhil
>>> >
>>> > On 12/22/2010 11:26 AM, Michael wrote:
>>> >
>>> > Spawn extension (incoming-private, , 3) exited non-zero
>>> > on 'SIP

Re: [asterisk-users] DIALSTATUS on CANCEL

2010-12-24 Thread Vardan Harutyunyan

Hello Bryant
Extension "h" is worked in any case of hangup.
It not important to that the call was answered or no.
It also be more flexible, if you use instead of ${DIALSTATUS}use 
${HANGUPCAUSE}, while in most of cause ${DIALSTATUS} is returned the 
same return code.

http://www.voip-info.org/wiki/view/Asterisk+variable+hangupcause


--
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

Bryant Zimmerman wrote:

Vardan

I have not use AEL so it is a bit hard to follow with the formatting the
way it is but it looks like correct.
Please note the "h" extension only appears to run if a call is connected
so I do not know when the "CANCEL" would ever be set.
There may be someone else who can speak to this. It also appears thet
${DIALSTATUS} may not be set if the call is not allowed to time out or
dialed. To me it would make sense to set the inital state of the
${DIALSTATUS} to CANCEL and if nothing changes it that would stand, but
I may be missing the point on this can anyone else speak to it?

Bryant


*From*: "Vardan Harutyunyan" 
*Sent*: Thursday, December 23, 2010 2:11 AM
*To*: asterisk-users@lists.digium.com
*Subject*: Re: [asterisk-users] DIALSTATUS on CANCEL

I have make test in AEL.

context fu {

_000./userN => {
Dial(SIP/${EXTEN:3...@prov);
Noop(${DIALSTATUS});
};
h => {
Noop(${DIALSTATUS});
};
};

And look CLI
-- Executing [00018185402...@fu:1] NoOp("SIP/userN-b6317738", "")
in new stack
-- Executing [00018185402...@fo:2] Dial("SIP/user3-b6317738",
"SIP/18185402...@prov") in new stack
-- Called 18185402...@prov
-- SIP/Prov-082a83b8 is making progress passing it to
SIP/userN-b6317738
== Spawn extension (fu, 00018185402020, 2) exited non-zero on
'SIP/user3-b6317738'
-- Executing [...@fu:1] NoOp("SIP/userN-b6317738", "CANCEL") in new stack

I think, I am right

--
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

Bryant Zimmerman wrote:

 The Dial Status is not set when accessing it from the h extension.

 Bryant

 
 *From*: "Vardan Harutyunyan" 
 *Sent*: Wednesday, December 22, 2010 10:39 AM
 *To*: asterisk-users@lists.digium.com
 *Subject*: Re: [asterisk-users] DIALSTATUS on CANCEL

 Try to use h extension

 --
 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

 Michael wrote:
> Hi Nikhil,
>
> Both debug and verbose are set to 20. That's all I got, but as you can
> see, for the other types of reasons, the DIALSTATUS got a value (and we
> see the events). I'm pretty sure it's a bug.
>
> Michael
>
> On Wed, Dec 22, 2010 at 9:01 AM, Nikhil  <mailto:d.nik...@cem-solutions.net>> wrote:
>
> Hi
> Enable debug level to more than 1 ,you may get something.
>
> Thanks
> Nikhil
>
> On 12/22/2010 11:26 AM, Michael wrote:
>
> Spawn extension (incoming-private, , 3) exited non-zero
> on 'SIP/Proxy-0031'
>
>
>
>
> --
> _
> -- 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


 --
 _
 -- 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



 --
 _
 -- 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



--
_
-- Bandwidth and Colocation Provide

Re: [asterisk-users] DIALSTATUS on CANCEL

2010-12-23 Thread Bryant Zimmerman
Vardan

I have not use AEL so it is a bit hard to follow with the formatting the 
way it is but it looks like correct.
Please note the "h" extension only appears to run if a call is connected so 
I do not know when the "CANCEL" would ever be set. 
There may be someone else who can speak to this. It also appears thet 
${DIALSTATUS} may not be set if the call is not allowed to time out or 
dialed. To me it would make sense to set the inital state of the 
${DIALSTATUS} to CANCEL and if nothing changes it that would stand, but I 
may be missing the point on this can anyone else speak to it?

Bryant


 From: "Vardan Harutyunyan" 
Sent: Thursday, December 23, 2010 2:11 AM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] DIALSTATUS on CANCEL

I have make test in AEL.

context fu {

_000./userN => {
Dial(SIP/${EXTEN:3...@prov);
Noop(${DIALSTATUS});
};
h => {
Noop(${DIALSTATUS});
};
};

And look CLI
-- Executing [00018185402...@fu:1] NoOp("SIP/userN-b6317738", "") 
in new stack
-- Executing [00018185402...@fo:2] Dial("SIP/user3-b6317738", 
"SIP/18185402...@prov") in new stack
-- Called 18185402...@prov
-- SIP/Prov-082a83b8 is making progress passing it to 
SIP/userN-b6317738
== Spawn extension (fu, 00018185402020, 2) exited non-zero on 
'SIP/user3-b6317738'
-- Executing [...@fu:1] NoOp("SIP/userN-b6317738", "CANCEL") in new stack

I think, I am right

-- 
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

Bryant Zimmerman wrote:
> The Dial Status is not set when accessing it from the h extension.
>
> Bryant
>
> 
> *From*: "Vardan Harutyunyan" 
> *Sent*: Wednesday, December 22, 2010 10:39 AM
> *To*: asterisk-users@lists.digium.com
> *Subject*: Re: [asterisk-users] DIALSTATUS on CANCEL
>
> Try to use h extension
>
> --
> 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
>
> Michael wrote:
>> Hi Nikhil,
>>
>> Both debug and verbose are set to 20. That's all I got, but as you can
>> see, for the other types of reasons, the DIALSTATUS got a value (and we
>> see the events). I'm pretty sure it's a bug.
>>
>> Michael
>>
>> On Wed, Dec 22, 2010 at 9:01 AM, Nikhil > <mailto:d.nik...@cem-solutions.net>> wrote:
>>
>> Hi
>> Enable debug level to more than 1 ,you may get something.
>>
>> Thanks
>> Nikhil
>>
>> On 12/22/2010 11:26 AM, Michael wrote:
>>
>> Spawn extension (incoming-private, , 3) exited non-zero
>> on 'SIP/Proxy-0031'
>>
>>
>>
>>
>> --
>> _
>> -- 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
>
>
> --
> _
> -- 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
>
>
>
> --
> _
> -- 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

--
_
-- 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


--
_
-- 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] DIALSTATUS on CANCEL

2010-12-23 Thread Michael
Thanks Vardan,

You're right. Running the script under h extension gets me the results I'm
looking for.

On Wed, Dec 22, 2010 at 5:38 PM, Vardan Harutyunyan wrote:

> Try to use h extension
>
> --
> 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
>
> Michael wrote:
>
>> Hi Nikhil,
>>
>> Both debug and verbose are set to 20. That's all I got, but as you can
>> see, for the other types of reasons, the DIALSTATUS got a value (and we
>> see the events). I'm pretty sure it's a bug.
>>
>> Michael
>>
>> On Wed, Dec 22, 2010 at 9:01 AM, Nikhil > > wrote:
>>
>>Hi
>>Enable debug level to more than 1 ,you may get something.
>>
>>Thanks
>>Nikhil
>>
>>On 12/22/2010 11:26 AM, Michael wrote:
>>
>>Spawn extension (incoming-private, , 3) exited non-zero
>>on 'SIP/Proxy-0031'
>>
>>
>>
>>
>> --
>> _
>> -- 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
>>
>
>
> --
> _
> -- 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
>
--
_
-- 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] DIALSTATUS on CANCEL

2010-12-22 Thread Vardan Harutyunyan

I have make test in AEL.

context fu {

_000./userN => {
Dial(SIP/${EXTEN:3...@prov);
Noop(${DIALSTATUS});
};
h => {
Noop(${DIALSTATUS});
};
};

And look CLI
-- Executing [00018185402...@fu:1] NoOp("SIP/userN-b6317738", "") 
in new stack
-- Executing [00018185402...@fo:2] Dial("SIP/user3-b6317738", 
"SIP/18185402...@prov") in new stack

-- Called 18185402...@prov
-- SIP/Prov-082a83b8 is making progress passing it to 
SIP/userN-b6317738
  == Spawn extension (fu, 00018185402020, 2) exited non-zero on 
'SIP/user3-b6317738'

-- Executing [...@fu:1] NoOp("SIP/userN-b6317738", "CANCEL") in new stack

I think, I am right

--
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

Bryant Zimmerman wrote:

The Dial Status is not set when accessing it from the h extension.

Bryant


*From*: "Vardan Harutyunyan" 
*Sent*: Wednesday, December 22, 2010 10:39 AM
*To*: asterisk-users@lists.digium.com
*Subject*: Re: [asterisk-users] DIALSTATUS on CANCEL

Try to use h extension

--
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

Michael wrote:

 Hi Nikhil,

 Both debug and verbose are set to 20. That's all I got, but as you can
 see, for the other types of reasons, the DIALSTATUS got a value (and we
 see the events). I'm pretty sure it's a bug.

 Michael

 On Wed, Dec 22, 2010 at 9:01 AM, Nikhil mailto:d.nik...@cem-solutions.net>> wrote:

 Hi
 Enable debug level to more than 1 ,you may get something.

 Thanks
 Nikhil

 On 12/22/2010 11:26 AM, Michael wrote:

 Spawn extension (incoming-private, , 3) exited non-zero
 on 'SIP/Proxy-0031'




 --
 _
 -- 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



--
_
-- 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



--
_
-- 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



--
_
-- 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] DIALSTATUS on CANCEL

2010-12-22 Thread Bryant Zimmerman
The Dial Status is not set when accessing it from the h extension. 

Bryant


 From: "Vardan Harutyunyan" 
Sent: Wednesday, December 22, 2010 10:39 AM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] DIALSTATUS on CANCEL

Try to use h extension

-- 
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

Michael wrote:
> Hi Nikhil,
>
> Both debug and verbose are set to 20. That's all I got, but as you can
> see, for the other types of reasons, the DIALSTATUS got a value (and we
> see the events). I'm pretty sure it's a bug.
>
> Michael
>
> On Wed, Dec 22, 2010 at 9:01 AM, Nikhil  <mailto:d.nik...@cem-solutions.net>> wrote:
>
> Hi
> Enable debug level to more than 1 ,you may get something.
>
> Thanks
> Nikhil
>
> On 12/22/2010 11:26 AM, Michael wrote:
>
> Spawn extension (incoming-private, , 3) exited non-zero
> on 'SIP/Proxy-0031'
>
>
>
>
> --
> _
> -- 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

--
_
-- 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


--
_
-- 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] DIALSTATUS on CANCEL

2010-12-22 Thread Vardan Harutyunyan

Try to use h extension

--
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

Michael wrote:

Hi Nikhil,

Both debug and verbose are set to 20. That's all I got, but as you can
see, for the other types of reasons, the DIALSTATUS got a value (and we
see the events). I'm pretty sure it's a bug.

Michael

On Wed, Dec 22, 2010 at 9:01 AM, Nikhil mailto:d.nik...@cem-solutions.net>> wrote:

Hi
Enable debug level to more than 1 ,you may get something.

Thanks
Nikhil

On 12/22/2010 11:26 AM, Michael wrote:

Spawn extension (incoming-private, , 3) exited non-zero
on 'SIP/Proxy-0031'




--
_
-- 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



--
_
-- 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] DIALSTATUS on CANCEL

2010-12-22 Thread Bryant Zimmerman
I see the same thing. Why is there an CANCEL status if it is never set. The 
only way I have been able to capture a Cancel status is with the
h extensions using the 'e' option under dial. But this leaves no way to 
tell what the DIALSTATUS state was as it is blank. I belive it is a bug as 
well.

Bryant


 From: "Michael" 
Sent: Wednesday, December 22, 2010 9:42 AM
To: "Asterisk Users Mailing List - Non-Commercial Discussion" 

Subject: Re: [asterisk-users] DIALSTATUS on CANCEL

Hi Nikhil,

Both debug and verbose are set to 20. That's all I got, but as you can see, 
for the other types of reasons, the DIALSTATUS got a value (and we see the 
events). I'm pretty sure it's a bug.

Michael

On Wed, Dec 22, 2010 at 9:01 AM, Nikhil  
wrote:
Hi
   Enable debug level to more than 1 ,you may get something.

Thanks
Nikhil 
On 12/22/2010 11:26 AM, Michael wrote:
Spawn extension (incoming-private, , 3) exited non-zero on 
'SIP/Proxy-0031'


--
_
-- 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] DIALSTATUS on CANCEL

2010-12-22 Thread Michael
Hi Nikhil,

Both debug and verbose are set to 20. That's all I got, but as you can see,
for the other types of reasons, the DIALSTATUS got a value (and we see the
events). I'm pretty sure it's a bug.

Michael

On Wed, Dec 22, 2010 at 9:01 AM, Nikhil  wrote:

> Hi
>Enable debug level to more than 1 ,you may get something.
>
> Thanks
> Nikhil
>
> On 12/22/2010 11:26 AM, Michael wrote:
>
>> Spawn extension (incoming-private, , 3) exited non-zero on
>> 'SIP/Proxy-0031'
>>
>
>
--
_
-- 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] DIALSTATUS on CANCEL

2010-12-21 Thread Nikhil

Hi
Enable debug level to more than 1 ,you may get something.

Thanks
Nikhil
On 12/22/2010 11:26 AM, Michael wrote:
Spawn extension (incoming-private, , 3) exited non-zero on 
'SIP/Proxy-0031'



--
_
-- 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] DIALSTATUS on CANCEL

2010-12-21 Thread Michael
Anyone??

Thanks.

On Mon, Dec 20, 2010 at 10:42 AM, VoIP Question wrote:

> Hello,
>
> We have a strange situation (asterisk 1.6.2.14), where we get a result for
> DIALSTATUS for BUSY and No-ANSWER, but nothing for CANCEL.
>
> This is the (relevant) test dialplan:
> 
> [incoming-private]
> exten => _X., n, Dial(SIP/1001,30)
> exten => _X., n, NoOp(${DIALSTATUS})
> exten => _X., n, Gosub(incoming-status,s-${DIALSTATUS},1)
>
> [incoming-status]
> exten => s-CANCEL,1, NoOp()
> exten => s-CANCEL,n, Return()
> exten => s-NOANSWER,1, NoOp()
> exten => s-NOANSWER,n, Return()
> exten => s-BUSY,1, NoOp()
> exten => s-BUSY,n,  Return()
>
>
> This is what we get on a BUSY call:
> ---
> -- Executing [1...@incoming-private:3] Dial("SIP/Proxy-002b",
> "SIP/1001,50") in new stack
>   == Using SIP RTP CoS mark 5
>   == Using SIP VRTP CoS mark 6
>   == Using UDPTL CoS mark 5
> -- Called 1001
> -- Got SIP response 486 "Busy Here" back from 10.0.0.1
> -- SIP/1001-002c is busy
>   == Everyone is busy/congested at this time (1:1/0/0)
> -- Executing [1...@incoming-private:4] NoOp("SIP/Proxy-002b",
> "BUSY") in new stack
> -- Executing [1...@incoming-private:5] Gosub("SIP/Proxy-002b",
> "incoming-status,s-BUSY,1") in new stack
>
> This is what we get on a NO ANSWER call:
> ---
> -- Executing [1...@incoming-private:3] Dial("SIP/Proxy-002f",
> "SIP/1001,30") in new stack
>   == Using SIP RTP CoS mark 5
>   == Using SIP VRTP CoS mark 6
>   == Using UDPTL CoS mark 5
> -- Called 1001
> -- SIP/1001-0030 is ringing
> -- Nobody picked up in 3 ms
> -- Executing [1...@incoming-private:4] NoOp("SIP/Proxy-002f",
> "NOANSWER") in new stack
> -- Executing [1...@incoming-private:5] Gosub("SIP/Proxy-002f",
> "incoming-status,s-NOANSWER,1") in new stack
>
> This is what we get on a CANCEL call:
> -
> -- Executing [1...@incoming-private:3] Dial("SIP/Proxy-0031",
> "SIP/1001,30") in new stack
>   == Using SIP RTP CoS mark 5
>   == Using SIP VRTP CoS mark 6
>   == Using UDPTL CoS mark 5
> -- Called 1001
> -- SIP/1001-0032 is ringing
>   == Spawn extension (incoming-private, , 3) exited non-zero on
> 'SIP/Proxy-0031'
>
> There's no event indicating that a DIALSTATUS is generated and the call
> simply doesn't go to the next step in the dialplan. Unless I'm missing
> something, it seems to me that it might be a bug.
>
> I would be happy to get feedback from other users of the DIALSTATUS value
> (or Digium), especially in the CANCEL scenario.
>
> Thank you,
>
> Michael
>
--
_
-- 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

[asterisk-users] DIALSTATUS on CANCEL

2010-12-20 Thread VoIP Question
Hello,

We have a strange situation (asterisk 1.6.2.14), where we get a result for
DIALSTATUS for BUSY and No-ANSWER, but nothing for CANCEL.

This is the (relevant) test dialplan:

[incoming-private]
exten => _X., n, Dial(SIP/1001,30)
exten => _X., n, NoOp(${DIALSTATUS})
exten => _X., n, Gosub(incoming-status,s-${DIALSTATUS},1)

[incoming-status]
exten => s-CANCEL,1, NoOp()
exten => s-CANCEL,n, Return()
exten => s-NOANSWER,1, NoOp()
exten => s-NOANSWER,n, Return()
exten => s-BUSY,1, NoOp()
exten => s-BUSY,n,  Return()


This is what we get on a BUSY call:
---
-- Executing [1...@incoming-private:3] Dial("SIP/Proxy-002b",
"SIP/1001,50") in new stack
  == Using SIP RTP CoS mark 5
  == Using SIP VRTP CoS mark 6
  == Using UDPTL CoS mark 5
-- Called 1001
-- Got SIP response 486 "Busy Here" back from 10.0.0.1
-- SIP/1001-002c is busy
  == Everyone is busy/congested at this time (1:1/0/0)
-- Executing [1...@incoming-private:4] NoOp("SIP/Proxy-002b",
"BUSY") in new stack
-- Executing [1...@incoming-private:5] Gosub("SIP/Proxy-002b",
"incoming-status,s-BUSY,1") in new stack

This is what we get on a NO ANSWER call:
---
-- Executing [1...@incoming-private:3] Dial("SIP/Proxy-002f",
"SIP/1001,30") in new stack
  == Using SIP RTP CoS mark 5
  == Using SIP VRTP CoS mark 6
  == Using UDPTL CoS mark 5
-- Called 1001
-- SIP/1001-0030 is ringing
-- Nobody picked up in 3 ms
-- Executing [1...@incoming-private:4] NoOp("SIP/Proxy-002f",
"NOANSWER") in new stack
-- Executing [1...@incoming-private:5] Gosub("SIP/Proxy-002f",
"incoming-status,s-NOANSWER,1") in new stack

This is what we get on a CANCEL call:
-
-- Executing [1...@incoming-private:3] Dial("SIP/Proxy-0031",
"SIP/1001,30") in new stack
  == Using SIP RTP CoS mark 5
  == Using SIP VRTP CoS mark 6
  == Using UDPTL CoS mark 5
-- Called 1001
-- SIP/1001-0032 is ringing
  == Spawn extension (incoming-private, , 3) exited non-zero on
'SIP/Proxy-0031'

There's no event indicating that a DIALSTATUS is generated and the call
simply doesn't go to the next step in the dialplan. Unless I'm missing
something, it seems to me that it might be a bug.

I would be happy to get feedback from other users of the DIALSTATUS value
(or Digium), especially in the CANCEL scenario.

Thank you,

Michael
--
_
-- 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] DIALSTATUS always returns NOANSWER

2010-10-21 Thread Godson Gera
Hi,

Which asterisk version are you using. try setting call-limit value in
sip.conf and see if it makes any difference.




On Thu, Oct 21, 2010 at 1:29 PM, GBR Icasiano, Ryan A. <
raicasi...@globalbridgeresources.com> wrote:

> Hi,
>
> Here is the scenario:
> 1. 1st phone calls and asterisk dials to extension no.
> 2. Extension answers 1st caller(which makes it busy).
> 2. 2nd phone calls and asterisk dials to extension no.
> 3. 2nd phone hears a BUSY tone, but have to wait for the timeout to
> expire(in DIAL cmd) before proceeding to the next step in dialplan
> 4. Get the current DIALSTATUS, but it returns NOANSWER, instead of BUSY
>
> the problem is, since the 2nd caller hears a busy tone, it should not wait
> for the timeout to expire, and proceed immediately in fetching the
> DIALSTATUS.
> I also tried this scenario and used DEV_STATE, but it always returns
> NOT_INUSE
>
> I already assigned qualify=yes in my sip configuration but still to no
> avail.
>
> any ideas?
>
> regards,
>
> RYAN ICASIANO
>
> --
> _
> -- 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
>



-- 
Thanks & Regards,
Godson Gera
FreeSWITCH Asterisk Billing
Consultant
-- 
_
-- 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] DIALSTATUS always returns NOANSWER

2010-10-21 Thread Zeeshan Zakaria
Maybe you should post this portion for your dialplan. I have done the same
thing several times and never had this timeout issue.

Zeeshan A Zakaria

--
www.ilovetovoip.com

On 2010-10-21 4:08 AM, "GBR Icasiano, Ryan A." <
raicasi...@globalbridgeresources.com> wrote:

Hi,

Here is the scenario:
1. 1st phone calls and asterisk dials to extension no.
2. Extension answers 1st caller(which makes it busy).
2. 2nd phone calls and asterisk dials to extension no.
3. 2nd phone hears a BUSY tone, but have to wait for the timeout to
expire(in DIAL cmd) before proceeding to the next step in dialplan
4. Get the current DIALSTATUS, but it returns NOANSWER, instead of BUSY

the problem is, since the 2nd caller hears a busy tone, it should not wait
for the timeout to expire, and proceed immediately in fetching the
DIALSTATUS.
I also tried this scenario and used DEV_STATE, but it always returns
NOT_INUSE

I already assigned qualify=yes in my sip configuration but still to no
avail.

any ideas?

regards,

RYAN ICASIANO

--
_
-- 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
-- 
_
-- 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

[asterisk-users] DIALSTATUS always returns NOANSWER

2010-10-21 Thread GBR Icasiano, Ryan A.
Hi,

Here is the scenario:
1. 1st phone calls and asterisk dials to extension no.
2. Extension answers 1st caller(which makes it busy).
2. 2nd phone calls and asterisk dials to extension no.
3. 2nd phone hears a BUSY tone, but have to wait for the timeout to expire(in 
DIAL cmd) before proceeding to the next step in dialplan
4. Get the current DIALSTATUS, but it returns NOANSWER, instead of BUSY

the problem is, since the 2nd caller hears a busy tone, it should not wait for 
the timeout to expire, and proceed immediately in fetching the DIALSTATUS.
I also tried this scenario and used DEV_STATE, but it always returns NOT_INUSE

I already assigned qualify=yes in my sip configuration but still to no avail.

any ideas?

regards,

RYAN ICASIANO

-- 
_
-- 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] DIALSTATUS variable and qualify=no

2010-04-17 Thread Philipp von Klitzing
Hi!

> > could anybody tell me if the info below is still correct:
> > 
> > Note: In order to obtain useful DIALSTATUS information when dialing a
> > peer you will need to have qualify=yes in that peer's definition (e.g.
> > in sip.conf or iax.conf).
> > http://www.voip-info.org/wiki/view/Asterisk+variable+DIALSTATUS
> 
> That's not correct.  DIALSTATUS will be set whether or not you've got
> qualify=yes in the peer definition.

I think the emphasis of the quote above was on "useful". The answer does 
not 100% fit the question. :-)

Philipp


-- 
_
-- 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] DIALSTATUS variable and qualify=no

2010-04-17 Thread Jared Smith
On Sat, 2010-04-17 at 17:38 +0400, Rustam Kovhaev wrote:
> could anybody tell me if the info below is still correct:
> 
> Note: In order to obtain useful DIALSTATUS information when dialing a
> peer you will need to have qualify=yes in that peer's definition (e.g.
> in sip.conf or iax.conf).
> http://www.voip-info.org/wiki/view/Asterisk+variable+DIALSTATUS
> 

That's not correct.  DIALSTATUS will be set whether or not you've got
qualify=yes in the peer definition.

--
Jared Smith
Digium, Inc.


-- 
_
-- 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


[asterisk-users] DIALSTATUS variable and qualify=no

2010-04-17 Thread Rustam Kovhaev
Hi there,

could anybody tell me if the info below is still correct:

Note: In order to obtain useful DIALSTATUS information when dialing a
peer you will need to have qualify=yes in that peer's definition (e.g.
in sip.conf or iax.conf).
http://www.voip-info.org/wiki/view/Asterisk+variable+DIALSTATUS

THANKS!!

-- 
Regards,
Rustam Kovhaev

-- 
_
-- 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] Dialstatus

2009-11-02 Thread Joseph
On 11/02/09 07:28, Steve Edwards wrote:
>On Mon, 2 Nov 2009, Patrick Plattes wrote:
>
>> you can do print the dialstatus to the console e.g.:
>> exten => s,n,NoOp(${DIALSTATUS})
>>
>> More info:
>> http://www.voip-info.org/wiki/view/Asterisk+cmd+NoOp
>
>A "better practice" would be to use verbose() -- an application with
>greater functionality written specifically for this purpose.
>
>--
>Thanks in advance,
>-
>Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
>Newline  Fax: +1-760-731-3000

What was looking to do something in macro after the channel gets connected 
"dialstatus=Answer" but it doesn't work.

Running the macro I don't hear anything (only a dial tone) until the macro is 
finished.

-- 
Joseph

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] Dialstatus

2009-11-02 Thread Steve Edwards
On Mon, 2 Nov 2009, Patrick Plattes wrote:

> you can do print the dialstatus to the console e.g.:
> exten => s,n,NoOp(${DIALSTATUS})
>
> More info:
> http://www.voip-info.org/wiki/view/Asterisk+cmd+NoOp

A "better practice" would be to use verbose() -- an application with 
greater functionality written specifically for this purpose.

-- 
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] Dialstatus

2009-11-02 Thread Patrick Plattes
Hi,

you can do print the dialstatus to the console e.g.:
exten => s,n,NoOp(${DIALSTATUS})

More info:
http://www.voip-info.org/wiki/view/Asterisk+cmd+NoOp

Bye,
 Patrick

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


[asterisk-users] Dialstatus

2009-11-01 Thread Joseph
I can not seem to get dial status to work,
in sip.conf I have: qualify=yes

simple plan:
exten => 51,1,Dial(SIP/11,20,r)
exten => 51,n,Goto(s-${DIALSTATUS},1)
exten => s-Busy,1,Hangup()
exten => s-Answer,1,Macro(atb)

I'm dialing from exten.11 to exten.11 so I get busy signal and the channel 
should hangup but it doesn't

How to print/display dialstatus? I'm using ATA

-- 
#Joseph

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] dialstatus through a call file

2009-02-03 Thread Pascal Bruno
My call file was calling an AGI application, and from with the AGI, I could
not get the DIALSTATUS,  I will try to send it to the dialplan first, then
call my AGI from the dialplan and see what happen.

Thanks for your help


On Tue, Feb 3, 2009 at 3:35 AM, Johansson Olle E  wrote:

>
> 3 feb 2009 kl. 04.33 skrev Ex Vito:
>
> > On Tue, Jan 27, 2009 at 10:21 PM, Pascal Bruno 
> > wrote:
> >> Is it possible to retrieve the DIALSTATUS variable when placing
> >> call through
> >> a call file.  This variable is set when using the Dial()
> >> application from
> >> the dialplan, but I am using a call file for my current application
> >> and need
> >> to get the dialstatus.
> >
> >  Your call file will initiate actions defined in the dialplan and
> > certainly after
> >  the triggered Dial the DIALSTATUS will be available to the dialplan.
> >
> >  Now the question is: "where" do you want to retreive the DIALSTATUS
> > to ?
> >
> >  If back to the OS environment (a file ?) you will need to have your
> > dialplan
> >  do it for you, maybe via System(echo ${DIALSTATUS} > /tmp/file) or
> > something...
> >  (NOTE: i'm not sure of the syntax of the application... check it
> > with "core show
> >  application System" on the CLI)
>
> A call file can either direct a call to an application or to a
> specific extension.
> Instead of sending the call to Dial, create an extension where you grab
> the dialstatus after the call and store it away somewhere for the
> application
> to retrieve.
>
> Or convert your app to AMI and you will get it all.
>
> /O
>
> ___
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] dialstatus through a call file

2009-02-03 Thread Johansson Olle E

3 feb 2009 kl. 04.33 skrev Ex Vito:

> On Tue, Jan 27, 2009 at 10:21 PM, Pascal Bruno   
> wrote:
>> Is it possible to retrieve the DIALSTATUS variable when placing  
>> call through
>> a call file.  This variable is set when using the Dial()  
>> application from
>> the dialplan, but I am using a call file for my current application  
>> and need
>> to get the dialstatus.
>
>  Your call file will initiate actions defined in the dialplan and
> certainly after
>  the triggered Dial the DIALSTATUS will be available to the dialplan.
>
>  Now the question is: "where" do you want to retreive the DIALSTATUS  
> to ?
>
>  If back to the OS environment (a file ?) you will need to have your  
> dialplan
>  do it for you, maybe via System(echo ${DIALSTATUS} > /tmp/file) or
> something...
>  (NOTE: i'm not sure of the syntax of the application... check it
> with "core show
>  application System" on the CLI)

A call file can either direct a call to an application or to a  
specific extension.
Instead of sending the call to Dial, create an extension where you grab
the dialstatus after the call and store it away somewhere for the  
application
to retrieve.

Or convert your app to AMI and you will get it all.

/O

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] dialstatus through a call file

2009-02-02 Thread Ex Vito
On Tue, Jan 27, 2009 at 10:21 PM, Pascal Bruno  wrote:
> Is it possible to retrieve the DIALSTATUS variable when placing call through
> a call file.  This variable is set when using the Dial() application from
> the dialplan, but I am using a call file for my current application and need
> to get the dialstatus.

  Your call file will initiate actions defined in the dialplan and
certainly after
  the triggered Dial the DIALSTATUS will be available to the dialplan.

  Now the question is: "where" do you want to retreive the DIALSTATUS to ?

  If back to the OS environment (a file ?) you will need to have your dialplan
  do it for you, maybe via System(echo ${DIALSTATUS} > /tmp/file) or
something...
  (NOTE: i'm not sure of the syntax of the application... check it
with "core show
  application System" on the CLI)
--
  exvito

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


[asterisk-users] dialstatus through a call file

2009-01-27 Thread Pascal Bruno
Hello,
Is it possible to retrieve the DIALSTATUS variable when placing call through
a call file.  This variable is set when using the Dial() application from
the dialplan, but I am using a call file for my current application and need
to get the dialstatus.

Thank you.
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] dialstatus and cancelled calls

2008-03-18 Thread Vieri

--- Matt Riddell <[EMAIL PROTECTED]> wrote:

> http://bugs.digium.com/view.php?id=12230

Thanks Matt.
However, "I may be wrong" but this isn't exactly what
I'm looking for. I would like Asterisk to
"transparently" set my CDR(disposition) field to
reflect if a call has simply timed out (NO ANSWER) or
if the caller hung up prior to ANSWER (thus CANCEL). 

I think that it's all in the cdr.h, cdr.c and
app_dial.c files.

cdr.h has:

#define AST_CDR_NULL0
#define AST_CDR_FAILED  (1 << 0)
#define AST_CDR_BUSY(1 << 1)
#define AST_CDR_NOANSWER(1 << 2)
#define AST_CDR_ANSWERED(1 << 3)

So I guess we would need an AST_CDR_CANCEL.

cdr.c has:
void ast_cdr_noanswer(struct ast_cdr *cdr)

Here too I would add something like
void ast_cdr_cancel(struct ast_cdr *cdr)

then would add a condition to:
char *ast_cdr_disp2str(int disposition)
such as
case AST_CDR_CANCEL:
return "CANCEL";

in app_dial.c
static struct ast_channel *wait_for_answer
would call
ast_cdr_cancel(in->cdr);
whenever it subsequently calls
strcpy(status, "CANCEL");

Now the problem is: can I define AST_CDR_CANCEL in
cdr.h? And how?

The source code I'm referring to is 1.2 but I think
it's similar to 1.4/1.6.



  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] dialstatus and cancelled calls

2008-03-16 Thread Matt Riddell
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Vieri wrote:
> --- Ex Vito <[EMAIL PROTECTED]> wrote:
> 
>>   ...as long as the destination does not answer
>> you'll get
>>   a NO ANSWER disposition.
>>   So, if in your case you want to know if a user
>> answered
>>   the phone, then, yes, you will have to add the
>> DIALSTATUS
>>   value to the CDR, probably in the CDR's userfield.
> 
> Thanks.
> It's surprising though. Just like queue logs are very
> descriptive (you know which side hung up) I thought
> CDR data would be as well as far as this detail is
> concerned. But I guess it's because a queue is a
> special pseudo-channel thus allowing finer logging.

Wordwrapping killed my patch so I've uploaded it to the bugtracker -
even though it probably won't be committed:

http://bugs.digium.com/view.php?id=12230

You know how it goes to the failed extension in the current context if
it fails, this patch adds:

timeout
busy
congestion

You can see the gist of how it works - you could add extra cause codes
if you wanted.

- --
Kind Regards,

Matt Riddell
Director
___

http://www.venturevoip.com (Great new VoIP end to end solution)
http://www.venturevoip.com/news.php (Daily Asterisk News - html)
http://www.venturevoip.com/newrssfeed.php (Daily Asterisk News - rss)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH3X+DDQNt8rg0Kp4RAuHPAJ9ilk1Fg5RkgYc+bkrgu54KFMN9+ACgqrVM
vMlgI/wpQv8hr3z+O5k5SPY=
=mc5a
-END PGP SIGNATURE-

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] dialstatus and cancelled calls

2008-03-13 Thread Vieri

--- Ex Vito <[EMAIL PROTECTED]> wrote:

>   ...as long as the destination does not answer
> you'll get
>   a NO ANSWER disposition.
>   So, if in your case you want to know if a user
> answered
>   the phone, then, yes, you will have to add the
> DIALSTATUS
>   value to the CDR, probably in the CDR's userfield.

Thanks.
It's surprising though. Just like queue logs are very
descriptive (you know which side hung up) I thought
CDR data would be as well as far as this detail is
concerned. But I guess it's because a queue is a
special pseudo-channel thus allowing finer logging.



  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] dialstatus and cancelled calls

2008-03-11 Thread Ex Vito
  ...as long as the destination does not answer you'll get
  a NO ANSWER disposition.

  Note, however, that "answering" can be one of:

  - Dial a phone and the user answers the phone
  - Connecting the caller to voicemail, for example,
after Dial timed out
  - Playing an IVR / sound / music
  - And more... Anything that connects the caller!

  So, if in your case you want to know if a user answered
  the phone, then, yes, you will have to add the DIALSTATUS
  value to the CDR, probably in the CDR's userfield.
--
 exvito

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] dialstatus and cancelled calls

2008-03-11 Thread Vieri

--- Vieri <[EMAIL PROTECTED]> wrote:

> According to
>
http://www.voip-info.org/wiki-Asterisk+variable+DIALSTATUS
> when a caller hangs up before the callee has time to
> pick  the phone up then DIALSTATUS should be CANCEL.
> 
> And it is.
> 
> However, the disposition field in the CDR table is
> "NO
> ANSWER".
> 
> So if I analyze the CDR data I won't be able to
> discriminate calls cancelled by the caller and calls
> not answered by the callee (timeout).
> 
> I get the same disposition value whether I use
> cdr-csv
> or MySQL via asterisk-addons.
> I'm using * 1.2.26.2.
> 
> How can I get the DIALSTATUS value to the
> disposition
> field?
> Would I have to do it manually in my dialplan via
> Set(CDR(disposition))?

I took a quick look at the 1.2 cdr source code and it
seems that there's no CANCEL state (or similar). So
there's no way of discriminating in the CDR data if a
call was aborted by the caller or it timed out on the
callee side. In both cases the disposition is "NO
ANSWER".

Am I overlooking something?



  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


[asterisk-users] dialstatus and cancelled calls

2008-03-10 Thread Vieri
According to
http://www.voip-info.org/wiki-Asterisk+variable+DIALSTATUS
when a caller hangs up before the callee has time to
pick  the phone up then DIALSTATUS should be CANCEL.

And it is.

However, the disposition field in the CDR table is "NO
ANSWER".

So if I analyze the CDR data I won't be able to
discriminate calls cancelled by the caller and calls
not answered by the callee (timeout).

I get the same disposition value whether I use cdr-csv
or MySQL via asterisk-addons.
I'm using * 1.2.26.2.

How can I get the DIALSTATUS value to the disposition
field?
Would I have to do it manually in my dialplan via
Set(CDR(disposition))?



  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] DIALSTATUS not set

2007-08-03 Thread Julian Lyndon-Smith
Oh, for god's sake.

how stupid is I am feeling :)

My brain cell is feeling very ashamed.

Julian.

James FitzGibbon wrote:
> On 8/3/07, Julian Lyndon-Smith <[EMAIL PROTECTED]> wrote:
>> why if I call the Busy or Congestion extensions, the DIALSTATUS and
>> HANGUPCAUSE variables are not set ?
>>
>> If I call (say) extension 1234 all things are set ok.
> 
> 
> I think you've answered your own question there.  The only asterisk
> application that sets DIALSTATUS is Dial().  If you grep the source, you'll
> see that the value is retrieved by some other modules (chan_sip, chan_iax,
> etc.), but only Dial() sets the value of the variable.
> 
> I assume when you say "when I call the Busy extension" you mean something
> like a SIP user whose context is "outgoing" doing an INVITE to "
> [EMAIL PROTECTED]".  If so, you're bridging a SIP call leg to an asterisk
> application, so Dial() isn't invoked and DIALSTATUS isn't set.
> 
> It might work if you did an invite to an extension that used Dial() to call
> a Local channel (e.g. Local/[EMAIL PROTECTED]), but I'm not sure how 
> DIALSTATUS
> would interact with the /n option on the local channel.
> 
> 
> 
> 
> 
> ___
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users


___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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


Re: [asterisk-users] DIALSTATUS not set

2007-08-03 Thread Jared Smith
On Fri, 2007-08-03 at 19:58 +0100, Julian Lyndon-Smith wrote:
> why if I call the Busy or Congestion extensions, the DIALSTATUS and 
> HANGUPCAUSE variables are not set ?

The DIALSTATUS channel variable is set when you call the Dial()
application.  If you don't call the Dial() application (like if you
called the Congestion extension directly in your example), then it won't
be set.

-- 
Jared Smith
Community Relations Manager
Digium, Inc.


___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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


Re: [asterisk-users] DIALSTATUS not set

2007-08-03 Thread James FitzGibbon
On 8/3/07, Julian Lyndon-Smith <[EMAIL PROTECTED]> wrote:
>
> why if I call the Busy or Congestion extensions, the DIALSTATUS and
> HANGUPCAUSE variables are not set ?
>
> If I call (say) extension 1234 all things are set ok.


I think you've answered your own question there.  The only asterisk
application that sets DIALSTATUS is Dial().  If you grep the source, you'll
see that the value is retrieved by some other modules (chan_sip, chan_iax,
etc.), but only Dial() sets the value of the variable.

I assume when you say "when I call the Busy extension" you mean something
like a SIP user whose context is "outgoing" doing an INVITE to "
[EMAIL PROTECTED]".  If so, you're bridging a SIP call leg to an asterisk
application, so Dial() isn't invoked and DIALSTATUS isn't set.

It might work if you did an invite to an extension that used Dial() to call
a Local channel (e.g. Local/[EMAIL PROTECTED]), but I'm not sure how DIALSTATUS
would interact with the /n option on the local channel.

-- 
j.
___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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

[asterisk-users] DIALSTATUS not set

2007-08-03 Thread Julian Lyndon-Smith
I'm trying to write a dialplan that will allow me to "stress" test it. I 
want to be able to dial an extension, or pretend that the extension is 
busy or out of order (so that I can see what to do)

given the dialplan snippet:

[outbound]

exten => _X.,1,NoOp(${TEST})
exten => _X.,n,Dial(SIP/${EXTEN})

exten => Busy,1,Busy(2)
exten => Busy,n,Hangup()

exten => Congestion,1,Congestion(2)
exten => Congestion,n,Hangup()

exten => NoAnswer,1,Wait(10)
exten => NoAnswer,n,Hangup()

exten => h,1,NoOp(X)
exten => h,n,NoOp(${DIALSTATUS}:${HANGUPCAUSE})

why if I call the Busy or Congestion extensions, the DIALSTATUS and 
HANGUPCAUSE variables are not set ?

If I call the NoAnswer extension, DIALSTATUS is blank and hangupcause is 
16. I presume that this is correct ?

If I call (say) extension 1234 all things are set ok.

Julian.




___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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


[asterisk-users] DIALSTATUS and HANGUPCAUSE extensions such as s-BUSY

2007-01-23 Thread Steven
exten => s,2,Goto(s-${DIALSTATUS})
ref:
http://www.voip-info.org/wiki/view/DIALSTATUS
http://www.voip-info.org/wiki-Asterisk+variable+DIALSTATUS

I also use HANGUPCAUSE in some circumstances.
exten => s,2,Goto(s-${HANGUPCAUSE})
ref:
http://www.voip-info.org/wiki/index.php?page=Asterisk+Variable+HANGUPCAUSE


-- 
-- 
Steven

http://www.glimasoutheast.org



"Barzilai Spinak" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> I've seen several examples that use extensions such as;
> s-BUSY
> s-NOANSWER
>
> etc...
>
> It's more or less evident what they do, but I've searched for some FORMAL 
> documentation everywhere and have found nothing.
> Do they work for anything else than "s-"? (I think I've seen other examples, 
> but can't find them now)
> Are they standard in any way?
> What are the allowed values after the dash?
> In which version were they introduced?
> etc...
>
> (please no replies explaining me how "s-BUSY" matches when the start 
> extension is set busy or trivial explanations like that)
>
> BarZ
>
>
> ___
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
> 



___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] Dialstatus

2006-06-06 Thread William Piper
Check out this example dialplan: http://pastebin.ca/19456
That should give you everything you need.
 
bp 
On 6/6/06, Moises Silva <[EMAIL PROTECTED]> wrote:
this is what I have, and it works on Asterisk-1.2.1[macro-sipextens]exten => s,1,Macro(validate_extension)
exten => s,2,Dial(SIP/${sipprefix}${num},${calltimeout}|${calloptions})exten => s,3,Macro(catch_dial_response,${DIALSTATUS})so, After Dial, I catch the dial response, and heres the catch macro
[macro-catch_dial_response]exten => s,1,GotoIf($[${ARG1} = NOANSWER]? 11 : 2)exten => s,2,GotoIf($[${ARG1} = CHANUNAVAIL] ? 22 : 3)exten => s,3,GotoIf($[${ARG1} = BUSY]? 33 : 4)exten => s,4,Macro(generic_handler)
exten => s,11,Macro(noanswer_handler)exten => s,22,Macro(unavail_handler)exten => s,33,Macro(busy_handler)FInally here are the 4 other macros[macro-noanswer_handler]exten => s,1,SetCDRUserField(-10/${agi_cdr_id})
exten => s,2,Set(voicemail_flags=u)exten => s,3,Playback(iss_noanswer_channel_${defaultlang})exten => s,4,Goto(loopback_ivr,s,1)[macro-unavail_handler]exten => s,1,SetCDRUserField(-11/${agi_cdr_id})
exten => s,2,Set(voicemail_flags=u)exten => s,3,GotoIf($[foo${is_exten} = foo] ? 4 : 6)exten => s,4,Playback(iss_unavailable_channel_${defaultlang})exten => s,5,Goto(loopback_ivr,s,1)exten => s,6,Playback(iss_unavailable_extension_${defaultlang})
exten => s,7,Goto(loopback_ivr,s,1)[macro-busy_handler]exten => s,1,SetCDRUserField(-12/${agi_cdr_id})exten => s,2,Set(voicemail_flags=b)exten => s,3,Playback(iss_busy_channel_${defaultlang})
exten => s,4,Goto(loopback_ivr,s,1)[macro-generic_handler]exten => s,1,SetCDRUserField(-14/${agi_cdr_id})exten => s,2,Set(voicemail_flags=u)exten => s,3,GotoIf($[foo${is_exten} = foo] ? 4 : 6)
exten => s,4,Playback(iss_unavailable_channel_${defaultlang})exten => s,5,Goto(loopback_ivr,s,1)exten => s,6,Playback(iss_unavailable_extension_${defaultlang})exten => s,7,Goto(loopback_ivr,s,1)
If you cant get it working, simply do something like this:[test]exten => _XX,1,Answer()exten => _XX,2,Dial(SIP/${EXTEN})exten => _XX,3,NoOp(${DIALSTATUS})That will tell you what status is generated.
RegardsOn 6/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:> I tried with CHANUNAVAIL but I was not successful. I want to try to call a
> SIP client. If it is not answering and cannot be found I want wo call> someone else.> How can I do that? NOANSWER and CHANUNAVAIL do not work out.> > Wether the SIP client is not registered or does not exists at all you
> > will get CHANUNAVAIL.> >> > Regards> >> > On 6/6/06, Christophorus Laube <[EMAIL PROTECTED]> wrote:> >> Hi,
> >>> >> I use an E1-Board to hand the calls over to internal SIP-Clients. My> >> Question is which Dialstatus is set when the SIP-client is unreachable.> >> I tried with NOANSWER but does not seem to be suitable.
> >> Does anyone of you have a solution?> >> In voip-info.org wiki there is a Dialstatus CHANUNAVAIL but this is> >> explained by " Channel unavailable. On SIP, peer may not be
> >> registered.". So this seems not to be right, or does it?> >> TIA, Christophorus> >>> >>> >>> >> ___
> >> --Bandwidth and Colocation provided by Easynews.com --> >>> >> Asterisk-Users mailing list> >> To UNSUBSCRIBE or update options visit:
> >>http://lists.digium.com/mailman/listinfo/asterisk-users> >>> >>> >>> >>> >
> >> > --> > "Su nombre es GNU/Linux, no solamente Linux, mas info en> > http://www.gnu.org"> > ___
> > --Bandwidth and Colocation provided by Easynews.com --> >> > Asterisk-Users mailing list> > To UNSUBSCRIBE or update options visit:> >
http://lists.digium.com/mailman/listinfo/asterisk-users>  ___> --Bandwidth and Colocation provided by 
Easynews.com -->> Asterisk-Users mailing list> To UNSUBSCRIBE or update options visit:>http://lists.digium.com/mailman/listinfo/asterisk-users
>--"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"___--Bandwidth and Colocation provided by 
Easynews.com --Asterisk-Users mailing listTo UNSUBSCRIBE or update options visit:  http://lists.digium.com/mailman/listinfo/asterisk-users

___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] Dialstatus

2006-06-06 Thread Moises Silva

this is what I have, and it works on Asterisk-1.2.1

[macro-sipextens]
exten => s,1,Macro(validate_extension)
exten => s,2,Dial(SIP/${sipprefix}${num},${calltimeout}|${calloptions})
exten => s,3,Macro(catch_dial_response,${DIALSTATUS})

so, After Dial, I catch the dial response, and heres the catch macro

[macro-catch_dial_response]
exten => s,1,GotoIf($[${ARG1} = NOANSWER]? 11 : 2)
exten => s,2,GotoIf($[${ARG1} = CHANUNAVAIL] ? 22 : 3)
exten => s,3,GotoIf($[${ARG1} = BUSY]? 33 : 4)
exten => s,4,Macro(generic_handler)
exten => s,11,Macro(noanswer_handler)
exten => s,22,Macro(unavail_handler)
exten => s,33,Macro(busy_handler)

FInally here are the 4 other macros
[macro-noanswer_handler]
exten => s,1,SetCDRUserField(-10/${agi_cdr_id})
exten => s,2,Set(voicemail_flags=u)
exten => s,3,Playback(iss_noanswer_channel_${defaultlang})
exten => s,4,Goto(loopback_ivr,s,1)

[macro-unavail_handler]
exten => s,1,SetCDRUserField(-11/${agi_cdr_id})
exten => s,2,Set(voicemail_flags=u)
exten => s,3,GotoIf($[foo${is_exten} = foo] ? 4 : 6)
exten => s,4,Playback(iss_unavailable_channel_${defaultlang})
exten => s,5,Goto(loopback_ivr,s,1)
exten => s,6,Playback(iss_unavailable_extension_${defaultlang})
exten => s,7,Goto(loopback_ivr,s,1)

[macro-busy_handler]
exten => s,1,SetCDRUserField(-12/${agi_cdr_id})
exten => s,2,Set(voicemail_flags=b)
exten => s,3,Playback(iss_busy_channel_${defaultlang})
exten => s,4,Goto(loopback_ivr,s,1)

[macro-generic_handler]
exten => s,1,SetCDRUserField(-14/${agi_cdr_id})
exten => s,2,Set(voicemail_flags=u)
exten => s,3,GotoIf($[foo${is_exten} = foo] ? 4 : 6)
exten => s,4,Playback(iss_unavailable_channel_${defaultlang})
exten => s,5,Goto(loopback_ivr,s,1)
exten => s,6,Playback(iss_unavailable_extension_${defaultlang})
exten => s,7,Goto(loopback_ivr,s,1)


If you cant get it working, simply do something like this:

[test]
exten => _XX,1,Answer()
exten => _XX,2,Dial(SIP/${EXTEN})
exten => _XX,3,NoOp(${DIALSTATUS})

That will tell you what status is generated.

Regards


On 6/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

I tried with CHANUNAVAIL but I was not successful. I want to try to call a
SIP client. If it is not answering and cannot be found I want wo call
someone else.
How can I do that? NOANSWER and CHANUNAVAIL do not work out.
> Wether the SIP client is not registered or does not exists at all you
> will get CHANUNAVAIL.
>
> Regards
>
> On 6/6/06, Christophorus Laube <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I use an E1-Board to hand the calls over to internal SIP-Clients. My
>> Question is which Dialstatus is set when the SIP-client is unreachable.
>> I tried with NOANSWER but does not seem to be suitable.
>> Does anyone of you have a solution?
>> In voip-info.org wiki there is a Dialstatus CHANUNAVAIL but this is
>> explained by " Channel unavailable. On SIP, peer may not be
>> registered.". So this seems not to be right, or does it?
>> TIA, Christophorus
>>
>>
>>
>> ___
>> --Bandwidth and Colocation provided by Easynews.com --
>>
>> Asterisk-Users mailing list
>> To UNSUBSCRIBE or update options visit:
>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>>
>>
>>
>
>
> --
> "Su nombre es GNU/Linux, no solamente Linux, mas info en
> http://www.gnu.org";
> ___
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>


___
--Bandwidth and Colocation provided by Easynews.com --

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




--
"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org";
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] Dialstatus

2006-06-06 Thread bob
I tried with CHANUNAVAIL but I was not successful. I want to try to call a
SIP client. If it is not answering and cannot be found I want wo call
someone else.
How can I do that? NOANSWER and CHANUNAVAIL do not work out.
> Wether the SIP client is not registered or does not exists at all you
> will get CHANUNAVAIL.
>
> Regards
>
> On 6/6/06, Christophorus Laube <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I use an E1-Board to hand the calls over to internal SIP-Clients. My
>> Question is which Dialstatus is set when the SIP-client is unreachable.
>> I tried with NOANSWER but does not seem to be suitable.
>> Does anyone of you have a solution?
>> In voip-info.org wiki there is a Dialstatus CHANUNAVAIL but this is
>> explained by " Channel unavailable. On SIP, peer may not be
>> registered.". So this seems not to be right, or does it?
>> TIA, Christophorus
>>
>>
>>
>> ___
>> --Bandwidth and Colocation provided by Easynews.com --
>>
>> Asterisk-Users mailing list
>> To UNSUBSCRIBE or update options visit:
>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>>
>>
>>
>
>
> --
> "Su nombre es GNU/Linux, no solamente Linux, mas info en
> http://www.gnu.org";
> ___
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>


___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] Dialstatus

2006-06-06 Thread Moises Silva

Wether the SIP client is not registered or does not exists at all you
will get CHANUNAVAIL.

Regards

On 6/6/06, Christophorus Laube <[EMAIL PROTECTED]> wrote:

Hi,

I use an E1-Board to hand the calls over to internal SIP-Clients. My
Question is which Dialstatus is set when the SIP-client is unreachable.
I tried with NOANSWER but does not seem to be suitable.
Does anyone of you have a solution?
In voip-info.org wiki there is a Dialstatus CHANUNAVAIL but this is
explained by " Channel unavailable. On SIP, peer may not be
registered.". So this seems not to be right, or does it?
TIA, Christophorus



___
--Bandwidth and Colocation provided by Easynews.com --

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







--
"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org";
___
--Bandwidth and Colocation provided by Easynews.com --

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


[Asterisk-Users] Dialstatus

2006-06-06 Thread Christophorus Laube
Hi,

I use an E1-Board to hand the calls over to internal SIP-Clients. My
Question is which Dialstatus is set when the SIP-client is unreachable.
I tried with NOANSWER but does not seem to be suitable.
Does anyone of you have a solution?
In voip-info.org wiki there is a Dialstatus CHANUNAVAIL but this is
explained by " Channel unavailable. On SIP, peer may not be
registered.". So this seems not to be right, or does it?
TIA, Christophorus

begin:vcard
fn:Christophorus Laube
n:Laube;Christophorus
org:SemanticEdge GmbH
adr:;;Kaiserin-Augusta-Allee 10-11;Berlin;;10553;Deutschland
email;internet:[EMAIL PROTECTED]
title:Systemadministrator
tel;work:+49-30-34507758
url:http://www.semanticedge.de
version:2.1
end:vcard

___
--Bandwidth and Colocation provided by Easynews.com --

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


[Asterisk-Users] Dialstatus results

2006-05-08 Thread Giordano Grandis








Hi all,

i just have a question: could i Known the state of a
SIP phone without make it a Dial ?

 

Thanks

 

Giordano






___
--Bandwidth and Colocation provided by Easynews.com --

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


RE: [Asterisk-Users] DIALSTATUS for Multiple Dialled Numbers

2006-04-08 Thread Alexander Lopez
 Sorry, It was late and I forgot about that SMALL detail!!!

Thanks for the clarification. :-) 


Alex

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Moises Silva
> Sent: Saturday, April 08, 2006 10:22 AM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [Asterisk-Users] DIALSTATUS for Multiple Dialled Numbers
> 
> When you pass several Dial strings only the last exited 
> channel DIALSTATUS is saved. In the case that 1 of the 
> channels answer, the status will be ANSWER obviously, but if 
> the second fails because of CONGESTION and the first because 
> NOANSWER, the last exited channel dial status will be set.
> 
> Regards
> 
> On 4/7/06, Alexander Lopez <[EMAIL PROTECTED]> wrote:
> > Without modifications to Dial, I don't think so.
> >
> > However,
> >
> > Dial(Local/[EMAIL PROTECTED]&Local/[EMAIL PROTECTED])
> >
> > [dialstatus]
> > _X.,1,Set(TECH=${CUT(${EXTEN},-,1)})
> > _X.,2,Set(DEVICE=${CUT(${EXTEN},-,2)})
> > _X.,3,Dial(${TECH}/${DEVICE}||)
> >
> >
> > Or something like this...
> >
> > I would also create Variable name to track each one.
> >
> >
> > >>-Original Message-
> > >>From: [EMAIL PROTECTED]
> > >>[mailto:[EMAIL PROTECTED] On Behalf Of 
> > >>Douglas Garstang
> > >>Sent: Friday, April 07, 2006 2:21 PM
> > >>To: Asterisk Users Mailing List - Non-Commercial Discussion
> > >>Subject: [Asterisk-Users] DIALSTATUS for Multiple Dialled Numbers
> > >>
> > >>Folks,
> > >>
> > >>When I have a dial string like this:
> > >>
> > >>Dial(SIP/3254101&SIP/3254102,20,tr)
> > >>
> > >>and I want to check the ${DIALSTATUS} variable after the 
> dial, how 
> > >>do I know which number I am getting the variable for?
> > >>
> > >>And, what about this?
> > >>
> > >>Dial(SIP/3254101&SIP/[EMAIL PROTECTED],20,tr)
> > >>
> > >>What happens in that case? How can I get the 
> ${DIALSTATUS} variable 
> > >>for EACH NUMBER dialled?
> > >>
> > >>Thanks,
> > >>Doug.
> > >>___
> > >>--Bandwidth and Colocation provided by Easynews.com --
> > >>
> > >>Asterisk-Users mailing list
> > >>To UNSUBSCRIBE or update options visit:
> > >>   http://lists.digium.com/mailman/listinfo/asterisk-users
> > >>
> > ___
> > --Bandwidth and Colocation provided by Easynews.com --
> >
> > Asterisk-Users mailing list
> > To UNSUBSCRIBE or update options visit:
> >http://lists.digium.com/mailman/listinfo/asterisk-users
> >
> 
> 
> --
> "Su nombre es GNU/Linux, no solamente Linux, mas info en 
> http://www.gnu.org";
> ___
> --Bandwidth and Colocation provided by Easynews.com --
> 
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
> 
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] DIALSTATUS for Multiple Dialled Numbers

2006-04-08 Thread Moises Silva
When you pass several Dial strings only the last exited channel
DIALSTATUS is saved. In the case that 1 of the channels answer, the
status will be ANSWER obviously, but if the second fails because of
CONGESTION and the first because NOANSWER, the last exited channel
dial status will be set.

Regards

On 4/7/06, Alexander Lopez <[EMAIL PROTECTED]> wrote:
> Without modifications to Dial, I don't think so.
>
> However,
>
> Dial(Local/[EMAIL PROTECTED]&Local/[EMAIL PROTECTED])
>
> [dialstatus]
> _X.,1,Set(TECH=${CUT(${EXTEN},-,1)})
> _X.,2,Set(DEVICE=${CUT(${EXTEN},-,2)})
> _X.,3,Dial(${TECH}/${DEVICE}||)
>
>
> Or something like this...
>
> I would also create Variable name to track each one.
>
>
> >>-Original Message-
> >>From: [EMAIL PROTECTED]
> >>[mailto:[EMAIL PROTECTED] On Behalf Of
> >>Douglas Garstang
> >>Sent: Friday, April 07, 2006 2:21 PM
> >>To: Asterisk Users Mailing List - Non-Commercial Discussion
> >>Subject: [Asterisk-Users] DIALSTATUS for Multiple Dialled Numbers
> >>
> >>Folks,
> >>
> >>When I have a dial string like this:
> >>
> >>Dial(SIP/3254101&SIP/3254102,20,tr)
> >>
> >>and I want to check the ${DIALSTATUS} variable after the
> >>dial, how do I know which number I am getting the variable for?
> >>
> >>And, what about this?
> >>
> >>Dial(SIP/3254101&SIP/[EMAIL PROTECTED],20,tr)
> >>
> >>What happens in that case? How can I get the ${DIALSTATUS}
> >>variable for EACH NUMBER dialled?
> >>
> >>Thanks,
> >>Doug.
> >>___
> >>--Bandwidth and Colocation provided by Easynews.com --
> >>
> >>Asterisk-Users mailing list
> >>To UNSUBSCRIBE or update options visit:
> >>   http://lists.digium.com/mailman/listinfo/asterisk-users
> >>
> ___
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>


--
"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org";
___
--Bandwidth and Colocation provided by Easynews.com --

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


RE: [Asterisk-Users] DIALSTATUS for Multiple Dialled Numbers

2006-04-07 Thread Alexander Lopez
Without modifications to Dial, I don't think so.

However,

Dial(Local/[EMAIL PROTECTED]&Local/[EMAIL PROTECTED])

[dialstatus]
_X.,1,Set(TECH=${CUT(${EXTEN},-,1)}) 
_X.,2,Set(DEVICE=${CUT(${EXTEN},-,2)})
_X.,3,Dial(${TECH}/${DEVICE}||)


Or something like this...

I would also create Variable name to track each one.


>>-Original Message-
>>From: [EMAIL PROTECTED] 
>>[mailto:[EMAIL PROTECTED] On Behalf Of 
>>Douglas Garstang
>>Sent: Friday, April 07, 2006 2:21 PM
>>To: Asterisk Users Mailing List - Non-Commercial Discussion
>>Subject: [Asterisk-Users] DIALSTATUS for Multiple Dialled Numbers
>>
>>Folks,
>>
>>When I have a dial string like this:
>>
>>Dial(SIP/3254101&SIP/3254102,20,tr)
>>
>>and I want to check the ${DIALSTATUS} variable after the 
>>dial, how do I know which number I am getting the variable for?
>>
>>And, what about this?
>>
>>Dial(SIP/3254101&SIP/[EMAIL PROTECTED],20,tr)
>>
>>What happens in that case? How can I get the ${DIALSTATUS} 
>>variable for EACH NUMBER dialled?
>>
>>Thanks,
>>Doug.
>>___
>>--Bandwidth and Colocation provided by Easynews.com --
>>
>>Asterisk-Users mailing list
>>To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>
___
--Bandwidth and Colocation provided by Easynews.com --

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


[Asterisk-Users] DIALSTATUS for Multiple Dialled Numbers

2006-04-07 Thread Douglas Garstang
Folks,

When I have a dial string like this:

Dial(SIP/3254101&SIP/3254102,20,tr)

and I want to check the ${DIALSTATUS} variable after the dial, how do I know 
which number I am getting the variable for?

And, what about this?

Dial(SIP/3254101&SIP/[EMAIL PROTECTED],20,tr)

What happens in that case? How can I get the ${DIALSTATUS} variable for EACH 
NUMBER dialled?

Thanks,
Doug.
___
--Bandwidth and Colocation provided by Easynews.com --

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


[Asterisk-Users] Dialstatus Oddity in 1.2

2006-01-21 Thread Greg Boehnlein
Hello all,
I am working on a creating some intelligent failover dial-plan 
logic and I'm running into something that I'd like some feedback on. 
Basically, it appears that if you place a call to an IAX2 peer that 
refuses the connection, or is unavailable, a NOANSWER dialstatus is 
returned.

Example:

-- Executing Macro("IAX2/cubix-19", "nocdial|IAX2/[EMAIL 
PROTECTED]/1216410") in new stack
-- Executing Dial("IAX2/cubix-19", "IAX2/[EMAIL PROTECTED]/1216410|30") 
in new stack
-- Called [EMAIL PROTECTED]/1216410
Jan 21 19:16:07 WARNING[1114]: chan_iax2.c:6970 socket_read: Call rejected by 
207.166.192.188: No authority found
-- Hungup 'IAX2/pbx1-21'
  == No one is available to answer at this time (1:0/0/0)
-- Executing Goto("IAX2/cubix-19", "s-NOANSWER|1") in new stack
-- Goto (macro-nocdial,s-NOANSWER,1)
-- Executing Hangup("IAX2/cubix-19", "") in new stack
-- Hungup 'IAX2/cubix-19'

Shouldn't that return CONGESTION instead? I thought that NOANSWER was 
reserved for calls that reach app_dial's timeout limit?

Or am I just missing something simple?

Here is the relevant extensions.conf logic that I am using

[e164]
; Dundi
exten => _1NXXNXX,1,Macro(dundi-e164,${EXTEN})
; Dispatch First Trunk
exten => _1NXXNXX,2,Macro(nocdial,${TRUNK}/${EXTEN})
exten => _1NXXNXX,3,ResetCDR
; On Failure, Dispatch Second Trunk
exten => _1NXXNXX,4,Macro(nocdial,${TRUNK2}/${EXTEN})
exten => _1NXXNXX,5,ResetCDR
; Third time is a charm?
exten => _1NXXNXX,6,Macro(nocdial,${TRUNK3}/${EXTEN})

[macro-nocdial]
exten => s,1,Dial(${ARG1},30)
exten => s,2,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Hangup
exten => s-BUSY,1,Busy(15)
exten => s-BUSY,2,Hangup
exten => s-CONGESTION,1,NoOp
exten => s-CHANUNAVAIL,1,NoOp
exten => s-.,1,Goto(s-NOANSWER,1)

-- 
Vice President of N2Net, a New Age Consulting Service, Inc. Company
 http://www.n2net.net Where everything clicks into place!
 KP-216-121-ST



___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] DIALSTATUS

2005-11-29 Thread Benoît Mérouze

Code Lover wrote:

Hi all,

How i can call my perl agi script when the call is hungup. Because i
am making some external Cdr calculation.
  


Hi M. Lover,

There are two solutions for you:
- You can call an AGI on hangup by using the extension 'h' : exten => 
h,1,DeadAGI(myagi.agi)
- If you're using the Asterisk::AGI interface, you can catch the hangup 
in your perl program. Have a look at 
http://www.voip-info.org/wiki/view/Asterisk+perl+agi in the Callbacks 
section.
(Asterisk::Manager also provides the method setcallback() and you can 
catch typed callback like 'Hungup' or 'DEFAULT' but I have not tried it).


Regards,
Benoit

--
Benoit Merouze
Ingenieur Developpement d'Application Reseau
[EMAIL PROTECTED]

___
--Bandwidth and Colocation provided by Easynews.com --

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


[Asterisk-Users] DIALSTATUS

2005-11-29 Thread Code Lover
Hi all,

How i can call my perl agi script when the call is hungup. Because i
am making some external Cdr calculation.
--
Best Regards,
Abdul Lateef Khan
Computer Programmer
Mobile No. : +974 - 5405022
ICQ : 276-994-704
YM! : [EMAIL PROTECTED]
MSN : [EMAIL PROTECTED]
Google Talk : [EMAIL PROTECTED]
___
--Bandwidth and Colocation provided by Easynews.com --

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


[Asterisk-Users] DIALSTATUS

2005-11-29 Thread Code Lover
Hi all,

I would like to run my perl agi script when the call is hungup. I did
one script to calculate calling balance and duration.

I made one timer Where the dialstaus is Answered But i am am in
confiuse how i can stop my timer when the dialstus will be hangup.

Please give me an advice to solve my problem.

--
Best Regards,
Code Lover
Computer Programmer
Mobile No. : +974 - 5405022
ICQ : 276-994-704
YM! : [EMAIL PROTECTED]
MSN : [EMAIL PROTECTED]
Google Talk : [EMAIL PROTECTED]
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] ${DIALSTATUS} problems

2005-09-20 Thread trixter http://www.0xdecafbad.com
On Wed, 2005-09-21 at 14:36 +1000, Mark Edwards wrote:
> terminating asterices. (Is that the plural of asterisk?) 

I propose asterii, while by no means gramatically correct it wont fall
under potential sue happy lawyers who own the unix trademark (after all
the plural there is unices).  oh no I said unix and didnt credit anyone
or pay royalties.   They are gonna get me now.  :P


-- 
Trixter http://www.0xdecafbad.com Bret McDanel
UK +44 870 340 4605   Germany +49 801 777 555 3402
US +1 360 207 0479 or +1 516 687 5200
FreeWorldDialup: 635378


signature.asc
Description: This is a digitally signed message part
___
--Bandwidth and Colocation sponsored by Easynews.com --

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

Re: [Asterisk-Users] ${DIALSTATUS} problems

2005-09-20 Thread Mark Edwards
Have come to a solution on this, and as I suspected, the issue appears
to be a bit of a version mismatch between terminating asterices. (Is
that the plural of asterisk?) Anyway, to cut a long story short, I
tested with another provider, found that they were running a later
version (nearer CVS-HEAD) and started to see some useful data in the
CAUSE CODE coming back in the IAX stream on hangup. Fortunately, this
is finding its way into the ${HANGUPCAUSE} variable, so I am now able
to implement this in the dialplan.

cheers,

Mark.On 9/21/05, Liu Peter <[EMAIL PROTECTED]> wrote:
I met same problem when dial via zap channel.Does anyone know how to solve it?thanks.2005/9/15, Mark Edwards <[EMAIL PROTECTED]>:> Hi.
>> I'm dialling two numbers - one that's unobtainable, one that's busy.>> ${DIALSTATUS} is coming back ANSWER each time right before the channels hang> up.>> Am using the following dialplan macro to dial out.
>> [macro-advdial]> exten => s,1,Dial(${ARG1},20,g) ; Ring the interface, 20 seconds maximum> exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status> (NOANSWER,BUSY,CHANUNAVAIL
> ,CONGESTION,ANSWER)> exten => s-CHANUNAVAIL,1,NoOp("CHANUNAVAIL")> exten =>> s-CHANUNAVAIL,2,UserEvent(ChannelUnavailable|Account:> ${ACCOUNTCODE}^${CALLERIDNUM})> exten => s-CONGESTION,1,NoOp("CONGESTION")
> exten => s-CONGESTION,2,UserEvent(Congestion|Account:> ${ACCOUNTCODE}^${CALLERIDNUM})> exten => s-ANSWER,1,NoOp("ANSWER")> exten => s-ANSWER,2,UserEvent(Answer|Account:
> ${ACCOUNTCODE}^${CALLERIDNUM})> exten => s-BUSY,1,NoOp("BUSY")> exten => s-BUSY,2,UserEvent(Busy|Account:> ${ACCOUNTCODE}^${CALLERIDNUM})> exten => s-NOANSWER,1,NoOp("NOANSWER")
> exten => s-NOANSWER,2,UserEvent(NoAnswer|Account:> ${ACCOUNTCODE}^${CALLERIDNUM})> exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer>> Outbound calls are made using Manager originate interface from a meetme room
> channel Local/4000/n where 4000 is an extension which accesses the meetme> room.>> ITSP is terminating outbound calls to me via IAX2.>> I need to be able to see the CAUSE CODE status of the call if it is
> answered, CONGESTED or BUSY.>> my ITSP is in Australia - as am I.>> the IAX2 debug clearly indicates a zero CAUSE CODE on most call cases.>> Any idea what I might be able to do to make the CAUSE CODE a little more
> meaningful?>> Also, does ${DIALSTATUS} or ${HANGUPCAUSE} work better on PRI?>> Cheers,>> Mark.>> --> regards,>> Mark P. Edwards> FWD: 667917
>> ___> --Bandwidth and Colocation sponsored by Easynews.com -->> Asterisk-Users mailing list> 
Asterisk-Users@lists.digium.com> http://lists.digium.com/mailman/listinfo/asterisk-users> To UNSUBSCRIBE or update options visit:
>> http://lists.digium.com/mailman/listinfo/asterisk-users>>-- regards,
Mark P. EdwardsFWD: 667917
___
--Bandwidth and Colocation sponsored by Easynews.com --

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

Re: [Asterisk-Users] ${DIALSTATUS} problems

2005-09-20 Thread Liu Peter
I met same problem when dial via zap channel.
Does anyone know how to solve it?
thanks.


2005/9/15, Mark Edwards <[EMAIL PROTECTED]>:
> Hi.
> 
> I'm dialling two numbers - one that's unobtainable, one that's busy.
> 
> ${DIALSTATUS} is coming back ANSWER each time right before the channels hang
> up.
> 
> Am using the following dialplan macro to dial out.
> 
> [macro-advdial]
> exten => s,1,Dial(${ARG1},20,g) ; Ring the interface, 20 seconds maximum
> exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status
> (NOANSWER,BUSY,CHANUNAVAIL 
> ,CONGESTION,ANSWER)
> exten => s-CHANUNAVAIL,1,NoOp("CHANUNAVAIL")
> exten =>
> s-CHANUNAVAIL,2,UserEvent(ChannelUnavailable|Account:
> ${ACCOUNTCODE}^${CALLERIDNUM})
> exten => s-CONGESTION,1,NoOp("CONGESTION")
> exten => s-CONGESTION,2,UserEvent(Congestion|Account:
> ${ACCOUNTCODE}^${CALLERIDNUM})
> exten => s-ANSWER,1,NoOp("ANSWER")
> exten => s-ANSWER,2,UserEvent(Answer|Account:
> ${ACCOUNTCODE}^${CALLERIDNUM})
> exten => s-BUSY,1,NoOp("BUSY")
> exten => s-BUSY,2,UserEvent(Busy|Account:
> ${ACCOUNTCODE}^${CALLERIDNUM})
> exten => s-NOANSWER,1,NoOp("NOANSWER")
> exten => s-NOANSWER,2,UserEvent(NoAnswer|Account:
> ${ACCOUNTCODE}^${CALLERIDNUM})
> exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer
> 
> Outbound calls are made using Manager originate interface from a meetme room
> channel Local/4000/n where 4000 is an extension which accesses the meetme
> room.
> 
> ITSP is terminating outbound calls to me via IAX2.
> 
> I need to be able to see the CAUSE CODE status of the call if it is
> answered, CONGESTED or BUSY.
> 
> my ITSP is in Australia - as am I.
> 
> the IAX2 debug clearly indicates a zero CAUSE CODE on most call cases.
> 
> Any idea what I might be able to do to make the CAUSE CODE a little more
> meaningful?
> 
> Also, does ${DIALSTATUS} or ${HANGUPCAUSE} work better on PRI?
> 
> Cheers,
> 
> Mark.
> 
> -- 
> regards,
> 
> Mark P. Edwards
> FWD: 667917
> 
> ___
> --Bandwidth and Colocation sponsored by Easynews.com --
> 
> Asterisk-Users mailing list
> Asterisk-Users@lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>  
> http://lists.digium.com/mailman/listinfo/asterisk-users
> 
>
___
--Bandwidth and Colocation sponsored by Easynews.com --

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


Re: [Asterisk-Users] ${DIALSTATUS} problems

2005-09-20 Thread Joan Bautista
I'm not expert on this matter,but base on experience that is a normal situation on SIP/IAX channels since the call made is answered by the other end regardless of the situation you might found.
I'm on PRI ISDN and for me dialstatus and hangupcause works pretty good.
Regards
Jb 
On 9/15/05, Mark Edwards <[EMAIL PROTECTED]> wrote:
Hi.I'm dialling two numbers - one that's unobtainable, one that's busy.${DIALSTATUS} is coming back ANSWER each time right before the channels hang up.
Am using the following dialplan macro to dial out.[macro-advdial]exten => s,1,Dial(${ARG1},20,g) ; Ring the interface, 20 seconds maximumexten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL 
,CONGESTION,ANSWER)exten => s-CHANUNAVAIL,1,NoOp("CHANUNAVAIL")exten => s-CHANUNAVAIL,2,UserEvent(ChannelUnavailable|Account: ${ACCOUNTCODE}^${CALLERIDNUM})exten => s-CONGESTION,1,NoOp("CONGESTION")
exten => s-CONGESTION,2,UserEvent(Congestion|Account: ${ACCOUNTCODE}^${CALLERIDNUM})exten => s-ANSWER,1,NoOp("ANSWER")exten => s-ANSWER,2,UserEvent(Answer|Account: ${ACCOUNTCODE}^${CALLERIDNUM})
exten => s-BUSY,1,NoOp("BUSY")exten => s-BUSY,2,UserEvent(Busy|Account: ${ACCOUNTCODE}^${CALLERIDNUM})exten => s-NOANSWER,1,NoOp("NOANSWER")exten => s-NOANSWER,2,UserEvent(NoAnswer|Account: ${ACCOUNTCODE}^${CALLERIDNUM})
exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answerOutbound calls are made using Manager originate interface from a meetme room channel Local/4000/n where 4000 is an extension which accesses the meetme room.
ITSP is terminating outbound calls to me via IAX2.I need to be able to see the CAUSE CODE status of the call if it is answered, CONGESTED or BUSY.my ITSP is in Australia - as am I.the IAX2 debug clearly indicates a zero CAUSE CODE on most call cases.
Any idea what I might be able to do to make the CAUSE CODE a little more meaningful?Also, does ${DIALSTATUS} or ${HANGUPCAUSE} work better on PRI?Cheers,Mark.
-- regards,Mark P. EdwardsFWD: 667917___--Bandwidth and Colocation sponsored by 
Easynews.com --Asterisk-Users mailing listAsterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-usersTo UNSUBSCRIBE or update options visit:  
http://lists.digium.com/mailman/listinfo/asterisk-users
___
--Bandwidth and Colocation sponsored by Easynews.com --

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

[Asterisk-Users] ${DIALSTATUS} problems

2005-09-15 Thread Mark Edwards
Hi.



I'm dialling two numbers - one that's unobtainable, one that's busy.



${DIALSTATUS} is coming back ANSWER each time right before the channels hang up.



Am using the following dialplan macro to dial out.



[macro-advdial]

exten => s,1,Dial(${ARG1},20,g) ; Ring the interface, 20 seconds maximum

exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL
,CONGESTION,ANSWER)
exten => s-CHANUNAVAIL,1,NoOp("CHANUNAVAIL")
exten => s-CHANUNAVAIL,2,UserEvent(ChannelUnavailable|Account: ${ACCOUNTCODE}^${CALLERIDNUM})
exten => s-CONGESTION,1,NoOp("CONGESTION")
exten => s-CONGESTION,2,UserEvent(Congestion|Account: ${ACCOUNTCODE}^${CALLERIDNUM})
exten => s-ANSWER,1,NoOp("ANSWER")
exten => s-ANSWER,2,UserEvent(Answer|Account: ${ACCOUNTCODE}^${CALLERIDNUM})
exten => s-BUSY,1,NoOp("BUSY")
exten => s-BUSY,2,UserEvent(Busy|Account: ${ACCOUNTCODE}^${CALLERIDNUM})
exten => s-NOANSWER,1,NoOp("NOANSWER")
exten => s-NOANSWER,2,UserEvent(NoAnswer|Account: ${ACCOUNTCODE}^${CALLERIDNUM})
exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer

Outbound calls are made using Manager originate interface from a meetme
room channel Local/4000/n where 4000 is an extension which accesses the
meetme room.

ITSP is terminating outbound calls to me via IAX2.

I need to be able to see the CAUSE CODE status of the call if it is answered, CONGESTED or BUSY.

my ITSP is in Australia - as am I.

the IAX2 debug clearly indicates a zero CAUSE CODE on most call cases.

Any idea what I might be able to do to make the CAUSE CODE a little more meaningful?

Also, does ${DIALSTATUS} or ${HANGUPCAUSE} work better on PRI?

Cheers,

Mark.
-- regards,Mark P. EdwardsFWD: 667917
___
--Bandwidth and Colocation sponsored by Easynews.com --

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

Re: [Asterisk-Users] DIALSTATUS for Originate

2005-08-29 Thread Stefan Reuter
On Sun, 2005-08-28 at 12:45 -0700, Geoff Karl wrote:
> If you are using Async and the action ID for some reason the Event:
> Newstate doesn't respond with the ActionID, but only a automatically
> generated "Uniqueid".

When using Async you receive an OriginateSuccess or OriginateFailure
event.
These events contain the proper ActionID (i.e. the one you set with the
Originate action) and they contain an integer field reason, that
indicates the reason for the failure.

=Stefan

___
--Bandwidth and Colocation sponsored by Easynews.com --

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


Re: [Asterisk-Users] DIALSTATUS for Originate

2005-08-28 Thread Geoff Karl
On 28 Aug 2005 10:35:34 -, saket  setu <[EMAIL PROTECTED]> wrote:
> 
> 
>
>  Hi all,
>  I am from India and has been recently using asterisk for testing and 
> enahncing my telephony knowledge. I am trying to use the originate Command 
> from the Asterisk manager on both SIP and ZAP. The command works successfully 
> but does not return any DIALSTATUS such as BUSY,ANSWER,NOANSWER as in case of 
> command DIAL when used from the dial plan. Can some one guide me how to get 
> the vaue of $DIALSTUATUS on originate or is there some other way to trap the 
> status both on SIP and ZAP.
>  
>  I have also tried to write a dial plan in a manner such that i originate a 
> call to my internal extension and jump to a context in the dial plan and 
> execute the Dial command and trap all the statuses but this also does not 
> work and it straight away bridges my internal extension to the external call 
> without returning any dial status.
>  
>  Here is the example of what i did:
>  1. Originate:
>  Action: Originate
>  Channel: SIP/201 (Internal extension)
>  Context: Airtel
>  Extension: 26191341(External PSTN Number)
>  Priority: 1
>  
>  2. Dial Plan :
>  [AIRTEL]
>  exten => _XX.,1,Dial(SIP/${ETEN},15,t)
>  exten => _XX.,2,NoOp(${DIALSTATUS})
>  exten => _XX.,3,Goto(_XX.-${DIALSTATUS},1)
>  exten => _XX.-Busy,1,Hangup
>  exten => _XX.-NOANSWER,1,Hangup
>  exten => _XX.-ANSWER,1,Goto(s,1)
>  exten => s,1,Queue(Airtel|r|||300)
>  
>  thanks
>  Saket 

Stefan Tichy Wrote:

Response: Success
Message: Originate successfully queued

Indeed this response to a originate manager command is not what you
may have expected. You can listen to the events provided by the
manager interface and wait for something like this:

Event: Newstate
Channel: SIP/201-
State: Up

--


If you are using Async and the action ID for some reason the Event:
Newstate doesn't respond with the ActionID, but only a automatically
generated "Uniqueid".

Any ideas on how to determine which ActionID is being returned?

Thanks,

Geoff
___
--Bandwidth and Colocation sponsored by Easynews.com --

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


[Asterisk-Users] DIALSTATUS for Originate Command

2005-08-28 Thread saket setu

  
Hi all,
I am sending the mail again as there was some mistake in the dial plan in the last mail send:

I am from India and has been recently using asterisk for testing and enahncing my telephony knowledge. I am trying to use the originate Command from the Asterisk manager on both SIP and ZAP. The command works successfully but does not return any DIALSTATUS such as BUSY,ANSWER,NOANSWER as in case of command DIAL when used from the dial plan. Can some one guide me how to get the vaue of $DIALSTUATUS on originate or is there some other way to trap the status both on SIP and ZAP.

I have also tried to write a dial plan in a manner such that i originate a call to my internal extension and jump to a context in the dial plan and execute the Dial command and trap all the statuses but this also does not work and it straight away bridges my internal extension to the external call without returning any dial status.

Here is the example of what i did:
1. Originate:
Action: Originate
Channel: SIP/201 (Internal extension)
Context: Airtel
Extension: 26191341(External PSTN Number)
Priority: 1

2. Dial Plan :
[AIRTEL]
exten => _XX.,1,Dial(ZAP/${EXTEN},15,t)
exten => _XX.,2,NoOp(${DIALSTATUS})
exten => _XX.,3,Goto(_XX.-${DIALSTATUS},1)
exten => _XX.-Busy,1,Hangup
exten => _XX.-NOANSWER,1,Hangup
exten => _XX.-ANSWER,1,Goto(s,1)
exten => s,1,Queue(Airtel|r|||300)




___
--Bandwidth and Colocation sponsored by Easynews.com --

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

[Asterisk-Users] DIALSTATUS for Originate

2005-08-28 Thread saket setu

  
Hi all,
I am from India and has been recently using asterisk for testing and enahncing my telephony knowledge. I am trying to use the originate Command from the Asterisk manager on both SIP and ZAP. The command works successfully but does not return any DIALSTATUS such as BUSY,ANSWER,NOANSWER as in case of command DIAL when used from the dial plan. Can some one guide me how to get the vaue of $DIALSTUATUS on originate or is there some other way to trap the status both on SIP and ZAP.

I have also tried to write a dial plan in a manner such that i originate a call to my internal extension and jump to a context in the dial plan and execute the Dial command and trap all the statuses but this also does not work and it straight away bridges my internal extension to the external call without returning any dial status.

Here is the example of what i did:
1. Originate:
Action: Originate
Channel: SIP/201 (Internal extension)
Context: Airtel
Extension: 26191341(External PSTN Number)
Priority: 1

2. Dial Plan :
[AIRTEL]
exten => _XX.,1,Dial(SIP/${ETEN},15,t)
exten => _XX.,2,NoOp(${DIALSTATUS})
exten => _XX.,3,Goto(_XX.-${DIALSTATUS},1)
exten => _XX.-Busy,1,Hangup
exten => _XX.-NOANSWER,1,Hangup
exten => _XX.-ANSWER,1,Goto(s,1)
exten => s,1,Queue(Airtel|r|||300)

thanks
Saket



___
--Bandwidth and Colocation sponsored by Easynews.com --

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

Re: [Asterisk-Users] ${DIALSTATUS}

2005-04-01 Thread Cirelle Internet Products
Manuel Schroeder wrote:
Hi list,
I try to explore making use of the variable ${DIALSTATUS} for
auto-answering purposes an similar.
On my asterisk box this does not work because ${DIALSTATUS} always
returns empty :(
Didn't find much in the web on this issue.
Can someone help?
regards Manuel
___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users
 

It is my understanding, ${DIALSTATUS} is only filled when a
Dial command is initiated.  or maybe I am misunderstanding your question
Regards
g
___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[Asterisk-Users] ${DIALSTATUS}

2005-04-01 Thread Manuel Schroeder
Hi list,

I try to explore making use of the variable ${DIALSTATUS} for
auto-answering purposes an similar.

On my asterisk box this does not work because ${DIALSTATUS} always
returns empty :(

Didn't find much in the web on this issue.

Can someone help?

regards Manuel

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


Re: [Asterisk-Users] DIALSTATUS with X100P

2005-02-27 Thread Rich Adamson
> I'm having an issue with my current configuration.  I have a single
> PSTN line connected to an X100P and a couple IAX trunks to NuFone and
> VoipJet.  When I make an outbound call it doesn't properly detect if
> my PSTN line is in use with another call and then overflow to my
> outbound IAX connections.  I think the root cause is that DIALSTATUS
> gets reported as BUSY instead of CHANUNAVAIL.  I don't want simply
> change the logic in my dialplan to try the IAX on a DIALSTATUS=BUSY
> because then a truely busy destination number would get treated the
> same as a my PSTN being in use.

Is the x100p pstn line busy because another asterisk-based call is
in progress, or, are you trying to detect a busy when a bridged analog
phone is using the shared pstn line?

In the first case, there has been lots of postings relative to how
to determine when asterisk has the x100p/tdm line in use. As I recall,
setgroup was one keyword associated with it. Another way is to keep
track of call counts, writing the count via dbput and checking its
value via dbget. But, covering the hangup (and decrementing the
count) might take a little effort to cover every possible event.

In the second case, asterisk does not contain any code that would
reliably detect whether an analog phone bridged on the pstn line is
in use.


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


[Asterisk-Users] DIALSTATUS with X100P

2005-02-27 Thread John Kapp
I'm having an issue with my current configuration.  I have a single
PSTN line connected to an X100P and a couple IAX trunks to NuFone and
VoipJet.  When I make an outbound call it doesn't properly detect if
my PSTN line is in use with another call and then overflow to my
outbound IAX connections.  I think the root cause is that DIALSTATUS
gets reported as BUSY instead of CHANUNAVAIL.  I don't want simply
change the logic in my dialplan to try the IAX on a DIALSTATUS=BUSY
because then a truely busy destination number would get treated the
same as a my PSTN being in use.

Then again, I could be looking at this all wrong...

Thanks for any help,
John
___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[Asterisk-Users] DIALSTATUS missing an important condition?

2004-12-12 Thread chris vince
I have recently built my first asterisk system and am very impressed with 
its capabilities.

However, I have run into one problem that hopefully someone can help me 
with.

I am trying to use the DIALSTATUS function to route incoming calls to the 
appropriate Voice Mail (busy or unavailable) or to an Unavailable Number 
recording if the number is not assigned.

However, I find that DIALSTATUS seems to generate an CHANUNAVAIL status for 
any 1 of 2 conditions:
1) the dialled user is not logged in (and hence no channel) or
2) the dialled user does not exist at all (ie the number is not assigned in 
sip.conf) (and hence no channel)

Obviously for condition 1 the call should be sent to VM unavailable, whereas 
for condition 2 I would like to send it to a "number you have dialled is not 
in service" recording - with no Voice Mail involved.

I have managed to get this scenario working but I don't think my solution is 
very elegant or even correct (although it seems to work).

Here are the relevant parts of my extensions.conf. My VM box numbers are 
exactly the same as the phone number so I only use ARG1 in the macro. (2000 
= 2000 etc.). I only have SIP phones at the moment and they are all 
allocated in the 20XX numbering range.

[altea_extensions]
;This is a "catchall" for any 4 digit number dialled starting with "20"
;Using it removes the need to provide a routing plan for each phone
exten => _20XX,1,ResponseTimeout,1	; Response Timeout for non working 
numbers
exten => _20XX,2,Macro(stdexten_sip,${EXTEN})	;send to macro for processing

;following is needed if an extension is unassigned (ie not datafilled) 
because
;DIALSTATUS cannot (?) differentiate between an unassigned # or 1 that is 
not answered or not logged in
;an unassigned (non working number) causes a timeout in the std-extn macro 
and it drops back here
;where I provide a "not in service" recording

exten => t,1,Macro(not_in_service);send to "number not in service" 
recording
exten => t,2,Hangup

[macro-stdexten_sip]
; Standard extension macro for SIP phones (modified):
;   ${ARG1} = Dialled number
;
exten => s,1,Dial(SIP/${ARG1},20,tT)		; Ring the interface, 20 secs maximum
exten => s,2,Goto(s-${DIALSTATUS},1); Jump on Status 
(NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
exten => s-NOANSWER,1,Voicemail(u${ARG1})	; no answer = unavailable
exten => s-BUSY,1,Voicemail(b${ARG1})		; busy
exten => s-CHANUNAVAIL,1,Voicemail(u${ARG1})	;no channel (not logged in) = 
unavailable
exten => s-CONGESTION,1,Macro(120_ipm)	;Don't know what this is but will 
include anyway

Am I missing something here or should there be another condition such as 
"Unassigned"? Asterisk seems to know that the number is unassigned because 
it writes a "No such host" message into the log. Is there any way of 
trapping this message in Call Processing to route this call correctly?

Or am I getting to deep here and there's a real simple way to do it that 
I've missed?

chris
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] DIALSTATUS weirdness (CHANUNAVAIL instead of BUSY, NOANSWER instead of CHANUNAVAIL)

2004-12-04 Thread Andrew Kohlsmith
On December 4, 2004 08:43 am, Rich Adamson wrote:
> Looks like the command is documented in the current config samples.

Yeah I see that now.  :-)

> Since the comments use words like "doesn't work with all telcos",
> could this have something to do with detecting busy when a call
> reaches a destination lurking behind an analog system? (eg, pri
> call placed to a DID number on an analog pbx where the d channel
> isn't aware of the destination's status?)

Yeah but from the config:

; PRI Out of band indications.
; Enable this to report Busy and Congestion on a PRI using out-of-band
; notification. Inband indication, as used by Asterisk doesn't seem to work
; with all telcos.
;
; outofband:  Signal Busy/Congestion out of band with RELEASE/DISCONNECT
; inband: Signal Busy/Congestion using in-band tones
;
; priindication = outofband

This seems to be for * notifying the PRI, not the other way around.  i.e. if 
someone calls me and I'm busy, not me calling out to a busy POTS line.

-A.
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] DIALSTATUS weirdness (CHANUNAVAIL instead of BUSY, NOANSWER instead of CHANUNAVAIL)

2004-12-04 Thread Peter Svensson
On Sat, 4 Dec 2004, Rich Adamson wrote:

> > The mind boggles -- PRI is *always* out of band.
> 
> Looks like the command is documented in the current config samples.
> 
> I'm not knowledgable/experienced (as yet) on where it is actually used,
> but just reading the comments in the config sample led me question the
> writers use of the terms inband and outofband relative to a pri.
> 
> Since the comments use words like "doesn't work with all telcos", 
> could this have something to do with detecting busy when a call
> reaches a destination lurking behind an analog system? (eg, pri 
> call placed to a DID number on an analog pbx where the d channel
> isn't aware of the destination's status?)

>From what I can see the only thing it changes is that the "Busy" and 
"Congestion" applications / indications from other sources send audio 
signals using the normally opened reverse path from the B subscriber to 
the A subscriber before the channel is answered. It may be used by Dial as 
well, I have not checked.

With the priindication = outofband those situations will send an isdn
release with the specified code. This can also be achieved by setting the
PRI_CAUSE variable prior to calling Hangup().

Peter


___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] DIALSTATUS weirdness (CHANUNAVAIL instead of BUSY, NOANSWER instead of CHANUNAVAIL)

2004-12-04 Thread Rich Adamson
> On December 3, 2004 03:36 pm, Andrew Kohlsmith wrote:
> > exten => 1234,1,Dial(Zap/g1/5551234,,g)
> > exten => 1234,n,NoOp(HANGUPCAUSE is ${HANGUPCAUSE} and DIALSTATUS is
> > ${DIALSTATUS})
> >
> > Why, if 5551234 is busy, is DIALSTATUS set to CHANUNAVAIL?  Should it not
> > be BUSY?
> 
> Brian West pointed me at chan_zap.c where there is a configuration parameter 
> called "priindication" which can be used to set the pri indication to inband 
> or out of band, defaulting to out of band.
> 
> I have set priindication=outofband in zapata.conf, now I will test this later 
> but it looks like it will work.
> 
> Posting a new thread now in -dev as to why the blue f*ck there is a pri 
> inband 
> configuration option that is 
> 
> a) undocumented and 
> b) defaults to inband
> 
> The mind boggles -- PRI is *always* out of band.

Looks like the command is documented in the current config samples.

I'm not knowledgable/experienced (as yet) on where it is actually used,
but just reading the comments in the config sample led me question the
writers use of the terms inband and outofband relative to a pri.

Since the comments use words like "doesn't work with all telcos", 
could this have something to do with detecting busy when a call
reaches a destination lurking behind an analog system? (eg, pri 
call placed to a DID number on an analog pbx where the d channel
isn't aware of the destination's status?)


___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] DIALSTATUS weirdness (CHANUNAVAIL instead of BUSY, NOANSWER instead of CHANUNAVAIL)

2004-12-03 Thread Andrew Kohlsmith
On December 3, 2004 03:36 pm, Andrew Kohlsmith wrote:
> exten => 1234,1,Dial(Zap/g1/5551234,,g)
> exten => 1234,n,NoOp(HANGUPCAUSE is ${HANGUPCAUSE} and DIALSTATUS is
> ${DIALSTATUS})
>
> Why, if 5551234 is busy, is DIALSTATUS set to CHANUNAVAIL?  Should it not
> be BUSY?

Brian West pointed me at chan_zap.c where there is a configuration parameter 
called "priindication" which can be used to set the pri indication to inband 
or out of band, defaulting to out of band.

I have set priindication=outofband in zapata.conf, now I will test this later 
but it looks like it will work.

Posting a new thread now in -dev as to why the blue f*ck there is a pri inband 
configuration option that is 

a) undocumented and 
b) defaults to inband

The mind boggles -- PRI is *always* out of band.

-A.
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[Asterisk-Users] DIALSTATUS weirdness (CHANUNAVAIL instead of BUSY, NOANSWER instead of CHANUNAVAIL)

2004-12-03 Thread Andrew Kohlsmith
Just throwing this out here, hopefully someone can tell me why.

*CLI> show version
Asterisk CVS-HEAD-11/17/04-10:16:38 built by [EMAIL PROTECTED] on a i686 
running 
Linux

Zap/g1 is pri_cpe to Bell Canada
5551234 is a normal POTS line I have busied out (handset offhook)

exten => 1234,1,Dial(Zap/g1/5551234,,g)
exten => 1234,n,NoOp(HANGUPCAUSE is ${HANGUPCAUSE} and DIALSTATUS is 
${DIALSTATUS})

Why, if 5551234 is busy, is DIALSTATUS set to CHANUNAVAIL?  Should it not be 
BUSY?

And now with IAX2 (I am using a user:pass that is purposely invalid):

exten => 1234,1,Dial(IAX2/user:[EMAIL PROTECTED]/${EXTEN})
exten => 1234,n,NoOp(HANGUPCAUSE is ${HANGUPCAUSE} and DIALSTATUS is 
${DIALSTATUS})

DIALSTATUS is NOANSWER instead of CHANUNAVAIL ... huh??

Is there a logical reasoning for this?

-A.
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[Asterisk-Users] DIALSTATUS variable and oh323 channel

2004-07-11 Thread Oleg A. Arkhangelsky
Hello All,

Just a very simple example. I'm trying to make a call to
a busy phone number using Dial application.

-- H.323 call to 12345 with codec ALAW
-- Called 12345
-- OH323/L5663 is ringing
-- H.323 call 'ip$localhost/5663' cleared, reason 18
(Remote endpoint is busy)
-- Hungup 'OH323/L5663'

Everything is fine - "Remote endpoint is busy". But then,
when i'm trying to look into the DIALSTATUS variable, i see
"NOANSWER" value. Why?

Thanks!

--
wbr, Oleg

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users