[asterisk-users] Enterqueue event not generated when cfu internal

2023-11-13 Thread Jon Bonilla (Manwe)
Hi all

Using asterisk 16.25.0 (I know it's a bit old)


I'm trying to parse the realtime queue_log and I realized that not every call
has a ENTERQUEUE event. 

I see that if there's an internal call to an extension that has a dialplan
forward to a queue (no call is placed to the extension before calling the
queue), the ENTERQUEUE event is not generated in the queue_log

For calls from the pstn the event exists.

Both type of calls (incoming and internal) call the same Gosub to call the
queue. I don't get it why the events should be different.



any hints?



thank you.




-- 
PekePBX, the multitenant PBX solution
https://pekepbx.com

-- 
_
-- 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] Can't stop Mixmonitor

2023-05-30 Thread Jon Bonilla (Manwe)
Hi all

Using asterisk 16.25


I was trying to stop Mixmonitor using features. The code is executed but I
realized that I was executing StopMixmonitor from another channel so I opted to
use AMI.

When I call MixMonitor I store the channel name in a var and then I use
StopMixmonitor from AMI sending the stored channel name as parameter.

What I've seen is that the app returns failure and going a little bit deeper I
see that the failure comes from the function stop_mixmonitor_full in
app_mixmonitor.c


datastore = ast_channel_datastore_find(chan, _ds_info,
   S_OR(args.mixmonid, NULL));
if (!datastore) {
...
return -1

I know the error comes from that !datastore but I do not know how to follow and
dig into the problem.

any help?


cheers,

Jon




-- 
PekePBX, the multitenant PBX solution
https://pekepbx.com

-- 
_
-- 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

Re: [asterisk-users] cps limit of asterisk

2022-11-24 Thread Jon Bonilla (Manwe)
El Thu, 24 Nov 2022 15:08:12 +0500
Tahir Almas Dhesi  escribió:

> What cps and maximum concurrent calls on following hardware configuration
> with freeswitch possible ?
> 
> I need approximate speculation  not exact or real time results
> 
> Intel E-2286 G   2 x 960 SSD ,   6 cores / 12 threads @4 ghz ,   128 GB
> Memory   and no limitation on internet bandwidth
> 
> 

This is not a freeswitch list. This is the asterisk list.

Why don't you test yourself and share your results with us?

thank you



-- 
PekePBX, the multitenant PBX solution
https://pekepbx.com

-- 
_
-- 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

Re: [asterisk-users] Context for 302 Moved response

2022-04-27 Thread Jon Bonilla (Manwe)
El Wed, 27 Apr 2022 12:27:03 +1200
David Cunningham  escribió:

> Hello,
> 
> Does anyone know of a way to have a call go to a particular context when a
> 302 Moved is received in response to an invite? This is with chan_sip. We
> tried setting __TRANSFER_CONTEXT but it didn't seem to have any effect.
> Basically if a remote device returns a 302 Moved we want to send the call
> somewhere different to all other calls.
> 
> Thanks very much,
> 


You can detect a 302 in the dialplan. Not perfect but does the job.

same => n,GotoIf($[${EXISTS(${FORWARDERNAME})}]?sipcfu)


-- 
PekePBX, the multitenant PBX solution
https://pekepbx.com

-- 
_
-- 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] ExtenSpy enforced mode

2021-09-08 Thread Jon Bonilla (Manwe)
Hi all


I'm experiencing issues while trying to restrict ExtenSpy to a single user's
channels. 

I'm trying this:

same => n,ExtenSpy(${EXTEN:3},bde(${EXTEN:3}))

and this too

same => n,ExtenSpy(${EXTEN:3},bde(SIP/${EXTEN:3}))


Being EXTEN:3 ==  "ext20012104" in this scenario


And in the logs I see than the user can hear random channels that have no
relation with the one we're trying to spy.


Executing [spyext20012104@callspy:2] ExtenSpy("SIP/ext20012100-000159c6", 
"ext20012104,bde(SIP/ext20012104)") in new stack

