level7systems / php-sip

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

Update PhpSIP.class.php #13

Open ethaniel opened 3 months ago

ethaniel commented 3 months ago

Fixed the send() function - moved 407 and 401 checks to the end of the function, otherwise INVITE command doesn't work Also added public function getCode() which waits for a message and returns the res_code. Useful when following a call progress from the user script.

(solutions explained here: https://github.com/level7systems/php-sip/issues/3)