After some search in wiki I was able to do what I wanted. Here is how it is,

The .call file should appear something like this and it has to be placed
in /var/spool/asterisk/outgoing of asterisk-1,

Channel: local/[EMAIL PROTECTED] ; Any extension can be called using
local/<extension>@<context>
MaxRetries: 2
RetryTime: 60
WaitTime: 30
Context: sip
Extension: 2001
Priority: 1

In asterisk-1 we should have the following entries in extensions.conf file,

[sip]
exten => 3001,1,MyOriginateScript()
exten => 3001,2,Hangup

In asterisk-2 we should have the following entries in extensions.conf file,

[sip]
exten => 2001,1,MyTerminateScript()
exten => 2001,2,Hangup

We can do whatever we want in our MyoriginateScript/MyTerminateScript.
The features provided by asterisk is simply amazing !!! Long live asterisk

cheers,
Ravi

Ravi Shankar wrote:

Shawn,
Thanks for info that would solve the problem of manually making calls and connecting the phones at the either ends. But my requirement is slightly different. I've the following .call file in the /var/spool/asterisk/outgoing directory of asterisk-1

asterisk-1 ----- SIP ----- asterisk-2

Channel: SIP/3001
MaxRetries: 2
RetryTime: 60
WaitTime: 30
Context: sip
Extension: 2222
Priority: 1

So Asterisk-1 bridges 3001 and 2222 (which is in asterisk-2). Since 2222 is the terminating side I can have an AGI script handle the call and do whatever I wanted and I don't need a real IP Phone. On the other hand on the originating side 3001 has to be a real SIP Phone.

My question is on the originating side, can a AGI script answer the call instead of real IP Phone. This way I can simulate multiple IP Phones without having them physically available. I know this is not the intended usage of asterisk but it would serve to test bulk deployments and find out the capacity of the asterisk without having so many real phones.

thanks,
Ravi

Shawn Porter wrote:

Ravi,

Take a look here. http://www.voip-info.org/wiki-Asterisk+auto-dial+out
I would think that for what you are doing use a cron job and a shell script.


Shawn

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Ravi
Shankar
Sent: Friday, December 23, 2005 8:41 AM
To: Asterisk Users
Subject: [Asterisk-Users] How to make Asterisk to generate and
terminatecalls


Hi,
I would like to connect two linux machines running asterisk and then
originate SIP calls from one asterisk and terminate it on the other
asterisk. Terminating the call is not a problem because I can give the
call handle to say AGI application on the terminating asterisk. How do i
originate a call from the asterisk ? Is this possible using AGI ? Any
pointers in this regard would be of great help.

This type of application can be used two simulate bulk calls and find
out what is the maximum limit for the asterisk in terms of CPU
utilization, memory, etc. before it can be deployed in production
environment.

thanks,
Ravi
_______________________________________________
--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


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

Reply via email to