[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
?php
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: 
SIP/10036-0096AGI Tx  agi_channel: SIP/10036-0096
SIP/10036-0096AGI Tx  agi_language: en
SIP/10036-0096AGI Tx  agi_type: SIP
SIP/10036-0096AGI Tx  agi_uniqueid: 1322848927.172
SIP/10036-0096AGI Tx  agi_version: 1.6.2.7
SIP/10036-0096AGI Tx  agi_callerid: 10036
SIP/10036-0096AGI Tx  agi_calleridname: 10036
SIP/10036-0096AGI Tx  agi_dnid: 0012127773456
SIP/10036-0096AGI Tx  agi_rdnis: unknown
SIP/10036-0096AGI Tx  agi_context: privoip
SIP/10036-0096AGI Tx  agi_extension: 0012127773456
SIP/10036-0096AGI Rx  GET VARIABLE DIALSTATUS
SIP/10036-0096AGI Tx  200 result=1 (ANSWER)
SIP/10036-0096AGI Rx  VERBOSE Status 1
SIP/10036-0096AGI 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 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 kamlesh_...@hotmail.comwrote:

  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
 ?php
 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:
 SIP/10036-0096AGI Tx  agi_channel: SIP/10036-0096
 SIP/10036-0096AGI Tx  agi_language: en
 SIP/10036-0096AGI Tx  agi_type: SIP
 SIP/10036-0096AGI Tx  agi_uniqueid: 1322848927.172
 SIP/10036-0096AGI Tx  agi_version: 1.6.2.7
 SIP/10036-0096AGI Tx  agi_callerid: 10036
 SIP/10036-0096AGI Tx  agi_calleridname: 10036
 SIP/10036-0096AGI Tx  agi_dnid: 0012127773456
 SIP/10036-0096AGI Tx  agi_rdnis: unknown
 SIP/10036-0096AGI Tx  agi_context: privoip
 SIP/10036-0096AGI Tx  agi_extension: 0012127773456
 *SIP/10036-0096AGI Rx  GET VARIABLE DIALSTATUS
 SIP/10036-0096AGI Tx  200 result=1 (ANSWER)
 SIP/10036-0096AGI Rx  VERBOSE Status 1
 SIP/10036-0096AGI 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

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 kamlesh_...@hotmail.com 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
?php
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: 
SIP/10036-0096AGI Tx  agi_channel: SIP/10036-0096
SIP/10036-0096AGI Tx  agi_language: en
SIP/10036-0096AGI Tx  agi_type: SIP
SIP/10036-0096AGI Tx  agi_uniqueid: 1322848927.172
SIP/10036-0096AGI Tx  agi_version: 1.6.2.7
SIP/10036-0096AGI Tx  agi_callerid: 10036
SIP/10036-0096AGI Tx  agi_calleridname: 10036
SIP/10036-0096AGI Tx  agi_dnid: 0012127773456
SIP/10036-0096AGI Tx  agi_rdnis: unknown
SIP/10036-0096AGI Tx  agi_context: privoip
SIP/10036-0096AGI Tx  agi_extension: 0012127773456
SIP/10036-0096AGI Rx  GET VARIABLE DIALSTATUS
SIP/10036-0096AGI Tx  200 result=1 (ANSWER)
SIP/10036-0096AGI Rx  VERBOSE Status 1
SIP/10036-0096AGI 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
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 kamlesh_...@hotmail.comwrote:

  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 kamlesh_...@hotmail.comwrote:

  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
 ?php
 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:
 SIP/10036-0096AGI Tx  agi_channel: SIP/10036-0096
 SIP/10036-0096AGI Tx  agi_language: en
 SIP/10036-0096AGI Tx  agi_type: SIP
 SIP/10036-0096AGI Tx  agi_uniqueid: 1322848927.172
 SIP/10036-0096AGI Tx  agi_version: 1.6.2.7
 SIP/10036-0096AGI Tx  agi_callerid: 10036
 SIP/10036-0096AGI Tx  agi_calleridname: 10036
 SIP/10036-0096AGI Tx  agi_dnid: 0012127773456
 SIP/10036-0096AGI Tx  agi_rdnis: unknown
 SIP/10036-0096AGI Tx  agi_context: privoip
 SIP/10036-0096AGI Tx  agi_extension: 0012127773456
 *SIP/10036-0096AGI Rx  GET VARIABLE DIALSTATUS
 SIP/10036-0096AGI Tx  200 result=1 (ANSWER)
 SIP/10036-0096AGI Rx  VERBOSE Status 1
 SIP/10036-0096AGI 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

Here it is:
 
SIP/10036-00a8AGI Tx  agi_request: isdcall.php
SIP/10036-00a8AGI Tx  agi_channel: SIP/10036-00a8
SIP/10036-00a8AGI Tx  agi_language: en
SIP/10036-00a8AGI Tx  agi_type: SIP
SIP/10036-00a8AGI Tx  agi_uniqueid: 1322853473.198
SIP/10036-00a8AGI Tx  agi_version: 1.6.2.7
SIP/10036-00a8AGI Tx  agi_callerid: 10036
SIP/10036-00a8AGI Tx  agi_calleridname: 10036
SIP/10036-00a8AGI Tx  agi_callingpres: 0
SIP/10036-00a8AGI Tx  agi_callingani2: 0
SIP/10036-00a8AGI Tx  agi_callington: 0
SIP/10036-00a8AGI Tx  agi_callingtns: 0
SIP/10036-00a8AGI Tx  agi_dnid: 0012127773456
SIP/10036-00a8AGI Tx  agi_rdnis: unknown
SIP/10036-00a8AGI Tx  agi_context: privoip
SIP/10036-00a8AGI Tx  agi_extension: 0012127773456
SIP/10036-00a8AGI Tx  agi_priority: 3
SIP/10036-00a8AGI Tx  agi_enhanced: 0.0
SIP/10036-00a8AGI Tx  agi_accountcode: 10036
SIP/10036-00a8AGI Tx  agi_threadid: -1220478064
SIP/10036-00a8AGI Rx  VERBOSE 10036 1
SIP/10036-00a8AGI Tx  200 result=1
SIP/10036-00a8AGI Rx  VERBOSE 0012127773456 1
SIP/10036-00a8AGI Tx  200 result=1
SIP/10036-00a8AGI Rx  VERBOSE 10036 1
SIP/10036-00a8AGI Tx  200 result=1
SIP/10036-00a8AGI Rx  VERBOSE Dialling 1
SIP/10036-00a8AGI Tx  200 result=1
SIP/10036-00a8AGI Tx  200 result=1
SIP/10036-00a8AGI Rx  EXEC Dial SIP/202.89.78.21/12127773456
SIP/10036-00a8AGI Tx  200 result=-1
SIP/10036-00a8AGI Rx  GET VARIABLE DIALSTATUS
SIP/10036-00a8AGI Tx  200 result=1 (ANSWER)
SIP/10036-00a8AGI Rx  VERBOSE Status 1
SIP/10036-00a8AGI 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 kamlesh_...@hotmail.com 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 kamlesh_...@hotmail.com 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
?php
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: 
SIP/10036-0096AGI Tx  agi_channel: SIP/10036-0096
SIP/10036-0096AGI Tx  agi_language: en
SIP/10036-0096AGI Tx  agi_type: SIP
SIP/10036-0096AGI Tx  agi_uniqueid: 1322848927.172
SIP/10036-0096AGI Tx  agi_version: 1.6.2.7
SIP/10036-0096AGI Tx  agi_callerid: 10036
SIP/10036-0096AGI Tx  agi_calleridname: 10036
SIP/10036-0096AGI Tx  agi_dnid: 0012127773456
SIP/10036-0096AGI Tx  agi_rdnis: unknown
SIP/10036-0096AGI Tx  agi_context: privoip
SIP/10036-0096AGI Tx  agi_extension: 0012127773456
SIP/10036-0096AGI Rx  GET VARIABLE DIALSTATUS
SIP/10036-0096AGI Tx  200 result=1 (ANSWER)
SIP/10036-0096AGI Rx  VERBOSE Status 1
SIP/10036-0096AGI 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 Tony Mountifield
In article snt142-w45a64e4743de653da591...@phx.gbl,
Kamlesh Kumar kamlesh_...@hotmail.com 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
 ?php
 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: 
 SIP/10036-0096AGI Tx  agi_channel: SIP/10036-0096
 SIP/10036-0096AGI Tx  agi_language: en
 SIP/10036-0096AGI Tx  agi_type: SIP
 SIP/10036-0096AGI Tx  agi_uniqueid: 1322848927.172
 SIP/10036-0096AGI Tx  agi_version: 1.6.2.7
 SIP/10036-0096AGI Tx  agi_callerid: 10036
 SIP/10036-0096AGI Tx  agi_calleridname: 10036
 SIP/10036-0096AGI Tx  agi_dnid: 0012127773456
 SIP/10036-0096AGI Tx  agi_rdnis: unknown
 SIP/10036-0096AGI Tx  agi_context: privoip
 SIP/10036-0096AGI Tx  agi_extension: 0012127773456
 SIP/10036-0096AGI Rx  GET VARIABLE DIALSTATUS
 SIP/10036-0096AGI Tx  200 result=1 (ANSWER)

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

 SIP/10036-0096AGI Rx  VERBOSE Status 1

But you are not picking it up.

 SIP/10036-0096AGI 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

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

it gives me: 
SIP/10036-00b2AGI Rx  GET VARIABLE DIALSTATUS
SIP/10036-00b2AGI Tx  200 result=1 (ANSWER)
SIP/10036-00b2AGI Rx  VERBOSE Status200 1
 
If I use
$dd=$dialstatus[result];
  $agi-verbose(Status.$dd);

it gives me:
 
SIP/10036-00b4AGI Rx  GET VARIABLE DIALSTATUS
SIP/10036-00b4AGI Tx  200 result=1 (CANCEL)
SIP/10036-00b4AGI Rx  VERBOSE Status1 1
 
but if I use
$dd=$dialstatus[data];
  $agi-verbose(Status.$dd);

SIP/10036-00b6AGI Rx  GET VARIABLE DIALSTATUS
SIP/10036-00b6AGI Tx  200 result=1 (CANCEL)
SIP/10036-00b6AGI 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 snt142-w45a64e4743de653da591...@phx.gbl,
 Kamlesh Kumar kamlesh_...@hotmail.com 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
  ?php
  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: 
  SIP/10036-0096AGI Tx  agi_channel: SIP/10036-0096
  SIP/10036-0096AGI Tx  agi_language: en
  SIP/10036-0096AGI Tx  agi_type: SIP
  SIP/10036-0096AGI Tx  agi_uniqueid: 1322848927.172
  SIP/10036-0096AGI Tx  agi_version: 1.6.2.7
  SIP/10036-0096AGI Tx  agi_callerid: 10036
  SIP/10036-0096AGI Tx  agi_calleridname: 10036
  SIP/10036-0096AGI Tx  agi_dnid: 0012127773456
  SIP/10036-0096AGI Tx  agi_rdnis: unknown
  SIP/10036-0096AGI Tx  agi_context: privoip
  SIP/10036-0096AGI Tx  agi_extension: 0012127773456
  SIP/10036-0096AGI Rx  GET VARIABLE DIALSTATUS
  SIP/10036-0096AGI Tx  200 result=1 (ANSWER)
 
 This shows that AGI is indeed returning the value of DIALSTATUS,
 which is ANSWER.
 
  SIP/10036-0096AGI Rx  VERBOSE Status 1
 
 But you are not picking it up.
 
  SIP/10036-0096AGI 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

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);
 
