xuedezhang / php-sip

Automatically exported from code.google.com/p/php-sip
0 stars 0 forks source link

Not responding to 407 #14

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Just trying to use the example script and unfortunately not having much 
success. Viewing the SIP logs at the other end it seems it is not sending the 
username/password when receiving a 407 proxy auth required message.

<?php
require_once('php-sip/PhpSIP.class.php');

try
{
  $api = new PhpSIP('my.ip');
  $api->setDebug(true);
  $api->setMethod('INVITE');
  $api->setProxy('my.proxy.adress');
  $api->setFrom('sip:my@uri');
  $api->setUsername('myusername');
  $api->setPassword('mypassword');
  $api->setUri('sip:my@uri');
  $res = $api->send();
  echo "res1: $res\n";

} catch (Exception $e) {

  echo $e->getMessage()."\n";
}

?>
--> INVITE sip:my@uri SIP/2.0
<-- SIP/2.0 100 Trying
<-- SIP/2.0 407 Proxy Authentication Required
--> ACK sip:my@uri SIP/2.0
res1: 407

Original issue reported on code.google.com by gareth.b...@timico.co.uk on 13 Feb 2012 at 2:45

GoogleCodeExporter commented 8 years ago
Did you ever get this working?

Original comment by m...@theplanoprogrammer.com on 29 Jul 2012 at 4:55