Re: [asterisk-users] PhpAgi call generation

2007-06-19 Thread Christopher Robinson
I've done this many times, also used the .call files.  If you don't need 
your application to initiate the call the .call files are the better way 
to go, otherwise it's a bit too much file management overhead.

Here's some working code on our end.  In this case the Channel is 
actually a context which makes the actual call, but I've used it both ways.

connect())
  {
$call = $asm->send_request('Originate',
array('Channel'=>"LOCAL/[EMAIL PROTECTED]",
  'Context'=>'called_party_context',
  'Exten'=>'899',
  'Timeout' => '1000',
  'Async'=>'1',
  'MaxRetries' => '5',
  'RetryTime' => '5',
  'Priority'=>1,
  'Callerid'=>$callid));
$asm->disconnect();
  }
?>


nik600 wrote:
> hi
>
> i'd like to write a simply application in php with phpAgi that:
>
> - connect to Asterisk
> - call an external number using a Zap channel
> - play a message
>
> here is some code:
>
> 
> $asm = new AGI_AsteriskManager();
>
> if ($asm->connect()) {
>
> $asm->Originate("Zap/g1/1","number","default","1");
>
> /*
> play message...
> */
> } else {
> die("error\n");
> }
>
> ?>
>
> But it doesn't work.
> Is it possible to create a program like this?
> thanks
>
>   


___
--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] PhpAgi call generation

2007-06-19 Thread Christopher Robinson
That should be pretty easy to do with a .call file.  The context that 
you drop your called party off to will play the sounds and do the 
transfer.  So really you need to concentrate on creating that context, 
the .call files are very easy to generate.



Nitesh Divecha wrote:

Finally, this is what I was looking for... to generate a call.

I have been working on my Time Clock application, where an employee will 
call into the system using his cellphone to clock in and clock out his 
hours. And it works perfect...


Now I was looking for an option where or if an employee is late to clock 
in, the system has to generate a call and call the supervisor and inform 
him that XYZ employee is late and give an option to supervisor "Would 
you like to call XYZ employee, Press 1" and the system will call the XYZ 
employee and connect with the supervisor...


Is it something feasible to do using the .call files? Or I am way too 
off...


Cheers,
Nitesh


Christopher Robinson wrote:
  
I've done this many times, also used the .call files.  If you don't need 
your application to initiate the call the .call files are the better way 
to go, otherwise it's a bit too much file management overhead.


Here's some working code on our end.  In this case the Channel is 
actually a context which makes the actual call, but I've used it both ways.


connect())
  {
$call = $asm->send_request('Originate',
array('Channel'=>"LOCAL/[EMAIL PROTECTED]",
  'Context'=>'called_party_context',
  'Exten'=>'899',
  'Timeout' => '1000',
  'Async'=>'1',
  'MaxRetries' => '5',
  'RetryTime' => '5',
  'Priority'=>1,
  'Callerid'=>$callid));
$asm->disconnect();
  }
?>


nik600 wrote:
  


hi

i'd like to write a simply application in php with phpAgi that:

- connect to Asterisk
- call an external number using a Zap channel
- play a message

here is some code:

connect()) {

$asm->Originate("Zap/g1/1","number","default","1");

/*
play message...
*/
} else {
die("error\n");
}

?>

But it doesn't work.
Is it possible to create a program like this?
thanks

  

  

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


  


___
--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] PhpAgi call generation

2007-06-19 Thread Christopher Robinson
This should help:
http://www.voip-info.org/wiki/index.php?page=Asterisk+channels
Channel can be anything that is valid on your system.  I use Local 
because it allows me to better control the outbound call.

nik600 wrote:
> many thanks to all.
>
> I am interested to originate the call using phpAGI with this code.
>
>   require('PHPAGI/phpagi-asmanager.php');
>
>  $callid = 'Somebody';
>
>  $asm = new AGI_AsteriskManager();
>  if($asm->connect())
>  {
>$call = $asm->send_request('Originate',
>array('Channel'=>"LOCAL/[EMAIL PROTECTED]",
>  'Context'=>'called_party_context',
>  'Exten'=>'899',
>  'Timeout' => '1000',
>  'Async'=>'1',
>  'MaxRetries' => '5',
>  'RetryTime' => '5',
>  'Priority'=>1,
>  'Callerid'=>$callid));
>$asm->disconnect();
>  }
> ?>
>
> how can i create the LOCAL channel?
> is there a configuration file?
>
> thanks
>
> ___
> --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] VoicePulse Connect

2007-08-08 Thread Christopher Robinson
Wes, I'm working through some issues with IAX and Voicepulse right now.  
It was regarding dropped inbound calls.  I was able to put my server 
into a different location though, and so far the issues have disappeared 
so hopefully it was a network problem somewhere between us.Just 
curious what problems you encountered as I would prefer to use IAX if 
possible.