SIP/10036-00b8AGI Rx  GET VARIABLE DIALSTATUS
SIP/10036-00b8AGI Tx  200 result=1 (CANCEL)
SIP/10036-00b8AGI Rx  Array
SIP/10036-00b8AGI Tx  510 Invalid or unknown command
[Dec  3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() returned 
error: Broken pipe
SIP/10036-00b8AGI Rx  (
SIP/10036-00b8AGI Tx  510 Invalid or unknown command
[Dec  3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() returned 
error: Broken pipe
SIP/10036-00b8AGI Rx  [code] = 200
SIP/10036-00b8AGI Tx  510 Invalid or unknown command
[Dec  3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() returned 
error: Broken pipe
SIP/10036-00b8AGI Rx  [result] = 1
SIP/10036-00b8AGI Tx  510 Invalid or unknown command
[Dec  3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() returned 
error: Broken pipe
SIP/10036-00b8AGI 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: 
SIP/10036-00b2AGI Rx  GET VARIABLE DIALSTATUS
SIP/10036-00b2AGI Tx  200 result=1 (ANSWER)
SIP/10036-00b2AGI Rx  VERBOSE Status200 1
 
If I use
$dd=$dialstatus[result];
  $agi-verbose(Status.$dd);

it gives me:
 
SIP/10036-00b4AGI Rx  GET VARIABLE DIALSTATUS
SIP/10036-00b4AGI Tx  200 result=1 (CANCEL)
SIP/10036-00b4AGI Rx  VERBOSE Status1 1
 
but if I use
$dd=$dialstatus[data];
  $agi-verbose(Status.$dd);

SIP/10036-00b6AGI Rx  GET VARIABLE DIALSTATUS
SIP/10036-00b6AGI Tx  200 result=1 (CANCEL)
SIP/10036-00b6AGI 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 snt142-w45a64e4743de653da591...@phx.gbl,
 Kamlesh Kumar kamlesh_...@hotmail.com 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
  ?php
  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: 
  SIP/10036-0096AGI Tx  agi_channel: SIP/10036-0096
  SIP/10036-0096AGI Tx  agi_language: en
  SIP/10036-0096AGI Tx  agi_type: SIP
  SIP/10036-0096AGI Tx  agi_uniqueid: 1322848927.172
  SIP/10036-0096AGI Tx  agi_version: 1.6.2.7
  SIP/10036-0096AGI Tx  agi_callerid: 10036
  SIP/10036-0096AGI Tx  agi_calleridname: 10036
  SIP/10036-0096AGI Tx  agi_dnid: 0012127773456
  SIP/10036-0096AGI Tx  agi_rdnis: unknown
  SIP/10036-0096AGI Tx  agi_context: privoip
  SIP/10036-0096AGI Tx  agi_extension: 0012127773456
  SIP/10036-0096AGI Rx  GET VARIABLE DIALSTATUS
  SIP/10036-0096AGI Tx  200 result=1 (ANSWER)
 
 This shows that AGI is indeed returning the value of DIALSTATUS,
 which is ANSWER.
 
  SIP/10036-0096AGI Rx  VERBOSE Status 1
 
 But you are not picking it up.
 
  SIP/10036-0096AGI 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:
   

Re: [asterisk-users] DIALSTATUS Values

2011-12-02 Thread Tony Mountifield
In article snt142-w54267269808afd17bccd5891...@phx.gbl,
Kamlesh Kumar kamlesh_...@hotmail.com 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);
  
 SIP/10036-00b8AGI Rx  GET VARIABLE DIALSTATUS
 SIP/10036-00b8AGI Tx  200 result=1 (CANCEL)
 SIP/10036-00b8AGI Rx  Array
 SIP/10036-00b8AGI Tx  510 Invalid or unknown command
 [Dec  3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() 
 returned error: Broken pipe
 SIP/10036-00b8AGI Rx  (
 SIP/10036-00b8AGI Tx  510 Invalid or unknown command
 [Dec  3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() 
 returned error: Broken pipe
 SIP/10036-00b8AGI Rx  [code] = 200
 SIP/10036-00b8AGI Tx  510 Invalid or unknown command
 [Dec  3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() 
 returned error: Broken pipe
 SIP/10036-00b8AGI Rx  [result] = 1
 SIP/10036-00b8AGI Tx  510 Invalid or unknown command
 [Dec  3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() 
 returned error: Broken pipe
 SIP/10036-00b8AGI 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] Skype For Asterisk (SFA): any replacement?

2011-12-02 Thread A J Stiles
On Thursday 01 December 2011, Hans Witvliet wrote:
 On Thu, 2011-12-01 at 14:02 +, A J Stiles wrote:
  On Thursday 01 December 2011, gincantalupo wrote:
   Hi all,
   
   any idea about how to replace Skype For Asterisk?
   
   Thank You.
   
   Giorgio
  
  1.  Migrate your Skype users over to a better product which supports
  proper open standards.
 
 perhaps you missed it, but the installed base of skype is unfortunately
 slightly (,,,) larger than the amount of peope that are using a decent
 product. Alas

Then it's simply a bigger job than the original suggestion made it seem.

When -- not if -- Skype give up supporting their anti-telecommunications 
product altogether, every single one of those users is going to be left in the 
lurch.

And that might be the critical mass that brings on the revolution.  We can 
only hope  :)


  2.  Write to your elected representatives asking that they order Skype to
  release documentation on their protocols to allow third party
  interoperability (as is already required under EU law).
 
 3. make it a offence to use any closed source products like skype. ;-)
 Huge fines, jail centences or worse.
 [How about an appendice to the Thora, Quran or Bible, even better,
 forbid it by the sharia]

You may jest, but now you are seeing *EXACTLY* why closed, proprietary 
standards are a bad idea -- something I have been saying almost ever since 
Skype was first launched.

Note, not necessarily closed *source*, but closed *standards*.  The two are 
easily confused, but not quite the same.  An Open Source program can only ever 
implement open standards, since the Source Code implicitly documents the 
standards.  But Closed Source programs can, and often do, implement open 
standards.  And wherever they do, then there are usually alternative, Open 
Source programs that do the same job.


Every aspect of a program's interaction with the outside world -- 
communications protocols, save file formats and similar -- must be documented 
to the point where any competent programmer could write a program which 
interacts seamlessly with the application that originally generated them.  
That documentation may well be the Source Code for the program itself, of 
course; or it could just be something like the RFCs -- in which case, the will 
is surely out there for someone within the Open Source community to do the 
rest.

Anything less is just blatant anti-competitive behaviour.

-- 
AJS

Answers come *after* questions.

--
_
-- 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] A new hack?

2011-12-02 Thread Jim Lucas
On 11/26/2011 5:00 PM, C F wrote:
 On Sat, Nov 26, 2011 at 7:50 AM, Gordon Henderson
 gordon+aster...@drogon.net wrote:
 On Sat, 26 Nov 2011, Terry Brummell wrote:

 Install  Configure Fail2Ban then the host will be blocked from
 connecting.  And no, it's not new.

 I don't need Fail2Ban, thank you. But your advice might be useful to others.
 
 Why is that?
 Even if they don't compromise an account they are still using your
 bandwidth and resources on your machine.
 

How is using Fail2Ban less resource intensive then me writing (by hand) iptable
rules?

Also, since both methods involve the use of iptables, where exactly is the
bandwidth savings?

-- 
Jim Lucas

--
_
-- 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] A new hack?

2011-12-02 Thread Danny Nicholas
Fail2ban assumes that #1 your environment is (wide) open and #2 you will
need to update iptables on an instant response to attack basis.  If you
are open enough, even fail2ban isn't going to really help.  If you have a
sufficiently written set of iptables rules (or you aren't allowing external
SIP/TCP/UDP traffic) you shouldn't (just my opinion) need fail2ban at all.

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Jim Lucas
Sent: Friday, December 02, 2011 10:35 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] A new hack?

On 11/26/2011 5:00 PM, C F wrote:
 On Sat, Nov 26, 2011 at 7:50 AM, Gordon Henderson 
 gordon+aster...@drogon.net wrote:
 On Sat, 26 Nov 2011, Terry Brummell wrote:

 Install  Configure Fail2Ban then the host will be blocked from 
 connecting.  And no, it's not new.

 I don't need Fail2Ban, thank you. But your advice might be useful to
others.
 
 Why is that?
 Even if they don't compromise an account they are still using your 
 bandwidth and resources on your machine.
 

How is using Fail2Ban less resource intensive then me writing (by hand)
iptable rules?

Also, since both methods involve the use of iptables, where exactly is the
bandwidth savings?

--
Jim Lucas

--
_
-- 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] CSipSimple audio issue with DAHDI/IAX2 calls

2011-12-02 Thread Anthony Messina
I've just connected my new Android (Motorola RAZR) phone to Asterisk
using CSipSimple and have discovered that on any call between CSipSimple
and an Asterisk DAHDI or IAX2 channel, the 'other' end of the call will
hear a rhythmic tapping as if my voice stream is being chopped up in
equal parts about every 500ms or so. I can always hear the remote party
without issue, regardless of the channel type.

The issue occurs only on connections to DAHDI channels (even those that
don't pass through the PSTN), and IAX2 connections to remote Asterisk
servers.

This issue occurs whether I am using WiFi, 3G or 4G connections on the
Android.

This does NOT occur on any SIP channels, local to my Asterisk box, or to
others.

I've investigated changing just about every setting on the Android with
no resolution.  It seems like some sort of timing issue and is strange
to me that this issue is confined to DAHDI and IAX2 channels, but I'm no
expert.

I have tested using only res_timing_dadhi.so since I have the card, but
that did not help either.

Would anyone be willing to point me in the right direction for resolving
this issue?  Please let me know if any more information is required.
Thanks in advance.  -A


I am currently using the following on a Fedora 15 x86_64 system:
Asterisk 1.8.7.1 built by mockbuild @ x86-13.phx2.fedoraproject.org on a
x86_64 running Linux on 2011-10-17 21:42:11 UTC

]# cat /proc/dahdi/*
Span 1: WCTDM/4 Wildcard TDM400P REV I Board 5 (MASTER)

   1 WCTDM/4/0 FXOKS (In use) (EC: OSLEC - INACTIVE)
   2 WCTDM/4/1 FXOKS
   3 WCTDM/4/2 FXSKS (In use) (EC: OSLEC - INACTIVE)


*CLI module show like timing
Module Description  Use Count
res_timing_dahdi.soDAHDI Timing Interface   0
res_timing_pthread.so  pthread Timing Interface 0
res_timing_timerfd.so  Timerfd Timing Interface 1


*CLI core show settings

PBX Core settings
-
  Version: 1.8.7.1
  Build Options:   LOADABLE_MODULES
  Maximum calls:   Not set
  Maximum open file handles:   Not set
  Verbosity:   3
  Debug level: 0
  Maximum load average:0.00
  Minimum free memory: 0 MB
  Startup time:10:23:07
  Last reload time:10:23:07
  System:  Linux/2.6.32-131.2.1.el6.x86_64 built by
mockbuild on x86_64 2011-10-17 21:42:11 UTC
  Default language:en
  Language prefix: Enabled
  User name and group: /
  Executable includes: Disabled
  Transcode via SLIN:  Enabled
  Internal timing: Enabled
  Transmit silence during rec: Disabled
  Generic PLC: Enabled

-- 
Anthony - http://messinet.com - http://messinet.com/~amessina/gallery
8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E



signature.asc
Description: OpenPGP digital signature
--
_
-- 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] A new hack?

2011-12-02 Thread Steve Edwards

On Fri, 2 Dec 2011, Jim Lucas wrote:

How is using Fail2Ban less resource intensive then me writing (by hand) 
iptable rules?


It depends on how you define resources and how much of those resources you 
have.


Gordon (based on my understanding of his posts) does a lot of Asterisk 
systems on very limited hardware hosts. His approach uses iptables 
features to limit the number of SIP INVITES and REGISTERS per second per 
IP address.


Thus, Gordon's approach is more responsive (since it doesn't require 
periodic log file scanning) and requires less hardware resources (since it 
doesn't depend on running relatively 'slothish' resource intensive script 
interpreters like Perl or PHP periodically).