Spying on channel SIP/pd20021-000159ab

Attaching spy channel SIP/ext20012100-000159c6 to SIP/pd20021-000159ab

Attaching spy channel SIP/ext20012100-000159c6 to SIP/pd20021-000159ab

Done Spying on channel SIP/pd20021-000159ab

Spying on channel SIP/ext20072102-000159bf

Attaching spy channel SIP/ext20012100-000159c6 to SIP/ext20072102-000159bf

Attaching spy channel SIP/ext20012100-000159c6 to SIP/ext20072102-000159bf

Done Spying on channel SIP/ext20072102-000159bf

Spying on channel SIP/pstn-000159b2


 continues ...




Any hints?

Asterisk 13.38.2 and chan_sip is being used. I had the same issue with asterisk
11.25.3 before I tried asterisk 13.

thank you.


-- 
_
-- 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

Re: [asterisk-users] SIP Source Port

2021-07-12 Thread Jon Bonilla (Manwe)
El Sat, 10 Jul 2021 23:02:10 +0200
Antony Stone  escribió:

> On Saturday 10 July 2021 at 22:57:09, Eric Wieling wrote:
> 
> > > On Sat, Jul 10, 2021 at 2:39 PM Alexander Perkins wrote:
> > >
> > > Hi All.  We have a provider that requires us to SOURCE the SIP
> > > connection on TCP 5061.  I honestly have no clue how to force
> > > Asterisk to always SOURCE the SIP connection on a certain port.  
> >
> > Have you considered using a not stupid provider?  
> 
> That would definitely be my preferred solution to this "problem".
> 
> Antony.
> 


I've seen this stupid thing before. It was a requirement of a solution from a
Israeli vendor named Cassiopea. 

port 5060 was for customers and 5061 was for peers. But not only locally, it
had to be the same for the remote port lol!


Yes, sems or kamailio in the middle might be the way to go. In my base it was
two sip-isdn gateways b2b lol!! It was 11 years ago.


cheers

-- 
PekePBX, the multitenant PBX solution
https://pekepbx.com

-- 
_
-- 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

Re: [asterisk-users] Load testing SIP registration attempts

2020-11-03 Thread Jon Bonilla (Manwe)
El Tue, 3 Nov 2020 16:20:22 +0100
Olivier  escribió:

> Hello,
> 
> How would you test how a PJSIP-powered Asterisk 13 instance resist to
> hostile REGISTRATION attempts ?
> 
> Would you use SIPp ? Any example scenario ?
> Would you go with an alternative tool ? Which one would you pick ?
> 
> Best regards


You've got a new SAAS for this:

https://sipfront.com/



cheers,

Jon


-- 
PekePBX, the multitenant PBX solution
https://pekepbx.com

-- 
_
-- 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

Re: [asterisk-users] Expert to work on load issue

2020-10-27 Thread Jon Bonilla (Manwe)
El Tue, 27 Oct 2020 12:52:47 -0400
Dovid Bender  escribió:

> Hi,
> 
> Sorry in advance that I am emailing the users list and not the biz list I
> think I will find my target audience here. We are looking to hire a
> consultant to help us figure out an issue. We are having what seems are
> "random load" issues with bare metal boxes that are dedicated to Asterisk
> and a few Perl AGI's. We went after all the usual suspects (CPU IDLE,
> memory usage etc.). I wrote the simple bash script below to show me total
> calls and CPU usage of Asterisk
> #! /bin/bash
> 
> 

Did you try FastAGI? Asterisk doesn't handle spawning many processes very well.
It's a bottleneck. 




-- 
PekePBX, the multitenant PBX solution
https://pekepbx.com

-- 
_
-- 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

Re: [asterisk-users] Redis in place of astdb

2020-07-10 Thread Jon Bonilla (Manwe)
El Thu, 9 Jul 2020 10:37:52 +0200
Antony Stone  escribió:

> On Thursday 09 July 2020 at 00:50:28, Jon Bonilla (Manwe) wrote:
> 
> > DO you know odbc redis drivers? It would be nice to store cdrs ans other
> > stuff in redis without patching asterisk  
> 
> A quick Google search turns up 
> https://www.cdata.com/kb/tech/redis-odbc-python-linux.rst
> which I have no experience of and cannot comment on, but looks like what you 
> need.
> 
> PS: I question the wisdom of storing CDRs in Redis - I think an RDBMS is the 
> correct tool for *that* job.  I agree that Redis may be useful in other
> areas, though.
> 

You're right but I need to do some post-processing to the cdr and store the
final one in mysql. 


-- 
PekePBX, the multitenant PBX solution
https://pekepbx.com

-- 
_
-- 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

Re: [asterisk-users] Redis in place of astdb

2020-07-09 Thread Jon Bonilla (Manwe)
El Wed, 8 Jul 2020 12:23:42 -0700
John Kiniston  escribió:

> Dovid, You could use func_odb + a ODBC Redis driver to keep from having to
> shell out.
> 
>


DO you know odbc redis drivers? It would be nice to store cdrs ans other stuff
in redis without patching asterisk




-- 
PekePBX, the multitenant PBX solution
https://pekepbx.com

-- 
_
-- 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

Re: [asterisk-users] Advanced Codec Negotiation: Need info and uses cases

2020-06-09 Thread Jon Bonilla (Manwe)
El Tue, 9 Jun 2020 09:46:32 -0600
George Joseph  escribió:


Hi George

> 
> 
> >
> > If transcoding is enabled Would it be possible to do the same but handle a
> > 488
> > back from Bob and failover to another INVITE with Bob's allow list to
> > handle
> > transcoding? That way we would always try no-transcoding before offering a
> > transcoding codec.
> >  
> 
> I think this is a good idea but might not be possible in the first release
> of Advanced Codecs.
> We'd also probably need an option to enable/disable retrying.
> 
> We might also be able to just handle this by taking Bob's allowed codecs
> but sorting
> them so that any codecs that Bob and Alice share come at the front of the
> list
> in the offer to Bob.
> 
> 

In this scenario. For example if we have

[alice]
disallow=all
allow=alaw
allow=opus

[bob]
disallow=all
allow=opus
allow=alaw
allow=gsm


In case Alice sends an INVITE with opus and g723 in the sdp.

1: We remove g723 as it's not in Alice's allow

2: When we send the INVITE to Bob either we:

  2a: Send the invite only with opus to avoid transcoding. If Bob's phone
  doesn't support opus and sends 488 back I'd send another INVITE with alaw and
  gsm to handle the call with transcoding.

  2b: We send the invite with opus, alaw and gsm and let Bob choose. In this
  case we don't try to avoid transcoding. 

  2c: We send invite with opus only and don't retry. I would do this only if
  transcoding is disabled by configuration. 

My preferred solution would be 2a/c based on a transcoding on/off configuration
option.

In your explanation transcoding is not done if you filter by the allowed codecs
of both + alice's INVITE. It could be possible to receive a 488 and without
retry we lose any transcoding capability.


right?


cheers,

Jon


-- 
PekePBX, the multitenant PBX solution
https://pekepbx.com

-- 
_
-- 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

Re: [asterisk-users] Advanced Codec Negotiation: Need info and uses cases

2020-06-05 Thread Jon Bonilla (Manwe)
El Fri, 5 Jun 2020 09:42:33 -0600
George Joseph  escribió:

> Greetings All,
> 
> We've been working hard on new codec negotiation stuff for Asterisk 18 and
> we've got some stuff to run by you.  It's a lot so please read carefully.

Hi Joseph


Thanks for such a detailed mail and involving the community. 


First of all, I'd have a transcoding=yes/no option to disable entirely
transcoding scenarios. That would make things easier for the scenarios you
describe. 