John, I've tried a few services, and Voicepulse was the clear winner for 
me.  I still have two other services in my dialplan for failover, but 
Voicepulse will remain the primary for now.  The voice quality has been 
very good, and their technical support has been absolutely fantastic for 
a no-charge service.


Wes Baehr wrote:

If you cannot afford any dropped calls or poor audio quality, you need a PRI
or POTS connection. It doesn't matter how great the carrier is, the Internet
is an unreliable medium.

2-3 times VoicePulse has had issues with incomings calls ringing busy. Once
incoming calls were all garbled on my end, although the customer could hear
me fine.

Generally, the outbound service is reliable. However, you should have a
backup carrier anyway.
 



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John Meksavan
Sent: Wednesday, August 08, 2007 1:09 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] VoicePulse Connect

Wes,

  What kind of service outages did you experienced?

  This would use for my office and I cannot afford for any dropped calls or
poor audio quality, when talking to customers.

-John

  

From: "Wes Baehr" <[EMAIL PROTECTED]>
Reply-To: Asterisk Users Mailing List - Non-Commercial 
Discussion
To: "'Asterisk Users Mailing List - Non-Commercial 
Discussion'"

Subject: Re: [asterisk-users] VoicePulse Connect
Date: Wed, 8 Aug 2007 12:55:29 -0400

John,

Voicepulse Connect has been great to me. I've been using it for over a 
year now, and do not have any major complaints, except that there are 
no printable receipts for credit card transactions. SIP is also the 
preferable protocol, as IAX seems to have some issues. Customer service 
is usually pretty good, and there have been very few (although a 
couple) problems with service outages.




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John 
Meksavan

Sent: Wednesday, August 08, 2007 12:30 PM
To: asterisk-users@lists.digium.com
Subject: [asterisk-users] VoicePulse Connect

Asterisk Users,

  Has anybody use Voicepulse Connect for Asterisk?

  I am trying to cover all my bases because in the past, I got burned 
with poor quality of service, along with failed DTMF tones with 3 
different SIP Providers (Vitelity, Broadvoice, and Teliax).


  I am running Asterisk 1.2.13 on the Debian Etch system, using the 
SIP protocol.  Any insights would be great.  Thanks.



-John

_
Tease your brain--play Clink! Win cool prizes!
http://club.live.com/clink.aspx?icid=clink_hotmailtextlink2


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



_
Find a local pizza place, movie theater, and more.then map the best route! 
http://maps.live.com/default.aspx?v=2&ss=yp.bars~yp.pizza~yp.movie%20theater

&cp=42.358996~-71.056691&style=r&lvl=13&tilt=-90&dir=0&alt=-1000&scene=95060
7&encType=1&FORM=MGAC01




___
--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] VoicePulse Connect

2007-08-09 Thread Christopher Robinson

I have the same issue with the ringing currently, so I force a ring.

Stephen Bosch wrote:

Wes Baehr wrote:
  

I had a lot of problems with garbled IAX calls (even when calling into
just the IVR). The problem was compacted when I would bridge an incoming
IAX call to an outgoing SIP call, though that may be a fault of
Asterisk. Since using SIP everything has been working perfectly. I never
had any real problems with dropping calls (that weren’t on my end).
However, I don’t use IAX anymore, so I am not aware of any current issues.



This is interesting information -- I've had similar problems with IAX
trunks on totally different carriers.

Example: Callers do not hear the remote ringing, or only some of the
rings, or don't hear the beep tone for voice mail.

IAX is easier if you're behind a firewall :(

-Stephen-


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

[asterisk-users] Problems with outbound calls through VSP

2007-05-11 Thread Christopher Robinson
Bear with me this is a bit long winded.  I am having some issues making 
automated outbound calls over Broadvoice from my Asterisk 1.4.2 server.  
For reference, none of the below issues happen when I make the calls to 
VoIP phones attached to the Asterisk server.  What I am trying to do is 
call, using a .call file, out via the SIP trunk we have setup, and when 
the party picks up use AMD to detect if it's reached a human or 
machine.  If it's human then one message will be played, and if machine 
another will be played theoretically after the answering 
machine/voicemail is done playing.  By the way, I'd like to mention that 
this is not at all for spamming, or telemarketing.  This is an 
appointment reminder service.


from extensions.conf:
[mycontext]
exten => 899,1,Answer
exten => 899,2,Wait(2)
exten => 899,3,AMD
exten => 899,n,GotoIf($[${AMDSTATUS}=HUMAN]?humn:mach)
exten => 899,n(mach),WaitForSilence(2500)
exten => 899,n,Playback(were-sorry)
exten => 899,n,Hangup
exten => 899,n(humn),WaitForSilence(500)
exten => 899,n,Playback(welcome)
exten => 899,n,Hangup