If you have limited admin skills and more hardware resources, F2B makes 
sense.


If you have more admin skills and limited hardware resources, Gordon's 
approach makes more sense.


Personally, I find any approach that tracks log files 'hackish' but if you 
centralize your logging (which I always do) it does allow you to detect 
patterns of abuse across multiple hosts.


--
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 --
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] A new hack?

2011-12-02 Thread john Millican

On 12/2/2011 12:44 PM, Steve Edwards wrote:

On Fri, 2 Dec 2011, Jim Lucas wrote:

How is using Fail2Ban less resource intensive then me writing (by 
hand) iptable rules?


It depends on how you define resources and how much of those resources 
you have.


Gordon (based on my understanding of his posts) does a lot of Asterisk 
systems on very limited hardware hosts. His approach uses iptables 
features to limit the number of SIP INVITES and REGISTERS per second 
per IP address.


Thus, Gordon's approach is more responsive (since it doesn't require 
periodic log file scanning) and requires less hardware resources 
(since it doesn't depend on running relatively 'slothish' resource 
intensive script interpreters like Perl or PHP periodically).


If you have limited admin skills and more hardware resources, F2B 
makes sense.


If you have more admin skills and limited hardware resources, Gordon's 
approach makes more sense.


Personally, I find any approach that tracks log files 'hackish' but if 
you centralize your logging (which I always do) it does allow you to 
detect patterns of abuse across multiple hosts.



