Make all of the various rtpqos parameters in this branch available from the CHANNEL function.

Also includes a test for retrieving rtpqos parameters, including a NULL RTP
driver.  Additionally, some further separation of the SIP internal API into
headers was necessary.

(closes issue #16652)
 Reported by: kkm
 Patches: 
       20100204__issue16652.diff.txt uploaded by tilghman (license 14)
 
Review: https://reviewboard.asterisk.org/r/501/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@247124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2010-02-17 06:25:15 +00:00
parent 68c6175f87
commit e7a5fb5459
8 changed files with 604 additions and 185 deletions

View File

@@ -22,8 +22,11 @@
#ifndef _SIP_UTILS_H
#define _SIP_UTILS_H
/*!
* \brief converts ascii port to int representation.
/* wrapper macro to tell whether t points to one of the sip_tech descriptors */
#define IS_SIP_TECH(t) ((t) == &sip_tech || (t) == &sip_tech_info)
/*!
* \brief converts ascii port to int representation.
*
* \arg pt[in] string that contains a port.
* \arg standard[in] port to return in case the port string input is NULL
@@ -40,4 +43,41 @@ unsigned int port_str2int(const char *pt, unsigned int standard);
const char *find_closing_quote(const char *start, const char *lim);
/*! \brief Convert SIP hangup causes to Asterisk hangup causes */
int hangup_sip2cause(int cause);
/*! \brief Convert Asterisk hangup causes to SIP codes
\verbatim
Possible values from causes.h
AST_CAUSE_NOTDEFINED AST_CAUSE_NORMAL AST_CAUSE_BUSY
AST_CAUSE_FAILURE AST_CAUSE_CONGESTION AST_CAUSE_UNALLOCATED
In addition to these, a lot of PRI codes is defined in causes.h
...should we take care of them too ?
Quote RFC 3398
ISUP Cause value SIP response
---------------- ------------
1 unallocated number 404 Not Found
2 no route to network 404 Not found
3 no route to destination 404 Not found
16 normal call clearing --- (*)
17 user busy 486 Busy here
18 no user responding 408 Request Timeout
19 no answer from the user 480 Temporarily unavailable
20 subscriber absent 480 Temporarily unavailable
21 call rejected 403 Forbidden (+)
22 number changed (w/o diagnostic) 410 Gone
22 number changed (w/ diagnostic) 301 Moved Permanently
23 redirection to new destination 410 Gone
26 non-selected user clearing 404 Not Found (=)
27 destination out of order 502 Bad Gateway
28 address incomplete 484 Address incomplete
29 facility rejected 501 Not implemented
31 normal unspecified 480 Temporarily unavailable
\endverbatim
*/
const char *hangup_cause2sip(int cause);
#endif