The call goes out fine.  When I pick it up AMD basically locks up, 
although not exactly because as you can see below it does recognize the 
HANGUP.  However, it will not recognize my voice or dead air no matter 
how long I stay on the call to try.  If I just let my voicemail pickup 
it does the same thing...takes forever for the call to terminate.  
Again, this all works as expected when I make the call to a SIP phone 
attached to the Asterisk server.


-- Attempting call on SIP/[EMAIL PROTECTED] for 
[EMAIL PROTECTED]:1 (Retry 1)

  > Channel SIP/sip.broadvoice.com-08bad080 was answered.
   -- Executing [EMAIL PROTECTED]:1] 
Answer("SIP/sip.broadvoice.com-08bad080", "") in new stack
   -- Executing [EMAIL PROTECTED]:2] 
AMD("SIP/sip.broadvoice.com-08bad080", "") in new stack

   -- AMD: SIP/sip.broadvoice.com-08bad080  (null) (Fmt: 4)
   -- AMD: initialSilence [2500] greeting [1500] afterGreetingSilence 
[800] totalAnalysisTime [5000] minimumWordLength [100] 
betweenWordsSilence [50] maximumNumberOfWords [3] silenceThreshold [256]

   -- AMD: HANGUP

I did find a solution to this "lock up".  That was to play a bit of 
silence at any point before I actually call AMD (even before Answer works):

[mycontext]
exten => 899,1,Playback(silence/1)
exten => 899,2,Answer


Although I don't particularly like this solution, as I'm just patching 
the problem that I still don't understand, plus it adds a little more 
delay that confuses the called party. 

Also, when I tried this I realized yet another issue, which could be the 
underlying cause of the whole thing.  No matter what sound it is, no 
matter if I use AMD or not, the very first sound that I play results in 
a short "screech" sound before it is played.  This happens every time 
without fail.  If I were to guess, I would say that there is some data 
in the audio channel that is not audio data, and is being represented 
with that screech sound...but of course that's just a guess.


Any help would be greatly appreciated.  Below are some relevant 
configuration settings:


sip.conf:
[general]
context=testusers   ; Default context for incoming calls
allowoverlap=no ; Disable overlap dialing support. 
(Default is yes)
bindport=5060   ; UDP Port to bind to (SIP standard port 
is 5060)

externip=xx.xx.xx.xx
localnet=192.168.1.0/255.255.255.0
bindaddr=0.0.0.0; IP address to bind to (0.0.0.0 binds 
to all)

srvlookup=yes   ; Enable DNS SRV lookups on outbound calls
pedantic=no
register => 
[EMAIL PROTECTED]:mysecret:[EMAIL PROTECTED]


[sip.broadvoice.com]
allow=ulaw
type=peer
user=phone
host=sip.broadvoice.com
fromdomain=sip.broadvoice.com
fromuser=716XXX
secret=mysecret
username=716XXX
insecure=very
context=from_broadvoice
authname=716XXX
dtmf=inband
dtmfmode=inband
;Disable canreinvite if you are behind a NAT
;canreinvite=no
nat=yes




___
--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] Problems with outbound calls through VSP

2007-05-11 Thread Christopher Robinson

Update:
I was able to obtain another VSP to try and rule out Broadvoice.  Seems 
that either my Broadvoice settings, or something on their end is causing 
the brief screech noise upon playing the first sound.


However, with this new VSP I still have the AMD (Answering Machine 
Detect) problem where it locks up unless I play some sound before 
calling AMD.  So my modified question is, has anyone ever had a problem 
with AMD through a VSP (SIP, in this case).  And it does *not* lock up 
when calling phones local to the server.


Christopher Robinson wrote:
Bear with me this is a bit long winded.  I am having some issues 
making automated outbound calls over Broadvoice from my Asterisk 1.4.2 
server.  For reference, none of the below issues happen when I make 
the calls to VoIP phones attached to the Asterisk server.  What I am 
trying to do is call, using a .call file, out via the SIP trunk we 
have setup, and when the party picks up use AMD to detect if it's 
reached a human or machine.  If it's human then one message will be 
played, and if machine another will be played theoretically after the 
answering machine/voicemail is done playing.  By the way, I'd like to 
mention that this is not at all for spamming, or telemarketing.  This 
is an appointment reminder service.


from extensions.conf:
[mycontext]
exten => 899,1,Answer
exten => 899,2,Wait(2)
exten => 899,3,AMD
exten => 899,n,GotoIf($[${AMDSTATUS}=HUMAN]?humn:mach)
exten => 899,n(mach),WaitForSilence(2500)
exten => 899,n,Playback(were-sorry)
exten => 899,n,Hangup
exten => 899,n(humn),WaitForSilence(500)
exten => 899,n,Playback(welcome)
exten => 899,n,Hangup