Now this, I would say was very well put.
As always, just my opinion.
JohnM

--
_
-- 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] IAX - An informative question

2011-12-02 Thread Daniel - Asterisk
Hello all,

I recently found this when looking an IAX trunk:

context=*

Does it have a special meaning or is it the same like 'default'?

Thanks,

Elder
--
_
-- 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] Where to download sample video file for Asterisk 1.8x playback?

2011-12-02 Thread asterisk jobs
Hello,

I have been trying to playback a video file via Playback() in Asterisk
1.8.7.1 but the file format seems to fail.


[2011-12-02 18:46:24] WARNING[7665]: file.c:653 ast_openstream_full: File
/etc/asterisk/cp-10fps-QCIF-20Kbps.h263 does not exist in any format
[2011-12-02 18:46:24] WARNING[7665]: file.c:959 ast_streamfile: Unable to
open /etc/asterisk/cp-10fps-QCIF-20Kbps.h263 (format 0x4 (ulaw)): No such
file or directory

The file of course exists and it's chowned to asterisk.asterisk. I think
it's a file format issue. So, I appreciate it someone can give me a link to
a file or maybe point me a universal convertor (open-source or linux based
software) that can convert my videos to Asterisk readable format.

Thanks,
--
_
-- 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] How can I decipher password in SIP Packet?

