[Asterisk-cvs] asterisk/channels chan_sip.c,1.609,1.610
markster at lists.digium.com
markster at lists.digium.com
Sun Jan 2 18:46:40 CST 2005
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv353/channels
Modified Files:
chan_sip.c
Log Message:
Merge OEJ's print groups feature (bug #3228, with changes)
Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.609
retrieving revision 1.610
diff -u -d -r1.609 -r1.610
--- chan_sip.c 2 Jan 2005 00:48:11 -0000 1.609
+++ chan_sip.c 3 Jan 2005 00:51:57 -0000 1.610
@@ -5902,20 +5902,8 @@
/*--- print_group: Print call group and pickup group ---*/
static void print_group(int fd, unsigned int group)
{
- unsigned int i;
- int first=1;
-
- for (i=0; i<=31; i++) { /* Max group is 31 */
- if (group & (1 << i)) {
- if (!first) {
- ast_cli(fd, ", ");
- } else {
- first=0;
- }
- ast_cli(fd, "%u", i);
- }
- }
- ast_cli(fd, " (%u)\n", group);
+ char buf[256];
+ ast_cli(fd, ast_print_group(buf, sizeof(buf), group) );
}
static const char *dtmfmode2str(int mode)
@@ -5928,6 +5916,7 @@
case SIP_DTMF_INBAND:
return "inband";
}
+ return "<error>";
}
static const char *insecure2str(int mode)
@@ -5940,6 +5929,7 @@
case SIP_INSECURE_VERY:
return "very";
}
+ return "<error>";
}
/*--- sip_show_peer: Show one peer in detail ---*/
@@ -9065,6 +9055,7 @@
return 0;
}
+/*--- sip_get_rtp_peer: Returns null if we can't reinvite */
static struct ast_rtp *sip_get_rtp_peer(struct ast_channel *chan)
{
struct sip_pvt *p;
@@ -9287,12 +9278,14 @@
return 0;
}
+/*--- sip_get_codec: Return peers codec ---*/
static int sip_get_codec(struct ast_channel *chan)
{
struct sip_pvt *p = chan->pvt->pvt;
return p->peercapability;
}
+/*--- sip_rtp: Interface structure with callbacks used to connect to rtp module --*/
static struct ast_rtp_protocol sip_rtp = {
get_rtp_info: sip_get_rtp_peer,
get_vrtp_info: sip_get_vrtp_peer,
More information about the svn-commits
mailing list