The call goes out fine.  When I pick it up AMD basically locks up, 
although not exactly because as you can see below it does recognize 
the HANGUP.  However, it will not recognize my voice or dead air no 
matter how long I stay on the call to try.  If I just let my voicemail 
pickup it does the same thing...takes forever for the call to 
terminate.  Again, this all works as expected when I make the call to 
a SIP phone attached to the Asterisk server.


-- Attempting call on SIP/[EMAIL PROTECTED] for 
[EMAIL PROTECTED]:1 (Retry 1)

  > Channel SIP/sip.broadvoice.com-08bad080 was answered.
   -- Executing [EMAIL PROTECTED]:1] 
Answer("SIP/sip.broadvoice.com-08bad080", "") in new stack
   -- Executing [EMAIL PROTECTED]:2] 
AMD("SIP/sip.broadvoice.com-08bad080", "") in new stack

   -- AMD: SIP/sip.broadvoice.com-08bad080  (null) (Fmt: 4)
   -- AMD: initialSilence [2500] greeting [1500] afterGreetingSilence 
[800] totalAnalysisTime [5000] minimumWordLength [100] 
betweenWordsSilence [50] maximumNumberOfWords [3] silenceThreshold [256]

   -- AMD: HANGUP

I did find a solution to this "lock up".  That was to play a bit of 
silence at any point before I actually call AMD (even before Answer 
works):

[mycontext]
exten => 899,1,Playback(silence/1)
exten => 899,2,Answer


Although I don't particularly like this solution, as I'm just patching 
the problem that I still don't understand, plus it adds a little more 
delay that confuses the called party.
Also, when I tried this I realized yet another issue, which could be 
the underlying cause of the whole thing.  No matter what sound it is, 
no matter if I use AMD or not, the very first sound that I play 
results in a short "screech" sound before it is played.  This happens 
every time without fail.  If I were to guess, I would say that there 
is some data in the audio channel that is not audio data, and is being 
represented with that screech sound...but of course that's just a guess.


Any help would be greatly appreciated.  Below are some relevant 
configuration settings:


sip.conf:
[general]
context=testusers   ; Default context for incoming calls
allowoverlap=no ; Disable overlap dialing support. 
(Default is yes)
bindport=5060   ; UDP Port to bind to (SIP standard 
port is 5060)

externip=xx.xx.xx.xx
localnet=192.168.1.0/255.255.255.0
bindaddr=0.0.0.0; IP address to bind to (0.0.0.0 binds 
to all)
srvlookup=yes   ; Enable DNS SRV lookups on outbound 
calls

pedantic=no
register => 
[EMAIL PROTECTED]:mysecret:[EMAIL PROTECTED]


[sip.broadvoice.com]
allow=ulaw
type=peer
user=phone
host=sip.broadvoice.com
fromdomain=sip.broadvoice.com
fromuser=716XXX
secret=mysecret
username=716XXX
insecure=very
context=from_broadvoice
authname=716XXX
dtmf=inband
dtmfmode=inband
;Disable canreinvite if you are behind a NAT
;canreinvite=no
nat=yes




___
--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] Difference between making a call and Originate

2007-05-14 Thread Christopher Robinson
When I make a regular call from my SIP phone connected to my Asterisk 
server I have no issues, however when I make a call using Originate :

'Channel'=>"SIP/[EMAIL PROTECTED]",
'Context'=>'mycontext',
'Exten'=>'899',
'Priority'=>1,
'Callerid'=>'whatever'));

It creates a screech sound when the first audio file is played.  Doesn't 
seem to happen with another VSP I tried, but still, why would a regular 
outbound call work just fine and Originate create this strange sound.  I 
know for sure that it isn't the audio file that I'm playing by the way.


___
--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] Automated outbound call retries

2007-05-25 Thread Christopher Robinson
Is there any built in functionality when using Originate to retry a call 
based on the DIALSTATUS?  Similar to the .call file where you can set 
max retries and time between them?


I've tried putting the logic in an outbound context/macro, but it just 
times out if the time between retries is too long...I suppose your not 
supposed to leave calls in limbo too long.


Is there any other method to making multiple attempts to automated 
outbound calls that I'm missing?
* I know you can do it with .call files but I don't want to use them (I 
want to use Originate)
* Obviously I could put the logic it our external programming, but if 
Asterisk can do it then I'd rather not


I saw that someone put some retry text on this page under the 
Rubification heading:

http://www.voip-info.org/tiki-index.php?page=Asterisk+Manager+API+Action+Originate
However that doesn't seem to work, nor is it documented so I didn't 
expect it to.


Thanks for any assistance.
___
--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