2011-12-02 Thread asterisk jobs
I am receiving requests to register to my Asterisk extensions. I have the
full SIP packets. I also do see what extension is being tried to be
registered. Is there ANY WAY to know what password is being attempted?

I think the appropriate term would be decode the base64 response I get from
the client. Here is what I get in the SIP packet from the client:
*
*
 *Authorization: Digest username=4456678, realm=asterisk,
nonce=67461340, uri=sip:mailbox,
response=5a9a5f2b527ca9687c8f75705e6a2d25, algorithm=MD5*

Using a base64 decoder I get this:* *å¯Zåý›çnÜkÞ¼íÏ ïžôåîšÙݹ from the
response above. Of course, that is not the plain password. So, is that
encrypted? How can I can I decrypt it?

Thanks,



On Mon, Nov 28, 2011 at 12:48 AM, asterisk jobs asteriskcod...@gmail.comwrote:

 Hello,

 I am receiving requests to register to my Asterisk extensions. I have the
 full SIP packets. I also do see what extension is being tried to be
 registered. Is there ANY WAY to know what password is being attempted?

 Thanks,
 Peter

--
_
-- 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] DHCP Option 43 and pfSense + Asterisk

2011-12-02 Thread asterisk jobs
Hi,

Has anyone succeded using DHCP Option 43 and Aastra phones to set the
configuration server from a pfSense router or any other router?