> 
> Simple use case, Alice to Bob, no direct media.
> 
> 1.  Under what conditions would we accept a format on an incoming offer
> from a UAC (Alice) that *wasn't* in the UAC's endpoint allow= parameter?
>  Does whether we accept formats not on the endpoint need to be
> configurable?   Don't just say "yes". :)   We need use cases.   We could
> use the offer's list exclusively, use the endpoint's list exclusively,
> merge the two together, or use only those in common.  What happens if after
> applying that operation, there are no formats in common?  Drop the call?
> Transocde? Using what format? It'd have to be one Alice accepts.  We'll
> save the process of transcoding for a follow-on discussion.
> 

In this case, I would only follow to Bob those codecs that Alice sends AND are
in the allow parameter. It's the most intuitive scenario. If after that there
are no formats in common I'd transcode or not depending if the option is
enabled or not. If not just send a 488 back. 


> 2.  Under what conditions would we send a codec in an offer to a UAS (Bob)
> that *wasn't* in the UAS's endpoint allow= parameter.   Similarly, under
> what conditions would we send a format to Bob that *was* in his endpoint
> allow= parameter but *wasn't* in the reconciled list we got from Alice via
> the core?  Same possible options and questions as above.


In this case I would do the following:

If transcoding is disabled I'd send Alice's list filtered by Alice's allow,
filtered by Bob's allow. 

If transcoding is enabled Would it be possible to do the same but handle a 488
back from Bob and failover to another INVITE with Bob's allow list to handle
transcoding? That way we would always try no-transcoding before offering a
transcoding codec. 

Anyway, I'd never send an offer to Bob which is not in Bob's allow list. That's
what allow is for.

> 
> 3.  OK now whatever we've decided to send to Bob, according to RFC3264 para
> 6.1, Bob MUST send back an answer that contains a common format OR reject
> the stream if there are no formats in common.  It doesn't say whether it's
> valid for Bob to send back formats we didn't request *in addition *to ones
> we did request.  It wouldn't make sense for him to do that because that
> same RFC and paragraph only says we MUST accept media in a format we sent.
> It doesn't mention what should happen if we get media in a format we
> *didn't* request.  Based on this, unless someone can give us a valid use
> case for this, and rules governing when it's acceptable and when it's not,
> we do NOT plan on supporting receiving media in a format we didn't
> request.  We'd just drop the frames.   If Bob wants to use a format not in
> the offer, he should RE-INVITE.

I wouldn't accept a codec that wasn't offered and wasn't in the allow param.
Agree with that. 

> 
> 4.  Now we've got Bob's answer and are passing it back to the core so we
> need to send an answer back to Alice.  First, unless someone can give us a
> valid use case, we will never send Alice a format she didn't request in her
> offer so those will get removed.  Based on options specified above though,
> the potential answer MAY contain formats NOT in Alice's endpoint allow=
> parameter.  Same options and questions as "1".

I wouldn't send a format not in her offer and in her allow.

> 
> Now let's talk about format preference order.
> 
> On the Alice to Bob side...
> 1.  On Alice's incoming leg, after reconciling Alice's offer and Alice's
> endpoint, we can sort by Alice's preferred order or Alice's endpoint's
> preferred order based on configuration and send that order to the core.
> 
> 2.  On Bob's outgoing leg, after reconciling what came from the core and
> Bob's endpoint, we can also sort based on either and send that in the offer.
> 
> 3.  Bob can re-order the formats in his answer so I guess we need another
> option to use the order we sent or the order we received before we send it
> back to the core.  Do we care about the order we got *from* the core or on
> Bob's endpoint any more?  Hopefully not.
> 
> 4.  Now we've got a list from the core and we need to send an answer back
> to Alice...  Do we need any sort alterations at all here or can we just use
> what came from the core?


I'd use the first codec sent by Bob. UAC offers in one order and UAS agrees
based on the offer, so we should trust Bob took into consideration Alice's
preferences. I'd try send to Alice the first codec received in Bob's response
(case both can use it based on their capabilities and allow params).