[Asterisk-cvs] asterisk/channels chan_sip.c,1.651,1.652
markster at lists.digium.com
markster at lists.digium.com
Fri Feb 11 15:16:33 CST 2005
- Previous message: [Asterisk-cvs] asterisk Makefile, 1.134, 1.135 asterisk.c, 1.140,
1.141
- Next message: [Asterisk-cvs] zaptel proslic.h, 1.1, 1.2 wctdm.c, 1.104,
1.105 wcusb.c, 1.9, 1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv8252/channels
Modified Files:
chan_sip.c
Log Message:
Flagify hold (bug #3456)
Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.651
retrieving revision 1.652
diff -u -d -r1.651 -r1.652
--- chan_sip.c 10 Feb 2005 21:14:11 -0000 1.651
+++ chan_sip.c 11 Feb 2005 21:16:34 -0000 1.652
@@ -302,6 +302,8 @@
#define SIP_OSPAUTH_NO (0 << 26)
#define SIP_OSPAUTH_YES (1 << 26)
#define SIP_OSPAUTH_EXCLUSIVE (2 << 26)
+/* Call states */
+#define SIP_CALL_ONHOLD (1 << 28)
/* a new page of flags */
#define SIP_PAGE2_RTCACHEFRIENDS (1 << 0)
@@ -409,7 +411,6 @@
struct sip_history *history; /* History of this SIP dialog */
struct ast_variable *vars;
struct sip_pvt *next; /* Next call in chain */
- int onhold; /* call on hold */
} *iflist = NULL;
#define FLAG_RESPONSE (1 << 0)
@@ -2834,22 +2835,22 @@
/* Turn on/off music on hold if we are holding/unholding */
if (sin.sin_addr.s_addr && !sendonly) {
ast_moh_stop(ast_bridged_channel(p->owner));
- if (callevents && p->onhold) {
+ if (callevents && ast_test_flag(p, SIP_CALL_ONHOLD)) {
manager_event(EVENT_FLAG_CALL, "Unhold",
"Channel: %s\r\n"
"Uniqueid: %s\r\n",
p->owner->name,
p->owner->uniqueid);
- p->onhold = 0;
+ ast_clear_flag(p, SIP_CALL_ONHOLD);
}
} else {
- if (callevents && !p->onhold) {
+ if (callevents && !ast_test_flag(p, SIP_CALL_ONHOLD)) {
manager_event(EVENT_FLAG_CALL, "Hold",
"Channel: %s\r\n"
"Uniqueid: %s\r\n",
p->owner->name,
p->owner->uniqueid);
- p->onhold = 1;
+ ast_set_flag(p, SIP_CALL_ONHOLD);
}
ast_moh_start(ast_bridged_channel(p->owner), NULL);
if (sendonly)
- Previous message: [Asterisk-cvs] asterisk Makefile, 1.134, 1.135 asterisk.c, 1.140,
1.141
- Next message: [Asterisk-cvs] zaptel proslic.h, 1.1, 1.2 wctdm.c, 1.104,
1.105 wcusb.c, 1.9, 1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the svn-commits
mailing list