Sorry, if not directly related to Asterisk but I am sure the collective
knowledge will pay off.

I am specifically wondering what the Number, Type and Value should be
in Additional
BOOTP/DHCP Options  under pfSense 2.0


Thanks a lot
--
_
-- 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] Max channel analyser from asteriskcdrdb?

2011-12-02 Thread asterisk jobs
Hello,

Is there a php or any other program to analyse Asterisk CDR which is stored
in asteriskcdrdb. I want to know outbound and inbound channels and not
the internal calls channels as well which is what CDR Stats does currently.
It doesn't differentiate between those.

Someone might have done a custom script to find out their monthly inbound /
outbound peak lines? I appreciate a guide on this.

*FreePBX reporting and CDR Stats from Areski is not the answer to my issue.

Thanks,
--
_
-- 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] How can I decipher password in SIP Packet?

2011-12-02 Thread Kevin P. Fleming

On 12/02/2011 05:24 PM, asterisk jobs wrote:

I am receiving requests to register to my Asterisk extensions. I have
the full SIP packets. I also do see what extension is being tried to be
registered. Is there ANY WAY to know what password is being attempted?

I think the appropriate term would be decode the base64 response I get
from the client. Here is what I get in the SIP packet from the client:
*
*
*Authorization: Digest username=4456678, realm=asterisk,
nonce=67461340, uri=sip:mailbox,
response=5a9a5f2b527ca9687c8f75705e6a2d25, algorithm=MD5*

