level7systems / php-sip

PHP SIP User Agent class
MIT License
51 stars 39 forks source link

No final response in 10 seconds. (35) #4

Open matrad opened 6 years ago

matrad commented 6 years ago

Hello,

I always get The error message No final response in 10 seconds (I'm using Avaya IPO 10.1). If I register a softphone client on my PC then the INVITE is working (the call is started), but the request always get's in timeout on the first 10 seconds.

I'm using this tutorial: https://level7systems.co.uk/click_to_call_with_php_sip/

Any Idea what is the problem here? The script is stuck on $this->readMessage() in the send-Method.

In the trace I see this request:

 16:19:30 2179115091mS SIP Rx: UDP 192.168.1.126:5065 -> 192.168.1.170:5060
                    INVITE sip:8004@192.168.1.170 SIP/2.0
                    Via: SIP/2.0/UDP 192.168.1.126:5065;rport;branch=z9hG4bK808467
                    From: <sip:8003@192.168.1.126>;tag=82155
                    To: <sip:8004@192.168.1.170>
                    Call-ID: 8ca87e628b8bd7a952e9a8eb6fb28efa@192.168.1.126
                    CSeq: 20 INVITE
                    Contact: <sip:8003@192.168.1.126:5065>
                    Content-Type: application/sdp
                    Max-Forwards: 70
                    User-Agent: PHP SIP
                    Subject: click2call
                    Content-Length: 225

                    v=0
                    o=click2dial 0 0 IN IP4 192.168.1.126
                    s=click2dial call
                    c=IN IP4 192.168.1.126
                    t=0 0
                    m=audio 8000 RTP/AVP 0 8 18 3 4 97 98
                    a=rtpmap:0 PCMU/8000
                    a=rtpmap:18 G729/8000
                    a=rtpmap:97 ilbc/8000
                    a=rtpmap:98 speex/8000
RussellJuma commented 5 years ago

Working on the same problem right now. I believe that the web server that is hosting the php can send the command to the sip server, but cannot receive data back on the designated port, hence "No final response in 10 seconds." Open the port on PHP server inbound and outbound. Let me know if this helps.

Take a look at in PhpSIP.class.php :

 * Min port
   */
  private $min_port = 5065;
   * Request port
   */
  private $port = 5065;
sharif779 commented 3 years ago

Same thing happen in my server also.Can you please give me the solution for it.

RussellJuma commented 3 years ago

Same thing happen in my server also.Can you please give me the solution for it.

Is port 5065 open?

sharif779 commented 3 years ago

Actually I am trying to receive in 5061.And yes 5061 is open and I am getting response by python socket

l7s commented 3 years ago

Hi, I have just made a commit 11122c272657942a344874180eded5566c0e9ec4 with new example PHP code which sends anonymous SIP OPTIONS request to our SIP Proxy. It may be an easy way to verify your PHP / environment is capable of running PhpSIP. The way to test is:

git clone https://github.com/level7systems/php-sip.git

next edit this line to enter your own IP address, and run in the console:

php options.php

this should produce output similar to:

--> OPTIONS sip:test@eu.sip.ssl7.net SIP/2.0
<-- SIP/2.0 200 OK
  New dialog: 76067.ae18.7b7d24acb6593d274c92f062d175c63a.4f813bda2ec790b2ddb92c338ad7cc5c@192.168.5.65
response: 200

which confirms PhpSIP was able to:

  1. Bind to local IP address and open UDP socket for sending / receiving data.
  2. Send SIP UDP request to remote host.
  3. Receive and parse incoming response from remote host.

All of which are required for PhpSIP to work correctly.

Let me know if you need any more help.

Regards, Chris