1

Any ideas how to dial sip:5555@192.168.55.5:5060 from within PHP script and keep this call up on a timer, like for 60 seconds? This phone call will not hit the outside world and there will be NO voice on it. It just needs to be a "nailed up" connection for 60 seconds. It hits an in house application (IVR) on the same subnet, it is needed just to start up the IVR application when PHP script is invoked. Everything else on this subject is people wanting to make actual voice calls or connect to a SIP provider or fancy real world things using their providers libraries or API's. No need for any of that because the phone call is not leaving the same server it originates from. Shouldn't it be simple?

Fahad Sadah
  • 2,368
  • 3
  • 18
  • 27
Nanosynth
  • 97
  • 6

2 Answers2

1

I got this. Everything I want to do is within "Twinkle" SIP soft-phone and click to call and PHP code from them. Just hard-code their fancy PHP script to dial one number (versus wait for input) and execute it from an http call to activate it. Beautiful. See, everyone else lets you download API's or "Library's" that only function with their paid services. I don't want to make a phone call to the outside world, and I don't need to talk on the thing either. Just call an phone number extension on your own network, not theirs, and keep the call pinned up.

Nanosynth
  • 97
  • 6
0

It is just opening a socket connection and send the proper payload.

for the playload see https://stackoverflow.com/a/42138141/151097
for using sockets in php see http://php.net/manual/en/book.sockets.php

Rufinus
  • 29,200
  • 6
  • 68
  • 84
  • 1
    I would need to make a complete SIP dialog to keep a call up. Invite, trying, ringing, ok, ack, ( early SDP for offerings/negotiations) and then open RTP path/ports and put call on hold for 60 seconds in ipv4=0.0.0.0 for the hold. There is more to it than I thought once I started thinking about how SIP works. Right? I don't know PHP enough to know about it's sockets. That one link you gave me where he sends the well constructed INVITE, I guess I could learn from that. Am I on the right track as it pertains to having PHP do it? Do I need to construct a complete SIP dialog in PHP? – Nanosynth May 19 '18 at 22:22