Using a base64 decoder I get this:**å¯Zåý›çnÜkÞ¼íÏ ïžôåîšÙݹ from the
response above. Of course, that is not the plain password. So, is that
encrypted? How can I can I decrypt it?


As the Authorization header clearly states, this value is created using 
an MD5 Digest (hash). Since it is a digest function, it is not 
reversible. It is impossible to recover the password that was used 
during the calculation of the response value (although given enough time 
and CPU resources, it is possible go through a massive list of 
possibilities and try each one until you find one that matches).


--
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
Jabber: kflem...@digium.com | SIP: kpflem...@digium.com | Skype: kpfleming
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at www.digium.com  www.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] skype connect early media

2011-12-02 Thread Edwin Lam

hi folks.

when i use regular PSTN(sip phone - asterisk - PRI) to call
certain numbers and when that number is unavailable. i usually
hear an early media message saying blahblah is unavailable,
please try again. but when i use skype connect(sip phone - asterisk
- skype connect). i just hear ring back tone for about 20 seconds
and then become fast busy. is there any setting i'm unaware of
when setting up sip w/ skype connect?

any suggestions would be appreciated.

--
Edwin Lam edwin@officegeneral.com
Systems Engineer, OfficeWyze, Inc.
Ph: +1 415 439 4988 Fax: +1 415 283 3370
http://pgpkeys.mit.edu:11371/pks/lookup?op=getsearch=0xD6506D20


--
_
-- 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] How can I decipher password in SIP Packet?

2011-12-02 Thread asterisk jobs

 As the Authorization header clearly states, this value is created using an
 MD5 Digest (hash). Since it is a digest function, it is not reversible. It
 is impossible to recover the password that was used during the calculation
 of the response value (although given enough time and CPU resources, it is
 possible go through a massive list of possibilities and try each one until
 you find one that matches).


Thanks. Based on above, I am getting that Asterisk also runs MD5 algorithm
on the password and then matches the two hash digests to see if they are
good or not. Is that all happens? or is there an encryption involved as
well? Chance of collision of 1^128?

Regards,
--
_
-- 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] A new hack?

