Script:
function MakeCall() {
global $saved_ev;
global $partycallid;
$called = $saved_ev->GetValue("sip_uri");
$this->log->set(" partycallid -------> : " . $partycallid . "\n");
$m = new Yate("chan.masquerade");
$m->params = $saved_ev->params;
$m->params["message"] = "call.execute";
$route = "line/+5717455171";
$m->params["callto"] = $called; //"sip:5717455171@104.130.240.10"; //sip:5717455171@104.130.240.10
$m->params["id"] = $partycallid;
$m->params["line"] = "sapo";
$this->log->set(" params -------> : " . var_export($m, true) . "\n");
$m->Dispatch();
}
Log:
IVR::InitIVR()
login::OnEnter('')
login::OnEvent(incoming 'call.execute')
login::OnMessage('call.execute')
login::SetState('Welcome')
login::OnExecute()
login: Found table operation 'answered'
login::OnEvent(installed 'chan.dtmf')
login::OnEvent(setlocal 'id')
login::OnSetting('id','ivr/39518406654f8771a663351.72944684',true)
login::OnEvent(installed 'chan.dtmf')
login::OnEvent(installed 'chan.notify')
20150305153405.432564 <sip:WARN> SIP line 'sapo' logon failure 401: Unauthorized
20150305153906.394980 <sip:WARN> SIP line 'sapo' logon failure 401: Unauthorized
accfile.conf:
[sapo]
enabled=yes
protocol=sip
username=+57174551**
description=CLIENT SIP
;interval=600
formats=ulaw
authname=+57174551**
password=
number=+57174551**
-- I'm not sure this configuration ---
domain=voip.sapo.pt
registrar=voip.sapo.pt:5070
outbound=proxy.voip.sapo.pt
-----
localaddress=auto
regexroute.conf:
^\+571.*$=sip/sip:;line=sapo;caller=+57174551**