Re: [asterisk-users] [External] 180 Ringing missing

2020-12-01 Thread Alex Hermann
On dinsdag 1 december 2020 13:22:17 CET Floimair Florian wrote:
> If you have 183 Session progress, there is no need to send 180 Ringing
> (especially not AFTER 183 Session progress), as you already have
> early media instead. Having both is actually a bit misleading IMHO.

I disagree (and I think rfc3261 agrees).  How would the caller know if 
the callee has been alerted if he doesn't receive the 180?

183 and 180 have different meaning. 180 indicates the callee is being 
alerted. An 183 has no such meaning but is often used to setup early 
media (although any 1xx can do that). 180 and 183 are not mutually 
exclusive and in fact form a full matrix of possible and useful states. 
There can be early media without any phone ringing (announcement), 
ringing without early media (caller is expected to generate a ringback 
tone itself), no early media nor ringing and finally early media and 
ringing simultaneous.

Especially automata calling will want to know the difference.

Of course, a generated ringback tone by the caller should be stopped 
when media is received.

Asterisk should indicate to the caller the same state it received from 
the callee.
-- 
Alex Hermann



-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Duplicate channel variables after transfer

2010-08-27 Thread Alex Hermann
Hi all,


with an (attended) transfer i see the following happening:

1) A calls B1
2) B2 calls C
3) B2 transfers call to A
4) A talks to C


At step 3, the channel A is connected to channel C and B1 and B2 are hung up. 
In the h extension for channel B2, the channel is renamed to B2ZOMBIE and i 
see that the channel variables of A have been merged into B2ZOMBIE. If there 
were duplicate names for variables, the channel now has those variables 
doubled. The DumpChan() application called from the h extension confirms this.

In my case the channels are all SIP channels and in the h extension I want to 
access the SIPCALLID variable of the A channel. Every access to it gives me 
the wrong value namely that of channel B1. How do i access the _second_ 
variable named SIPCALLID in the channel?

Extract from DumpChan() as an example:

Dumping Info For Channel: SIP/sipout-0055ZOMBIE:

Info:
Name=   SIP/sipout-0055ZOMBIE
Type=   SIP
UniqueID=   1282913436.108

Variables:
...
sipcallid=eae94252-ebf23...@172.28.4.112
...
sipcallid=lyvkqtybsgrt...@172.28.4.113
...



I want to get lyvkqtybsgrt...@172.28.4.113 instead of eae94252-
ebf23...@172.28.4.112 as a result.

-- 
Greetings,

Alex Hermann


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 1.6.0.11-rc2, 1.6.1.2, 1.6.1.3-rc1, and 1.6.2.0-beta4 Release Announcement

2009-08-03 Thread Alex Hermann
On Monday 03 August 2009, Asterisk Team wrote:
 The release of 1.6.1.2 fixes a remote crash security vulnerability in the
 RTP stack.  The related security advisory AST-2009-004 has been released
 along with this announcement.  Please read that advisory for more
 information.

 For a full list of changes in these releases, please see the ChangeLogs:
 http://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-1.6
.1.2

The chaneglog doesn't mention anything on fixing a security issue. Even worse, 
the changelog doesn't mention anyting at all besides the version increment. 
Is the fix really applied?
-- 
Met vriendelijke groet,


Alex Hermann
SpeakUp BV
T: 088-SPEAKUP (088-7732587)
F: 088-7732588

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Bitwise AND

2009-06-09 Thread Alex Hermann
Hello,


How can I do bitwise AND operations on a variable? I want to check the bits 
set in the HANGUPCAUSE, but can't find a way to do it.
-- 
Alex Hermann


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Not answering call when queue is full or has no members

2009-02-19 Thread Alex Hermann
Hello all,


I'm trying to prevent answering a channel when a queue is either full or has 
no members. It seems I'm forced to answer a call before I call Queue() or 
else the audio is in the early media (which is unacceptable because of the 
short duration of early media on ISDN).

Is there any way to let Queue() automatically answer a channel if the call is 
going to be placed in the queue and will still be unanswered when the 
QUEUESTATUS is any of FULL, JOINEMPTY, or JOINUNAVAIL?


-- 
Greetings,

Alex Hermann


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] [PATCH] Auto answer channel after successfull queue entry (was Re: Not answering call when queue is full or has no members)

2009-02-19 Thread Alex Hermann
On Thursday 19 February 2009, Lenz Emilitri wrote:
 You can know if the queue is full before issuing the answer() or the
 queue() command, so you can avoid answering at all.

I don't think the 'maxlen' option is available from the dialplan. Further, the 
QUEUE_MEMBER_COUNT function doesn't work with realtime queues.

Anyway,

I've patched the Queue application to accept an 'a' option, which will 
automatically answer a channel if it has successfully entered the queue. 

