J
J
Janus742019-02-14 20:06:19
Asterisk
Janus74, 2019-02-14 20:06:19

How to modify the amocrm.php script so that the call goes through both sip and iax ext?

Hello!
I encountered such a problem when setting up amocrm integration with asterisk through the AasteriskNew widget. The script describes the call action (call when you click on a number in the contact card)

elseif ($action==='call'){ // originate a call
        $params=array(
                'action'=>'Originate',
                'channel'=>'SIP/'.intval($_GET['from']),
                'Exten'=>strval($_GET['to']),
                'Context'=>'from-internal',
                'priority'=>'2',
                'Callerid'=>'"'.strval($_GET['as']).'" <'.intval($_GET['from']).'>',
                'Async'=>'Yes',
                // Not Implemented:
                //'Callernumber'=>'150',
                //'CallerIDName'=>'155',
        );
        $resp=asterisk_req($params,true);
        if ($resp[0]['response']!=='Success') answer(array('status'=>'error','data'=>$resp[0]));
        answer(array('status'=>'ok','action'=>$action,'data'=>$resp[0]));

}

But I have phones connected via iax, it doesn't work with them.
How can the script be modified so that the call goes through both SIP and IAX2?
Thank you!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question