[asterisk-users] Getting SIP Response Code from HANGUPCAUSE
Tilghman Lesher
tilghman at mail.jeffandtilghman.com
Fri Oct 26 20:10:11 CDT 2007
On Friday 26 October 2007 19:47:27 SIP wrote:
> Tilghman Lesher wrote:
> > On Friday 26 October 2007 16:13:11 Douglas Garstang wrote:
> >> Thanks. I am quite familiar with ngrep. I was asking how I could get the
> >> SIP response code from the dial plan.
> >
> > You cannot. And you shouldn't have to. The dialplan should be generic
> > to all protocols, not customized to SIP.
>
> I disagree that is SHOULDN'T be available. We should have the option to
> test for a SIP error return code of a specific type if we want. It can
> make the logic for SIP calls considerably nicer -- especially in a
> complex AGI.
>
> Generally, I've found that dialplans should NOT be generic. They should
> be customised to your particular environment. If your environment is
> SIP, then the customisation should be available.
Well, unfortunately for you, that is the exact opposite of the philosophy of
the Asterisk codebase. Every attempt is made to genericize the channel
driver interface so that you do not need to know the details of the underlying
driver. Where we have failed to do so in the past, we are attempting to
rectify in current approaches.
The only place where it is reasonable to customize is in the specification of
the channel in the configuration file. That is where you would customize, for
example, whether DTMF is inband, SIP INFO, or RFC 2833, as well as what
codecs will be negotiated for that particular user/peer.
--
Tilghman
More information about the asterisk-users
mailing list