Fix the remote peer. Asterisk is simply reporting that the system to which it tried to forward the call is rejecting it with an error which, at face values, says that, other, system is broken.
If the peer isn’t breaking on calls, it will be breaking on REGISTER, or on the OPTIONS requests used to test whether there is still a valid communications path to it (and also to keep firewall and NAT rules alive).
If you enable “sip set debug on” and provide the traffic including the 500 Internal Server Error then we can narrow down what exactly we’re sending that it doesn’t like.
The chan_sip module is sending NOTIFY messages to the Polycoms to provide information about the availability of extensions. They are responding with the 500 Internal Server Error. Why that is I’m not sure.
What’s strange is that I put an Asterisk with version 1.2.31 running for a while (which is in production has version 1.2.29) and these error messages never appeared. Today I put the version 1.2.29 in production again and the problem reappeared and in force … which leads me to believe that it will be more of an Asterisk problem instead of being a terminal problem (Polycom phones)…what do you think?