[asterisk-users] evaluate SIP response codes in dialplan
Klaus Darilion
klaus.mailinglists at pernau.at
Fri Jan 16 02:57:51 CST 2009
Johansson Olle E schrieb:
> 15 jan 2009 kl. 12.42 skrev Klaus Darilion:
>
>>
>> Johansson Olle E schrieb:
>>> 14 jan 2009 kl. 18.57 skrev Philipp Kempgen:
>>>
>>>> Klaus Darilion schrieb:
>>>>> Philipp Kempgen schrieb:
>>>>>> Klaus Darilion schrieb:
>>>>>>> Is it somehow possible to evaluate the SIP response code inside
>>>>>>> the
>>>>>>> dialplan?
>>>>>> No.
>>>>>> Part of the reasoning is that Asterisk is meant to be a multi-
>>>>>> protocol PBX, not a SIP softswitch.
>>>>> This is IMO a stupid limitation. There are dozens of ISDN cause
>>>>> codes,
>>>>> dozens of SIP response codes and similar in other protocols, but
>>>>> Dial()
>>>>> only exports BUSY or CONGESTION ......
>>>> I know. But the developers didn't want to add it.
>>> Which is incorrect. We don't want to add expose every protocol to the
>>> dialplan if not needed. As Josh and I've stated, we have the
>>> HANGUPCAUSE that gives you this level of detail, but in a
>>> multiprotocol way.
>>>
>>> The most important feature of Asterisk is that it's a multiprotocol
>>> PBX. Even if I think there's only one protocol for the future,
>>> there's
>>> still a lot of old stuff out there and the beauty is that I can
>>> produce services in asterisk covering all of these without knowing
>>> the
>>> details of all these protocols. It would be really bad if I had to
>>> write one app for every protocol covered by my dialplan.
>> That's OK. HANGUPCAUSE is OK. Nevertheless a configurable mapping
>> cause
>> codes <-> SIP response codes would be nice :-)
> Absolutely - contact me off line to discuss such a project :-)
>
> In the meantime, we could document this a bit better.
Yes - for example a note in the documentation of DIALSTATUS which refers
to HANGUPCAUSE.
One of the problems with hangupcause is, that is might get changed from
one Asterisk to another - e.g. Hangup(3) generates a SIP 404 response
which gets translated to hangupcause 1. So, a mechanism to signal
Asterisk hangupcauses from one Asterisk to another Asterisk would be nice.
IIRC I once saw a prorietary Asterisk header (X-Hangupcause or similar)
in a SIP response, but I could find it currently.
regards
klaus
regards
klaus
More information about the asterisk-users
mailing list