[asterisk-users] ways of initiating a call
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Wed Feb 10 00:29:30 CST 2010
On Tue, Feb 09, 2010 at 03:40:48PM -0600, Danny Nicholas wrote:
> Here it is in a nutshell (in Perl, you can alter for your preferred
> language)
> my %respa = $astman->sendcommand( Action => 'Originate',
> Channel => "SIP/$fromval",
Figuring out $fromval is probably something to do with your system.
Which SIP phone relates to which "user" of the web interface.
(On our office I have a such simple utility that maps IP address of the
caller to a channel. Works nicely on a small LAN with static IPs)
> Exten => $toval,
Likewise figuring out the number to dial.
> Context => 'default',
The context, however, mostly depends on your specific dialplan.
> priority => 1,
> Number => $toval
> );
> This rings SIP/$fromval and when they pickup, calls $toval.
So this is fairly simple on its own. Integrating it with your system to
actually do the right thing is the tricky bit.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
More information about the asterisk-users
mailing list