[ previous ] [ next ] [ threads ]
 To :  "G. Alex" <radiopont@y...>
 From :  Monica Tepelus <monica@v...>
 Subject :  Re: [yate] Call from IVR
 Date :  Thu, 17 Jun 2010 14:35:18 +0300
Hi,

To make a call from ivr you need to send a call.execute inside a 
chan.masquerade for your party.

Ex in php:

            $m = new Yate("chan.masquerade");
            $m->params["message"] = "call.execute";
            $m->params["id"] = $partycallid;
            $m->params["callto"] = $route;
            $m->Dispatch();

$route is where you send the call. You didn't specify who takes the 
decision where to route the call.
$route is normally the answer to a call.route message but you can build 
it directly in the above code.

To route  to an account defined in accfile:

$route = "line/$called_number";
$m->params["line"] = "sip1";    // send call to first account

If you send call.route message and answer from another module then make 
sure to add param "line" in the chan.masquerade example from the above.

Monica Tepelus

G. Alex wrote:
> Hello,
> There are some registered SIP-accounts in accfile.conf file:
> [sip1]
> username=2737000
> .........
> [sip2]
> username=2737001
> .........
> [sip3]
> username=2737003
> .........
> [sip4]
> username=2737004
>
> In regexroute.conf file the route is adjusted from two numbers:
> ^2737000$=external/nodata/myivr.php
> ^2737001$=external/nodata/myivr.php
>
> How to make a call from IVR (which function should be used in order to make the call, after main Menu listening and the definite Submenu selection, come to the network using one of free SIPs (sip3, sip4)?
>
> G. Alex
>