Patch against 1.4.21 is attached. Will submit for inclusion whenever I've 
upgraded to 1.6.
-- 
Greetings,

Alex Hermann

Index: asterisk-1.4.speakup.21/apps/app_queue.c
===
--- asterisk-1.4.speakup.21.orig/apps/app_queue.c	2009-02-19 15:48:32.0 +0100
+++ asterisk-1.4.speakup.21/apps/app_queue.c	2009-02-19 16:22:50.0 +0100
@@ -155,6 +155,7 @@
 This application will return to the dialplan if the queue does not exist, or\n
 any of the join options cause the caller to not enter the queue.\n
 The option string may contain zero or more of the following characters:\n
+  'a' -- auto-answer the call when successfully entered the queue.\n
   'd' -- data-quality (modem) call (minimum delay).\n
   'h' -- allow callee to hang up by hitting *.\n
   'H' -- allow caller to hang up by hitting *.\n
@@ -177,7 +178,7 @@
 seconds, checked between each queues.conf 'timeout' and 'retry' cycle.\n
   This application sets the following channel variable upon completion:\n
   QUEUESTATUSThe status of the call as a text string, one of\n
- TIMEOUT | FULL | JOINEMPTY | LEAVEEMPTY | JOINUNAVAIL | LEAVEUNAVAIL\n;
+ TIMEOUT | FULL | JOINEMPTY | LEAVEEMPTY | JOINUNAVAIL | LEAVEUNAVAIL | ANSWERFAILED\n;
 
 static char *app_aqm = AddQueueMember ;
 static char *app_aqm_synopsis = Dynamically adds queue members ;
@@ -280,6 +281,7 @@
 	QUEUE_JOINUNAVAIL = 4,
 	QUEUE_LEAVEUNAVAIL = 5,
 	QUEUE_FULL = 6,
+	QUEUE_ANSWER_FAILED = 7,
 };
 
 const struct {
@@ -293,6 +295,7 @@
 	{ QUEUE_JOINUNAVAIL, JOINUNAVAIL },
 	{ QUEUE_LEAVEUNAVAIL, LEAVEUNAVAIL },
 	{ QUEUE_FULL, FULL },
+	{ QUEUE_ANSWER_FAILED, ANSWERFAILED },
 };
 
 /*! \brief We define a custom local user structure because we
@@ -1403,7 +1406,7 @@
 	return q;
 }
 
-static int join_queue(char *queuename, struct queue_ent *qe, enum queue_result *reason)
+static int join_queue(struct ast_channel *chan, char *queuename, int auto_answer, struct queue_ent *qe, enum queue_result *reason)
 {
 	struct call_queue *q;
 	struct queue_ent *cur, *prev = NULL;
@@ -1427,6 +1430,15 @@
 	else if (q-maxlen  (q-count = q-maxlen))
 		*reason = QUEUE_FULL;
 	else {
+
+		if (auto_answer  chan-_state != AST_STATE_UP) {
+			res = ast_answer(chan);
+			if (res) {
+*reason = QUEUE_ANSWER_FAILED;
+goto done;
+			}
+		}
+
 		/* There's space for us, put us at the right position inside
 		 * the queue.
 		 * Take into account the priority of the calling user */
@@ -1462,6 +1474,7 @@
 		if (option_debug)
 			ast_log(LOG_DEBUG, Queue '%s' Join, Channel '%s', Position '%d'\n, q-name, qe-chan-name, qe-pos );
 	}
+done:
 	ast_mutex_unlock(q-lock);
 	AST_LIST_UNLOCK(queues);
 
@@ -3694,6 +3707,7 @@
 {
 	int res=-1;
 	int ringing=0;
+	int auto_answer=0;
 	struct ast_module_user *lu;
 	const char *user_priority;
 	const char *max_penalty_str;
@@ -3771,6 +3785,9 @@
 	if (args.options  (strchr(args.options, 'r')))
 		ringing = 1;
 
+	if (args.options  (strchr(args.options, 'a')))
+		auto_answer = 1;
+
 	if (option_debug)
 		ast_log(LOG_DEBUG, queue: %s, options: %s, url: %s, announce: %s, expires: %ld, priority: %d\n,
 			args.queuename, args.options, args.url, args.announceoverride, (long)qe.expire, prio);
@@ -3783,7 +3800,7 @@
 	qe.last_periodic_announce_time = time(NULL);
 	qe.last_periodic_announce_sound = 0;
 	qe.valid_digits = 0;
-	if (!join_queue(args.queuename, qe, reason)) {
+	if (!join_queue(chan, args.queuename, auto_answer, qe, reason)) {
 		int makeannouncement = 0;
 
 		ast_queue_log(args.queuename, chan-uniqueid, NONE, ENTERQUEUE, %s|%s, S_OR(args.url, ),
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users