Announcement

Collapse
No announcement yet.

Voip integration AMI problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Voip integration AMI problem

    Hello,

    Current version: 7.3.4 - VoIP Integration 1.22.3​

    I configure the ami voip. The connections is okay.
    When i want to make a call from espo, the call is ringing on the extension phone. If i call from user who has extension 100 the phone is ringing on extension 100.
    I have GRANDSREAM UCM6300A.
    What do I do wrong? In the amy caller log does not appear the client number.
    Can anyone help me? I will pay for it if necessary.

    AMI CALLER LOG
    Asterisk Call Manager/5.0.0
    action: login
    Response: Success
    Message: Authentication accepted

    Event: SuccessfulAuth
    Privilege: security,all
    EventTV: 2023-05-26T14:40:25.588+0300
    Severity: Informational
    Service: AMI
    EventVersion: 1
    AccountID: muulox87
    SessionID: 0x7f96cfb648
    LocalAddress: IPV4/TCP/0.0.0.0/5038
    RemoteAddress: IPV4/TCP/192.168.0.163/7900
    UsingPassword: 0
    SessionTV: 2023-05-26T14:40:25.587+0300

    Event: SuccessfulAuth
    Privilege: security,all
    EventTV: 2023-05-26T14:40:35.695+0300
    Severity: Informational
    Service: AMI
    EventVersion: 1
    AccountID: muulox87
    SessionID: 0x7f9aa90048
    LocalAddress: IPV4/TCP/0.0.0.0/5038
    RemoteAddress: IPV4/TCP/188.240.235.70/50870
    UsingPassword: 0
    SessionTV: 2023-05-26T14:40:35.695+0300

    Event: Newchannel
    Privilege: call,all
    Channel: PJSIP/100-00000235
    ChannelState: 0
    ChannelStateDesc: Down
    CallerIDNum: 100
    CallerIDName: Financiar
    ConnectedLineNum:
    ConnectedLineName:
    Language: en
    AccountCode:
    Context: from-internal
    Exten: s
    Priority: 1
    Callid:
    PageFlag: false
    Application:
    Reg_calleenum:
    Reg_callernum:
    Reg_callername:
    InboundConf: no
    Uniqueid: 1685101235.1307
    Linkedid: 1685101235.1307

    Event: Newexten
    Privilege: dialplan,all
    Channel: PJSIP/100-00000235
    ChannelState: 0
    ChannelStateDesc: Down
    CallerIDNum: 100
    CallerIDName: Financiar
    ConnectedLineNum:
    ConnectedLineName:
    Language: en
    AccountCode:
    Context: from-internal
    Exten: s
    Priority: 1
    Callid:
    PageFlag: false
    Application: AppDial2
    Reg_calleenum:
    Reg_callernum:
    Reg_callername:
    InboundConf: no
    Uniqueid: 1685101235.1307
    Linkedid: 1685101235.1307
    Extension: s
    Application: AppDial2
    AppData: (Outgoing Line)

    Event: NewConnectedLine
    Privilege: call,all
    Channel: PJSIP/100-00000235
    ChannelState: 0
    ChannelStateDesc: Down
    CallerIDNum: 100
    CallerIDName: Financiar
    ConnectedLineNum: 100
    ConnectedLineName:
    Language: en
    AccountCode:
    Context: from-internal
    Exten: s
    Priority: 1
    Callid:
    PageFlag: false
    Application: AppDial2
    Reg_calleenum:
    Reg_callernum:
    Reg_callername:
    InboundConf: no
    Uniqueid: 1685101235.1307
    Linkedid: 1685101235.1307

    Event: DialBegin
    Privilege: call,all
    DestChannel: PJSIP/100-00000235
    DestChannelState: 0
    DestChannelStateDesc: Down
    DestCallerIDNum: 100
    DestCallerIDName: Financiar
    DestConnectedLineNum: 100
    DestConnectedLineName:
    DestLanguage: en
    DestAccountCode:
    DestContext: from-internal
    DestExten: s
    DestPriority: 1
    DestCallid:
    DestPageFlag: false
    DestApplication: AppDial2
    DestReg_calleenum:
    DestReg_callernum:
    DestReg_callername:
    DestInboundConf: no
    DestUniqueid: 1685101235.1307
    DestLinkedid: 1685101235.1307
    DialString: 100​

    Thank you!
    Last edited by muulox; 05-26-2023, 11:46 AM.

  • #2
    Behavior of click-to-call:
    1. First, the PBX initiates a call to the user's extension.
    2. Once the user hangs up the call from the PBX, the system initiates a call to the desired number.

    Comment


    • #3
      Hi,
      as dimyy say, the behavior is so.

      But really, this behavior is not the really not usable for us.. and i think for many other situation.


      I don't know if this is possible with AMI Asterisk.. but when click-to-call, Ami Asterisk must send "Key" to the phone (each digit of the phoneNumber).. so the phone is ready to make the call. User just need to hand (décrocher) and the call is initiate.. else, the phone go idle mode after X seconds.
      So the phone never ringing.

      Comment


      • #4
        Maybe this can help or give idea :

        this code send "Key" to cisco spa phone.. so on the screen you see phoneNumber as user have push each digit manually..


        PHP Code:

                $url 
        "http://{$phoneIp}/CGI/Execute";

                
        $curl curl_init($url);
                
        curl_setopt($curlCURLOPT_URL$url);
                
        curl_setopt($curlCURLOPT_POSTtrue);
                
        curl_setopt($curlCURLOPT_RETURNTRANSFERtrue);

                
        $headers = [
                   
        "Content-Type: text/xml",
                   
        "Accept: text/xml",
                ];
                
        curl_setopt($curlCURLOPT_HTTPHEADER$headers);

                
        $postData 'XML=<CiscoIPPhoneExecute>';
                
        $phoneNumberArray str_split($phoneNumber );

                foreach(
        $phoneNumberArray as $digit)
                {
                    
        $postData .=  '<ExecuteItem URL="Key:KeyPad' .$digit .'"/>';
                }
                
        $postData .= '</CiscoIPPhoneExecute>';

                
        curl_setopt($curlCURLOPT_POSTFIELDS$postData);
                
        curl_setopt($curlCURLOPT_SSL_VERIFYHOSTfalse);
                
        curl_setopt($curlCURLOPT_SSL_VERIFYPEERfalse);

                
        $resp curl_exec($curl);
                
        curl_close($curl);​ 

        Comment


        • #5
          I understand, it works! THX
          I have 1 request. Espo does not show incoming calls and outgoing calls.
          I pased this comand to crown in cpanel: * * * * * cd /home/muuloxro/erp.muulox.ro; -f command.php voip Asterisk > /dev/null 2>&1
          This comand is okey?​
          Last edited by muulox; 05-30-2023, 11:40 AM.

          Comment


          • #6
            I resolved
            * * * * * cd /home/muuloxro/erp.muulox.ro; /opt/cpanel/ea-php81/root/usr/bin/php -f command.php voip Asterisk > /dev/null 2>&1​

            Comment

            Working...
            X