2011-12-02 Thread Tom Browning
On Fri, Dec 2, 2011 at 12:44 PM, Steve Edwards
asterisk@sedwards.com wrote:
 Gordon (based on my understanding of his posts) does a lot of Asterisk
 systems on very limited hardware hosts. His approach uses iptables features
 to limit the number of SIP INVITES and REGISTERS per second per IP address.

A very narrow solution to a fairly narrow attack surface and surely
isn't applicable to any medium to large scale solutions.

 Thus, Gordon's approach is more responsive (since it doesn't require
 periodic log file scanning) and requires less hardware resources (since it
 doesn't depend on running relatively 'slothish' resource intensive script
 interpreters like Perl or PHP periodically).

So Fail2Ban is inefficient on how it reads log files?  If so, that
could be an informed criticism of Fail2Ban.

 Personally, I find any approach that tracks log files 'hackish' but if you
 centralize your logging (which I always do) it does allow you to detect
 patterns of abuse across multiple hosts.

Others would say that not using IPS/IDS/adaptive sec appliances is
hackish but I'm not one of those.

There are very efficient ways to read log files even with Perl on
hardware no bigger than my Dockstar when coded properly, so reading
log files isn't hackish.

Looking at advanced threats that are encrypted or otherwise located
within legitimately large streams of UDP and TCP traffic are not going
to lend themselves to some simpleton IP/port/rate iptables rule or
even more complex iptables view into the data.

The application log might be the ONLY place to correlate events.  Good
luck doing that with iptables alone.

--
_
-- 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] google voice calling dial plan question.

2011-12-02 Thread white hat
When a caller calls my google voice phone number, I must answer, wait and
press one to accept.  Sometimes even that does not work.

I have tried a few different things to get asterisk to place the call in an
answered state and send the DTMF 1 with the Dial macro.

I found Malcom Davenports wiki page regarding Google calling which has been
very helpful in troubleshooting the issue.
https://wiki.asterisk.org/wiki/display/AST/Calling+using+Google?focusedCommentId=18415969#comment-18415969

I'm sure that I'm close to getting things working properly.

Here's my config.

##jabber.conf##

[general]
debug=no
autoprune=no
autoregister=yes

[whitehat238]
type=client
serverhost=talk.google.com
username=whitehat...@gmail.com/Talk
secret=password
port=5222
usetls=yes
usesasl=yes
status=Available
statusmessage=No Information Available
timeout=100
keepalive=yes

##gtalk.conf##

[general]
allowguest=yes
context=googlein
stunaddr=stun01.sipphone.com

[guest]
disallow=all
allow=ulaw
connection=whitehat238
context=googlein

##extensions_custom.conf##

exten = whitehat...@gmail.com
,1,Set(CALLERID(name)=${CUT(CALLERID(name),@,1)})
exten = whitehat...@gmail.com,n,GotoIf($[${CALLERID(name):0:2} !=
+1]?notrim)
exten = whitehat...@gmail.com,n,Set(CALLERID(name)=${CALLERID(name):2})
exten = whitehat...@gmail.com
,n(notrim),Set(CALLERID(number)=${CALLERID(name)})
exten = whitehat...@gmail.com,n,Answer
exten = whitehat...@gmail.com,n,Wait(1)
exten = whitehat...@gmail.com,n,SendDTMF(1)
exten = whitehat...@gmail.com,n,Goto(from-trunk,5025551212,1)

[gvoice-whitehat238]
exten = _X.,1,Dial(Gtalk/whitehat238/+${EXTEN}@voice.google.com)
exten = _X.,n,Noop(GVoice Call to ${EXTEN} failed)
exten = h,1,Macro(hangupcall,)

I have a working inbound route which rings an internal extension (7008)
when calling the GV number.  I can also make outbound calls to any number
using the GV trunk.

I found this page (Link to Michigan telephone blog) which helped me get
everything setup initially and included a shell script that made it easy to
generate the configuration.
http://michigantelephone.wordpress.com/2011/01/20/a-bash-script-to-assist-asterisk-1-8freepbx-2-8-users-in-adding-new-google-voice-accounts/

The author explains the config in more detail and why he choose to write it
the way he did.

I have tried using the alternative method of sending the DTMF 1 tone by
changing the last block as follows:

[gvoice-whitehat238]
exten = _X.,1,Dial(Gtalk/whitehat238/+${EXTEN}@voice.google.com,D(:1))
exten = _X.,n,Noop(GVoice Call to ${EXTEN} failed)
exten = h,1,Macro(hangupcall,)

However, that did not work.

I just need a little advice on how to write the dial plan.  I still have
much to learn about asterisk, and appreciate any advice.

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