Re: [asterisk-users] Disable fax detect on specific incoming DID
The easiest way is to just run the Dial() command to forward the call to the hard fax without ever Answer()-ing the call. Without an Answer() on the call, Asterisk can't listen for fax detection (because the call hasn't been set up and there is no audio leg yet). Thank you, Noah Engelberth -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Administrator TOOTAI Sent: Friday, January 16, 2015 5:59 AM To: Asterisk Users Subject: [asterisk-users] Disable fax detect on specific incoming DID Hello, our gateway receive incoming calls from an outside gateway for multiple DIDs. For some of them we want fax detection, for other no. To do so, faxdetect is set to yes, but how to disable the fax detection for a specific incoming DID? For those DIDs, we just want to forward the call to a real fax machine DID which will do the job. Thanks for any hint Regards -- Daniel -- _ -- 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 -- _ -- 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 11.9.0 PRI no ring indications
Have you checked your /etc/asterisk/indications.conf file? I know I had a couple systems where I tried to be minimalist with the config files I used, and forgot to bring the indications.conf over from the samples -- the symptom those times was that the caller (inbound, outbound, or extension to extension) wouldn't hear any ringing tone while the call was ringing at the other end. At the CLI, you can use indication show to list all loaded indication types, and indication show zone to see the details about a specific one. I can't remember/find the way to display in CLI what the currently loaded default indication zone is, though there should be a line in the indications.conf file at a minimum. Thank you, Noah Engelberth System Administration MetaLINK Technologies nengelbe...@team-meta.net 419-990-0342 -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users- boun...@lists.digium.com] On Behalf Of Doug Lytle Sent: Thursday, September 18, 2014 9:34 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] Asterisk 11.9.0 PRI no ring indications Hopefully someone can point me in the correct direction. I had a 1.4x system die on me yesterday, while I was prepping a new machine to replace it. Took the machine on site yesterday and spent the day and part of the evening getting things working. This morning, I finished up converting my dial plan, knowing there'd be calls of things that I missed. While testing, I've noted that all inbound and outbound calls over the PRI give no ring indications. This is my second converted system and the first system doesn't have this issue. The system is out of the Detroit, MI area and the provider is TDS. One thing of note: I originally started off with 11.12.0, but was having problems with paging and the sound card, so I back dated to 11.9.0 (Same as my first convert) after I deleted the /var/lib/asterisk/modules folder. Machine setup below: lsb_release -a No LSB modules are available. Distributor ID: Debian Description:Debian GNU/Linux 7.6 (wheezy) Release:7.6 Codename: wheezy uname -a Linux livasterisk 3.9.11-custom-3.9.11 #1 SMP Thu Jan 9 12:18:01 EST 2014 x86_64 GNU/Linux dahdi config: cat system.conf span=1,1,0,esf,b8zs bchan=1-23 dchan=24 defaultzone=us loadzone=us echocanceller=oslec,1-23 span=2,0,0,esf,b8zs fxsks=25-32 fxoks=33-48 defaultzone=us loadzone=us chan_dahdi: [channels] ; ; switchtype=national context=pri signalling=pri_cpe echocancel=yes echotraining = yes ;echocancelwhenbridged = yes pridialplan=unknown group=1 rxgain=-1.0 txgain=-4.0 usecallerid=yes callerid=asreceived channel=1-23 Any suggestions would be appreciated! Doug -- Ben Franklin quote: Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. -- __ ___ -- 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 -- _ -- 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
[asterisk-users] Bria softphone registration problems on DNS SRV cluster
I have a pair of Asterisk 11.5.1 servers operating as a load balanced cluster, with DNS SRV records set up to weight them 60/40 relative to each other (both at priority 0). The back-end is MySQL Realtime, and everything works pretty well with the Cisco SPA phones ATAs that represent the majority of my endpoints. I recently tried to add an iPhone with the Bria softphone application, to provide a wireless handset option for my customers (since the Cisco SPA302D wireless handsets are decidedly not durable). The Bria application will register, but within 1 registration timeout cycle, it will stop receiving incoming calls, and show as unregistered. Sometimes it can send an outbound call and re-register, but most of the time it doesn't. Bria support has provided me some information here: https://support.counterpath.com/responses/bria-for-iphone-does-not-maintain-registration#comment-21492 Based on post #4, it looks like they're basically tagging both servers in the process of trying to re-register, and eventually send a REGISTER packet with authorization based on both servers' nonces, but Asterisk still rejects it with a 401. Is there something I should be looking at on the Asterisk side that would fix this problem? Does anyone know if there have been changes in authorization handling since 11.5.1 that would fix the issue? Thank you, Noah Engelberth MetaLINK Technologies -- _ -- 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] SPA112 provisioning file questions
To me, the settings you've sent look correct. However, one thing I've found with SPA configuration files is that they're very picky - if they don't parse as valid XML anywhere in the file, it will pretty much silently discard the entire file. The first troubleshooting step I use for SPA provisioning is to run all the configuration files a phone should be pulling through an XML validator, or pull them up in a browser and see if the browser handles it as XML (Chrome or IE seem to work equally well for this in my experience, but Firefox can get a bit cranky since the file isn't really an XML file with all the normal headers tags). Also, have you verified with logging on the provisioning server that the configuration file is actually being pulled? Thank you, Noah Engelberth MetaLINK Technologies From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Mike Diehl Sent: Thursday, March 27, 2014 2:47 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] SPA112 provisioning file questions Hi all, I've got a provisioning file that I use to configure Cisco SPA112's. I'm wanting to get this file to do 3 things for me. I want to turn T.38 on, Call forwarding off, and Call waiting, off for both lines. but it's not working. This is what I'm using to enable T.38 for line 1. FAX_Enable_T38_1_Yes/FAX_Enable_T38_1_ FAX_T38_Redundancy_1_1/FAX_T38_Redundancy_1_ FAX_T38_ECM_Enable_1_Yes/FAX_T38_ECM_Enable_1_ FAX_Tone_Detect_Mode_1_caller or callee/FAX_Tone_Detect_Mode_1_ This is what I'm using to turn cfwd off on line 1. Cfwd_All_Serv_1_No/Cfwd_All_Serv_1_ Cfwd_Busy_Serv_1_No/Cfwd_Busy_Serv_1_ Cfwd_No_Ans_Serv_1_No/Cfwd_No_Ans_Serv_1_ Cfwd_Sel_Serv_1_Yes/Cfwd_Sel_Serv_1_ Cfwd_Last_Serv_1_Yes/Cfwd_Last_Serv_1_ This is what I'm using to turn call waiting off on line 1. Call_Waiting_Serv_1_No/Call_Waiting_Serv_1_ However, these setting don't seem be be getting set on the device, even after a reboot. Any ideas what I'm doing wrong? TIA, Mike. -- _ -- 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] cisco spa phones and sal
One quickie that usually gets me: On the “Attendant Console” tab, there is a “Server Type” setting in the General section that defaults to Broadcom. This needs to be changed to Asterisk for ANY BLF on the phone to work (regardless of whether or not you’re doing BLF on the phone itself or via an attendant console). This tab is only accessible within the /admin/advanced web interface, or you can use the Server_Type configuration option within the pseudo-XML config files, if you’re doing auto provisioning. Noah Engelberth MetaLINK Technologies From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of ke...@ncwcom.com Sent: Sunday, March 02, 2014 12:04 PM To: asterisk-users@lists.digium.com Subject: [asterisk-users] cisco spa phones and sal Hi I have been trying for several days get 3 Cisco spa508g phones (firmware 7.5.5) to work with asterisk 11.6 cert1 and sla. I can get the phones to all ring when an incoming call arrives, and I see the slatrunk working. However the blf function does not work. If one extension picks up the call the others do not show the trunk in use. And as you might expect the hold and outbound dialing does not work. I do not think the problem is with the sla config on asterisk, but rather the setup in the phone. Does anyone have an example config for the spa phones. Thanks Kelly Email sent using Atmail - Email, Groupware and Calendaring done right. -- _ -- 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] parking - why doesn't this work?
You can hack together a way with custom device states and manual use of the Park() and ParkPickup() functions, but it won't be particularly pretty. A rough dialplan might look like the following (adjust to match your requirements, especially if a park fails or something similar): exten = _70[1234],1,Verbose(5,Park pickup or park call for slot ${EXTEN}) same = n,GotoIf($[${DEVICE_STATE(park:${EXTEN}@parkinglot)} = NOT_INUSE]?park,pickup) ; Currently no call parked - park call same = n(park),Set(__PARKINGEXTEN=${EXTEN}) same = n,Set(__RETURNTO=${CALLERID(num)}) same = n,Dial(Local/s@park,) ; Park failed, clear the device state and return same = n,Goto(parking-return,${RETURNTO},1) ; Currently a call parked - pick up same = n(pickup),ParkedCall(${EXTEN}@parkinglot) same = n,Hangup() [park] exten = s,1,Verbose(5,Park call) same = n,Park(timeout in ms,parking-return,${RETURNTO},1,s,parkinglot) [parking-return] exten = _X.,1,Verbose(5,Return parked call to internal phone) same = n,Set(CALLERID(name)=PK:${CALLERID(name)) same = n,Dial(Local/${EXTEN}@users,) same = ; some fallback for if the return user doesn't answer Basically, the idea is, check to see if the parking space is occupied. If it is occupied, someone is trying to pickup the parked call, so connect them with the ParkedCall() application. If it is not occupied, someone is trying to park a call, so set up the PARKINGEXTEN variable with where to park it (e.g. 701), and set up the RETURNTO variable with where to return if the park fails or times out (in my example, based on the caller ID number of the parking channel - make sure it's set to something that will return either via a local channel like I have in my example or a direct dial to a SIP/ or other channel). By putting the double underscore (__) in front of the variable name when we set it, we tell Asterisk to automatically set that variable on any channel spawned as a descendant of this channel (necessary for parking via a Local channel). I'm suggesting parking via local channel so that the RETURNTO variable survives on an attended transfer. Also, the specific example I have above will not work properly with unattended (blind) transfers to the parking extension. If you want to support a blind transfer to the parking space, you need to find a way to use the BLINDTRANSFER and BLIND_XFER_PEER channel variables to set RETURNTO correctly. There're plenty of other ways to do it, but the core of what you'll need to investigate for SLA parking is to use ${PARKINGEXTEN} to tell Asterisk where to park the call, and use the features.conf settings for the parking lot to prevent Asterisk from automatically hunting into additional spaces (if you allow Asterisk to hunt into a new slot, and two people try to park on 701 at the same time, one of the two calls will wind up on 702 and the ,s, option in the Park() application means Asterisk won't be reading back parking slots to the Parker, so you won't know which call lost the race. Practically speaking, it's not a huge problem, but the best practice would be to prevent the auto-hunting and avoid the race condition altogether). Thank you, Noah Engelberth MetaLINK Technologies From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Matt Hamilton Sent: Monday, October 14, 2013 10:28 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] parking - why doesn't this work? Parking/unparking will be done from multiple phones so that someone else can pickup/unpark the call from their phone that I parked on mine. I'm just testing it on one phone now. I'm trying to simulate the SLA functionality (which Asterisk has, but it's not very scalable and they haven't really been doing much development/improvement on that lately). We have been using SLA for a while, but we are also looking at other options. Unfortunately, conventional parking (pressing #700 and announcing the parking space) is not suitable for our very fast paced environment. Date: Mon, 14 Oct 2013 16:15:22 +0200 From: webaccou...@jgoettgens.demailto:webaccou...@jgoettgens.de To: asterisk-users@lists.digium.commailto:asterisk-users@lists.digium.com Subject: Re: [asterisk-users] parking - why doesn't this work? Hmmm, do I understand you correctly that you park and unpark a call using the same phone? If yes, why does simply holding the call does not work? The SPA504 has an extra large button on the right for this and you don't need any support in the dialplan. jg -- _ -- 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
Re: [asterisk-users] Dedicated hangup extension h
The magic you're looking for exists in Asterisk 11: https://wiki.asterisk.org/wiki/display/AST/Hangup+Handlers Basically, instead of h extensions, that fire based on what context the call ended in (and fire for all extensions in that context), you attach a handler to the call at some point (such as, when it enters a specific extension). At the end of the call, each hangup handler fires as a Gosub, in reverse order of how they were added (the last one added fires first). Life gets a little entertaining if you're trying to remove hangup handlers and don't remember what order they went on in (your removal choices are either the last one added or all of them), but for what you're describing as what you need, hangup handlers should work fairly well. Thank you, Noah Engelberth MetaLINK Technologies From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Grant Bagdasarian Sent: Wednesday, August 28, 2013 3:51 AM To: asterisk-users@lists.digium.com Subject: [asterisk-users] Dedicated hangup extension h Hello, We have a Kamailio SIP Proxy in front of our Asterisk cluster for incoming calls from our carrier. The sip.conf looks like this: [kamailio1] type=friend host=10.0.0.1 context=incoming disallow=all allow=alaw All calls hit the incoming extension. In the extensions.conf we have multiple extensions configured, but now I have to add one which uses the special h extension to perform a CURL action whenever the user hangs up. The problem is that once I've registered a h extension, it is executed for all extensions in the incoming context. exten = _X.,1,Playback(invalid) exten = _X.,n,Hangup exten = 1000,1,Playback(welcome) exten = 1000,n,Read(dtmfinput,15) exten = 1000,n,Hangup exten = h,1,Set(response=${CURL(http://sample.company.local/PostHandler.ashx,var1=${dtmfinput}var2=1000)}http://sample.company.local/PostHandler.ashx,var1=$%7bdtmfinput%7dvar2=1000)%7d) Is it possible to give each extension its own h extension? If not, is there another way to do this? -- _ -- 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 11.5 not honoring RTP port change in RE-INVITE
You have pretty much found what the issue is. The AdTran is not properly incrementing the SDP version. Michael (elguero) Thank you for your reply. I figured that was what was happening, but didn't know of a good place to go looking so I could forward the right information on to NetVanta support. I appreciate you taking the time to provide me that information. Thank you, Noah Engelberth System Administration MetaLINK Technologies nengelbe...@team-meta.net 419-990-0342 -- _ -- 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
[asterisk-users] Asterisk 11.5 not honoring RTP port change in RE-INVITE
I have an Asterisk 11.5 system, using SIP Realtime and operating as a ITSP. One of my customer's endpoints is a NetVanta 7100 PBX system that has a SIP trunk connection to my Asterisk box. The NV 7100 has a public IP on it that doesn't have any NAT between it and my Asterisk system. When the customer transfers a call from one handset to a voicemail box, the NV 7100 sends a RE-INVITE to Asterisk with SDP information for a different RTP port number. Asterisk is ACKing the RE-INVITE, but never changes media over to the new port number. AdTran is saying it's Asterisk's problem, since the Wireshark trace shows Asterisk is ACKing the re-invite but not changing ports. I do see that the Session ID number is different in the two invites (the REINVITE has a higher ID number than the original 200 OK that sets up the call - my test call was inbound to the NV7100). However, the REINVITE's version number is lower (1) than the 200 OK's SDP version number (which was the same as the SDP Session ID number). I see in the sip.conf.sample file that By default, Asterisk will honor the session version number in SDP packets and will only modify the SDP session if the version number changes. Given that I don't have ignoresdpversion=yes either globally or for this peer, does this mean that Asterisk will only honor new SDP packets if the version is higher, or will it honor any change? Or should I be looking somewhere else? Thank you, Noah Engelberth MetaLINK Technologies -- _ -- 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] GotoIf($[${CALLERID(number)}
-Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users- boun...@lists.digium.com] On Behalf Of Joseph Sent: Friday, June 14, 2013 2:25 PM To: asterisk-users@lists.digium.com Subject: [asterisk-users] GotoIf($[${CALLERID(number)} I'm trying to to to dial1 if caller id match: but dial plan execute 220,n(dial1) regardless exten = 220,n,GotoIf($[${CALLERID(number)} = 7804792668]?dial1) exten = 220,n(dial1),Dial(${sales_support}${accounting}${family},25,m(penguin)w ) exten = 220,n, I was under impression that if condition is met it will jump to n(label) no comma in between but dial plan is executing it regardless. -- Joseph -- You're correct in that GotoIf($[CONDITION]?label) will jump to the indicated label if the condition is true. However, without being told to go somewhere else when the condition is false, Asterisk will keep going at the next priority of the current extension. So, since your dialplan is something like: exten = 220,3,GotoIf(...) exten = 220,4(dial1),Dial(...) exten = 220,5,... When Asterisk sees the Goto as true, it jumps to the label dial1, which happens to be priority 4 (or whatever it actually is). When Asterisk sees the Goto as false, it's not being told to do anything, so it moves on from priority 3, to the next available priority -- which happens to be 4. If you want Asterisk to terminate the call when the condition of your Goto isn't matched, then you could change your dialplan to something like... exten = 220,n,GotoIf($[${CALLERID(number)} = 7804792668]?dial1:hangup,1) exten = 220,n(dial1),Dial(${sales_support}${accounting}${family},25,m(penguin)w ) exten = 220,n,... exten = hangup,1,Hangup() Or, you could of course jump anywhere else and do anything else with the call you want to. Thank you, Noah Engelberth MetaLINK Technologies -- _ -- 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
[asterisk-users] Calls getting stuck open
I have a system running Asterisk 11.2.1 that has had a couple calls between internal extensions get stuck open. I didn't catch the verbose log for the first one, since I generally don't verbosely log to file, but the second one shows that the call that got stuck was dialed, but the caller hung up before the called device answered. This server is running a hotdesking environment, so I am running a GoSub on call completion (and on termination via the h extension) to handle custom device states, in order to provide BLF for the user extensions without having to dynamically update which device the hints are pointing to. If the timing of the log entries are correct, Asterisk had already determined which device to ring, and dialed that device (firing off the on call creation GoSub to set the BLF of the called extension to RINGING), but then the calling user hung up before the GoSub returned. Is this something with my dialplan logic? Is this some race condition issue that I've stumbled across? What can I do to fix/mitigate the issue? Pertinent dialplan of my internal call handling is below: [hotdesk-outbound] ; call from logged in phones comes here first to set CallerID and check permissions of logged in user exten = _X.,1,NoOp() same = n,Set(LOCATION=${CUT(CHANNEL,/,2)}) same = n,Set(LOCATION=${CUT(LOCATION,-,1)}) same = n,Set(WHO=${HOTDESK_PHONE_STATUS(${LOCATION})}) same = n,GotoIf($[${ISNULL(${WHO})}]?internal,${EXTEN},1) same = n,Set(${WHO}_CID_NAME=${HOTDESK_INFO(cid_name,${WHO})}) same = n,Set(${WHO}_CID_NUMBER=${HOTDESK_INFO(cid_number,${WHO})}) same = n,Set(${WHO}_OUTBOUND_PERMISSION=${HOTDESK_INFO(permissions,${WHO})}) same = n,Gosub(blf-begincall,s,1(${WHO},INUSE)) same = n,Set(CALLERID(name)=${${WHO}_CID_NAME}) same = n,Set(CALLERID(num)=${${WHO}_CID_NUMBER}) same = n,Goto(users,${EXTEN},1) [users] include = internal [internal] exten = _1XX,1,Verbose(5,Internal user - ${EXTEN}) same = n,Set(E=${EXTEN}) same = n,Set(USER_LOCATION=${HOTDESK_USER_STATUS(${E})}) same = n,GotoIf($[${ODBCROWS} 1]?notloggedin) same = n,Dial(SIP/${USER_LOCATION},20,wWU(blf-begincall^${E}^INUSE)b(blf-begincall^s^1(${E}^RINGING))) same = n,Voicemail(${E}@rsnwo,b) same = n,Hangup() same = n(notloggedin),Set(LOGGED_OFF=1) same = n,Voicemail(${E}@rsnwo,u) same = n,Hangup() [blf-begincall] exten = s,1,Verbose(Beginning of Call - set BLF Custom Device state) same = n,Verbose(Updating: ${ARG1} Calls: ${GROUP_COUNT(${ARG1}@activecalls)} Status: ${ARG2}) same = n,ExecIf($[${ARG2} = RINGING]?ExecIf($[${GROUP_COUNT(${ARG1}@activecalls)} 0]?Set(DEVICE_STATE(Custom:${ARG1})=RINGINUSE):Set(DEVICE_STATE(Custom:${ARG1})=RINGING)):Set(DEVICE_STATE(Custom:${ARG1})=INUSE)) same = n,Set(GROUP(activecalls)=${ARG1}) same = n,Set(CHANNEL(hangup_handler_wipe)=blf-endcall,s,1(${ARG1})) same = n,Return() [blf-endcall] exten = s,1,Verbose(End of Call - reset BLF Custom Device state) same = n,Verbose(Updating: ${ARG1} Calls: ${GROUP_COUNT(${ARG1}@activecalls)}) same = n,ExecIf($[${GROUP_COUNT(${ARG1}@activecalls)} 1]?Set(DEVICE_STATE(Custom:${ARG1})=INUSE):Set(DEVICE_STATE(Custom:${ARG1})=NOT_INUSE)) same = n,Return() Thank you, Noah Engelberth -- _ -- 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] call extension play sound file then connect caller
-Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users- boun...@lists.digium.com] On Behalf Of Gary Carr Sent: Wednesday, October 03, 2012 1:35 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] call extension play sound file then connect caller I am trying to setup a context to take a inbound call, hold the call, connect to an external number, play a sound file to the external number, then connect the inbound caller to the external number. My thought was to accept the call and place them in a parking lot. Then call the external number, play the sound file and connect the inbound caller to the external number. Is this even possible and if so, is this the best approach? Thank you in advance. You might look into FollowMe, especially if you want the external number to have a choice of whether or not to accept the call. A very high level overview is here: http://answers.oreilly.com/topic/2705-asterisk-how-to-use-followme-to-call-a-series-of-phone-numbers/ (though that gave me enough to get started) Thank you, Noah Engelberth MetaLINK Technologies -- _ -- 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
[asterisk-users] XMPP sendtodialplan
I've been working on an interactive XMPP interface so users at my office can interact with the timeclock and queues by XMPP (in addition to IVR menu, which has been running just fine for quite a while before the XMPP interface). I'm using sendtodialplan=yes to handling the incoming unsolicited messages, and typically will have at least one point of interaction where Asterisk requests authentication from the user and then waits with XMPP_RECEIVE for the response. Asterisk then processes the reply and finishes out the call as expected, no problems there. However, I'm seeing some behavior that I don't really expect after the call finishes. After my call finishes, sendtodialplan triggers again one time for each message that was sent back (and caught by XMPP_RECEIVE) during the just completed call. I've avoided unwanted extra processing by using XMPP_RECEIVE on a short timeout to process incoming unsolicited messages, so the net effect of this extra trigger is one or more XMPP calls that trip the 1 second timeout on this XMPP_RECEIVE and then fall through and clean up. However, when I initially started setting this up, my expectation was that sendtodialplan would only trigger on messages that weren't solicited. Obviously, it's not a huge cost and it's not breaking my implementation. But I wonder if anyone might know of something I'm doing wrong that is causing the extra sendtodialplan triggers. Alternately, if this is expected or normal behavior, I would like to propose that the expected behavior be changed if possible so that sendtodialplan only fires on truly unsolicited messages. Configuration snippet: xmpp.conf - [asterisk] type=client *snip connection information* status=available sendtodialplan=yes context=xmpp-incoming General XMPP call flow: 1) Client sends XMPP request to Asterisk 2) Asterisk processes message, requests authentication and waits for PIN 3) Client sends PIN via XMPP 4) Asterisk receives PIN, validates, completes processing 5) Asterisk sends process response to client (if applicable), and then lets the call fall through 6) Asterisk fires the sendtodialplan incoming logic for the message that was sent in step 3 Thank you, Noah Engelberth MetaLINK Technologies -- _ -- 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] XMPP sendtodialplan
On 20/09/2012, at 3:59 PM, Noah Engelberth n...@directlinkcomputers.commailto:n...@directlinkcomputers.com wrote: I've been working on an interactive XMPP interface so users at my office can interact with the timeclock and queues by XMPP (in addition to IVR menu, which has been running just fine for quite a while before the XMPP interface). I'm using sendtodialplan=yes to handling the incoming unsolicited messages, and typically will have at least one point of interaction where Asterisk requests authentication from the user and then waits with XMPP_RECEIVE for the response. Asterisk then processes the reply and finishes out the call as expected, no problems there. However, I'm seeing some behavior that I don't really expect after the call finishes. After my call finishes, sendtodialplan triggers again one time for each message that was sent back (and caught by XMPP_RECEIVE) during the just completed call. I've avoided unwanted extra processing by using XMPP_RECEIVE on a short timeout to process incoming unsolicited messages, so the net effect of this extra trigger is one or more XMPP calls that trip the 1 second timeout on this XMPP_RECEIVE and then fall through and clean up. However, when I initially started setting this up, my expectation was that sendtodialplan would only trigger on messages that weren't solicited. What does your dialplan look like? Are you using _. -- Cheers, Matt Riddell No pattern matching in this portion of the dialplan. A rough approximation/sanitized psuedocode of what the code winds up as is... [xmpp-incoming] exten = s,1,Verbose(5,incoming) same = n,Set(REPLY_TO=${MESSAGE(from)}) same = n,Set(REPLY_TO=${CUT(REPLY_TO,:,2)}) ; to cut off xmpp: same = n,Set(REPLY_TO=${CUT(REPLY_TO,/,1)}) ; to cut off /resource same = n,Set(MSG=${JABBER_RECEIVE(asterisk-xmpp,${REPLY_TO},1) same = n,GotoIf($[${ISNULL(${MSG})}]?hangup,1:message,1) exten = message,1,Verbose(5,process message) same = n,Set(CMD=${CUT(MSG, ,1)}) same = n,Set(PIN=Retrieve PIN via ODBC function) same = n,JabberSend(asterisk-xmpp,${REPLY_TO},Please authenticate) same = n,Set(ENTERED_PIN=${JABBER_RECEIVE(asterisk-xmpp,${REPLY_TO},15) same = n,GotoIf($[${ISNULL(${ENTERED_PIN})}]?timeout,1) ... check if the pin matches, kick them to invalid-user,1 if it doesn't, or process their command if it does... exten = hangup,1,Verbose(5,let the message fallthrough because using Hangup() dorks up message receiving) exten = timeout,1,Verbose(5,no input on authentication) same = n,JabberSend(asterisk-xmpp,${REPLY_TO},Sorry, you timed out. If you still want to execute your command, please try again.) What I'm seeing 100% of the time is that as soon as the call from the initial message falls through the end and gets hung up by autofallthrough, then a new call executes for the incoming message from the prompted JABBER_RECEIVE in the message extension (when I'm asking for authentication code. I have one specific command that winds up prompting for input a second time, and both prompted messages spawn off new calls, in order received, one after the other, after the original call is cleaned up. By having the one second timeout on the JABBER_RECEIVE in the s extension that pulls incoming unsolicited messages off the stack, I keep the XMPP calls from stacking up and impacting performance, but it just seems like odd behavior. Especially that the incoming message will wait any amount of time and fire off exactly when the previous call ends. Thank you, Noah Engelberth MetaLINK Technologies -- _ -- 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] Receiving and processing unsolicited XMPP messages with Asterisk 11
On Friday, August 31, 2012 06:48:46 PM Noah Engelberth wrote: I’m trying to set up a way that our users can send an XMPP message to Asterisk (unsolicited) to request information, such as voicemail status or the like. No matter what I set for the dialplan, I’m only seeing Asterisk execute the s,1 priority in the context defined in xmpp.conf for incoming messages, and then the “call” hangs up without executing further instructions. Anything I’ve tried to accomplish in that first priority has worked, but it never continues to an additional priority. This might be a separate, but related issue, as I am not using XMPP messaging yet, but I found that at least with SIP messaging in Asterisk 11, if I had a Hangup() in the dialplan for message routing, every message sent AFTER the first would fail just as you describe, since the first message routed through the dialplan hung up the channel. This did not happen to me in Asterisk 10. After removing the traditional Hangup() at the end, and restarting Asterisk, the messages route properly for me. -A Ah ha. That's what's happening here as well. If there is no Hangup() in the call path for incoming XMPP messages, everything runs smoothly and you can send and process messages as expected. If you put a Hangup() in the path, send 1 message and it works, and then subsequent messages hit the first priority and quit. Once that first priority and quit behavior starts, no further XMPP messages will go past the first priority until you completely restart Asterisk -- even removing the Hangup() from the dialplan and reloading the dialplan will not cause inbound XMPP processing to resume working until you completely restart Asterisk. Thank you, Noah Engelberth MetaLINK Technologies -- _ -- 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
[asterisk-users] Receiving and processing unsolicited XMPP messages with Asterisk 11
I'm trying to set up a way that our users can send an XMPP message to Asterisk (unsolicited) to request information, such as voicemail status or the like. No matter what I set for the dialplan, I'm only seeing Asterisk execute the s,1 priority in the context defined in xmpp.conf for incoming messages, and then the call hangs up without executing further instructions. Anything I've tried to accomplish in that first priority has worked, but it never continues to an additional priority. Debug output looks like: [Aug 31 14:41:15] DEBUG[6964]: res_xmpp.c:2988 xmpp_pak_message: XMPP client 'testaccount' received a message [Aug 31 14:41:15] DEBUG[6964]: res_xmpp.c:3029 xmpp_pak_message: Deleted 1 messages for client testaccount from JID jabberclient@my.jabber.server [Aug 31 14:41:15] DEBUG[6954][C-]: pbx.c:4410 pbx_extension_helper: Launching 'Gosub' [Aug 31 14:41:15] DEBUG[6964]: res_xmpp.c:3494 xmpp_client_receive: XML parsing successful -- Executing [s@xmpp-incoming:1] Gosub(Message/ast_msg_queue, xmpp-incoming,message,1) in new stack [Aug 31 14:41:15] DEBUG[6954][C-]: app_stack.c:578 gosub_exec: Channel Message/ast_msg_queue has no datastore, so we're allocating one. [Aug 31 14:41:15] DEBUG[6954][C-]: pbx.c:6065 __ast_pbx_run: Extension message, priority 0 returned normally even though call was hung up The exact specifics of the debug after priority 1 varies a little based on what I try to do, but in every case, the next thing immediately after the priority 1 application is Extension s, priority 1 returned normally even though call was hungup if I don't use a Goto/Gosub, or Extension gotoextension, priority 0 returned normally even though call was hungup if I do. I'm running Asterisk SVN-branch-11-r371592M on CentOS 6.3 64-bit. Asterisk is able to send using JabberSend via other processing in my dialplan. Thank you, Noah Engelberth MetaLINK Technologies -- _ -- 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] Basic GotoIf question
-Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Markus Sent: Saturday, August 25, 2012 3:08 AM To: 'Asterisk Users Mailing List - Non-Commercial Discussion' Subject: [asterisk-users] Basic GotoIf question Hi all, on Asterisk 1.4.21 I'm trying to block, that means directly hang up on, several inbound caller ID's like this: exten = ,1,GotoIf($[${CALLERID(num)} != ]?pass) exten = ,n,GotoIf($[${CALLERID(num)} != ]?pass) exten = ,n,GotoIf($[${CALLERID(num)} != ]?pass) exten = ,n,Hangup exten = ,n(pass),Set... everything from here on works. When I'm calling with caller ID I get hung up. When I'm calling from or I get connected. That means on the first GotoIf match the remaining GotoIf's are ignored. How can I avoid that? I'm a bit surprised, because Example 3 at http://www.voip-info.org/wiki/view/Asterisk+cmd+GotoIf shows that it should actually be working. A few more questions - the doc link that I just mentioned shows: GotoIf(condition?label1[[:label2]) What is the [[ before :label2? There are two opening square brackets, but just one ] closing? Is that a typo? Also, the doc shows: GotoIf(condition?[label1]:label2) Why is label1 in square brackets and label2 isn't? I'm confused. :) Thanks so much! Markus --- You need to run your logic the other way. What you're doing now is if it's not CallerID A, pass it through and accept So change to: exten = ,1,GotoIf($[${CALLERID(num)} = ]?hangup) exten = ,n,GotoIf($[${CALLERID(num)} = ]?hangup) exten = ,n,GotoIf($[${CALLERID(num)} = ]?hangup) exten = ,n,Set... ...more logic for accepted calls... exten = ,n(hangup),Hangup() -- _ -- 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] Basic GotoIf question
-Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Markus Sent: Saturday, August 25, 2012 12:42 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Basic GotoIf question Am 25.08.2012 09:21, schrieb Noah Engelberth: Hi all, on Asterisk 1.4.21 I'm trying to block, that means directly hang up on, several inbound caller ID's like this: exten = ,1,GotoIf($[${CALLERID(num)} != ]?pass) exten = ,n,GotoIf($[${CALLERID(num)} != ]?pass) exten = ,n,GotoIf($[${CALLERID(num)} != ]?pass) exten = ,n,Hangup exten = ,n(pass),Set... everything from here on works. When I'm calling with caller ID I get hung up. When I'm calling from or I get connected. That means on the first GotoIf match the remaining GotoIf's are ignored. How can I avoid that? I'm a bit surprised, because Example 3 at http://www.voip-info.org/wiki/view/Asterisk+cmd+GotoIf shows that it should actually be working. A few more questions - the doc link that I just mentioned shows: GotoIf(condition?label1[[:label2]) What is the [[ before :label2? There are two opening square brackets, but just one ] closing? Is that a typo? Also, the doc shows: GotoIf(condition?[label1]:label2) Why is label1 in square brackets and label2 isn't? I'm confused. :) Thanks so much! Markus --- You need to run your logic the other way. What you're doing now is if it's not CallerID A, pass it through and accept So change to: exten = ,1,GotoIf($[${CALLERID(num)} = ]?hangup) exten = ,n,GotoIf($[${CALLERID(num)} = ]?hangup) exten = ,n,GotoIf($[${CALLERID(num)} = ]?hangup) exten = ,n,Set... ...more logic for accepted calls... exten = ,n(hangup),Hangup() Thanks Noah! That worked. Can anyone shed some light on: A few more questions - the doc link that I just mentioned shows: GotoIf(condition?label1[[:label2]) What are the [[ before :label2? There are two opening square brackets, but just one ] closing? Is that a typo? Also, the doc shows: GotoIf(condition?[label1]:label2) Why is label1 in square brackets and label2 isn't? Thanks! Markus In general in the documentation, [something] means that said something is optional. Sometimes you might see [[something] something else] which indicates a chain of optional inputs. Basically, for GotoIf (and the sister applications GotoIfTime, ExecIf, and ExecIfTime), you have the syntax as follows: GotoIf(condtion?what-to-do-if-true:what-to-do-if-false) So, Asterisk evalutates your condition, then if it's true, does what's between the ? and the :. If your condition is false, Asterisk does what's between the : and the ). You don't have to have either condition (though you have to have at least one). If there is no condition for true (or false), Asterisk will do nothing with the GotoIf and continue on to the next line in your dialplan. Obviously, then, having a GotoIf without at least one of what-to-do-if-true or what-to-do-if-false will wind up being pretty useless -- you'll always want at least one, if not both what to do's in your GotoIfs. Thank you, Noah Engelberth MetaLINK Technologies -- _ -- 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
[asterisk-users] GotoIf redirection to label not working correctly
I run a hotdesking system based on the example from Asterisk: The Definitive Guide. Calls come into the [hotdesk] context, which verifies the phone has a logged in user and sends the call to users,${EXTEN},1 if there is a user logged in. The [users] context then includes several other contexts for internal/external call handling, as follows: [users] include = internal include = dummyextensions switch = DUNDi/dundi-peer Internal office calls should get caught by the include = internal, and run through the [internal] context as follows: [internal] exten = _3XX,1,NoOp() same = n,Set(E=${EXTEN}) same = n,Set(${E}_VMCONTEXT=${HOTDESK_INFO(vmcontext,${E})}) same = n,Set(USER_LOCATION=${HOTDESK_USER_STATUS(${E})}) same = n,GotoIf($[${ODBCROWS} 1]?notloggedin) same = n,Dial(SIP/${USER_LOCATION},20,wWU(blf-begincall^${E}^INUSE)b(blf-begincall^s^1(${E}^RINGING))) same = n,Voicemail(${E}@${${E}_VMCONTEXT},b) same = n,Hangup() same = n(notloggedin),Set(LOGGED_OFF=1) same = n,Voicemail(${E}@${${E}_VMCONTEXT},u) same = n,Hangup() In both Asterisk 10 and Asterisk 11, the GotoIf does not work under the circumstances above, giving me the following error and hanging up the call: [Aug 23 15:17:35] WARNING[3558][C-0565]: pbx.c:11799 pbx_parseable_goto: Priority 'notloggedin' must be a number 0, or valid label I can work around the issue with any of the following: - Change the GotoIf to point to internal,${EXTEN},notloggedin - Change the GotoIf to point to 9 - Comment out the DUNDi switch in [users] - Unload the pbx_dundi.so module In the latter two cases, the call redirects to the notloggedin priority label within [internal],${EXTEN} without me changing the GotoIf - as long as the DUNDi switch is not active in [users]. With the DUNDi switch active, I get the warning message above and the call hangs up. Is there something I'm doing wrong in my config? Is this basically expected behavior that I need to adjust around? Thank you, Noah Engelberth MetaLINK Technologies -- _ -- 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] GotoIf redirection to label not working correctly
-Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Richard Mudgett Sent: Thursday, August 23, 2012 5:05 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] GotoIf redirection to label not working correctly I run a hotdesking system based on the example from Asterisk: The Definitive Guide. Calls come into the [hotdesk] context, which verifies the phone has a logged in user and sends the call to users,${EXTEN},1 if there is a user logged in. The [users] context then includes several other contexts for internal/external call handling, as follows: [users] include = internal include = dummyextensions switch = DUNDi/dundi-peer Internal office calls should get caught by the include = internal, and run through the [internal] context as follows: [internal] exten = _3XX,1,NoOp() same = n,Set(E=${EXTEN}) same = n,Set(${E}_VMCONTEXT=${HOTDESK_INFO(vmcontext,${E})}) same = n,Set(USER_LOCATION=${HOTDESK_USER_STATUS(${E})}) same = n,GotoIf($[${ODBCROWS} 1]?notloggedin) same = n,Dial(SIP/${USER_LOCATION},20,wWU(blf-begincall^${E}^INUSE)b(blf-begi ncall^s^1(${E}^RINGING))) same = n,Voicemail(${E}@${${E}_VMCONTEXT},b) same = n,Hangup() same = n(notloggedin),Set(LOGGED_OFF=1) same = n,Voicemail(${E}@${${E}_VMCONTEXT},u) same = n,Hangup() In both Asterisk 10 and Asterisk 11, the GotoIf does not work under the circumstances above, giving me the following error and hanging up the call: [Aug 23 15:17:35] WARNING [3558][C-0565]: pbx.c : 11799 pbx_parseable_goto : Priority 'notloggedin' must be a number 0, or valid label I can work around the issue with any of the following: - Change the GotoIf to point to internal,${EXTEN},notloggedin - Change the GotoIf to point to 9 - Comment out the DUNDi switch in [users] - Unload the pbx_dundi.so module In the latter two cases, the call redirects to the notloggedin priority label within [internal],${EXTEN} without me changing the GotoIf – as long as the DUNDi switch is not active in [users]. With the DUNDi switch active, I get the warning message above and the call hangs up. Is there something I’m doing wrong in my config? Is this basically expected behavior that I need to adjust around? I am wondering if it will work if you changed the label name from notloggedin to something else. There might be a name conflict when using the DUNDi switch. Otherwise, it looks like a bug. Richard -- I've tried not_logged_in, notlogged in, and a few other short labels. The dundi switch only has numeric extensions it's announcing from the other side. Thank you, Noah Engelberth MetaLINK Technologies -- _ -- 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 11 queue calls - emulate Dial(b) functionality
-Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users- boun...@lists.digium.com] On Behalf Of Richard Mudgett Sent: Monday, August 20, 2012 3:35 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Asterisk 11 queue calls - emulate Dial(b) functionality I currently run an Asterisk 10 system with hotdesking functionality set up. Several of the users have worked with a system in the past that supported BLF on their IP phones, and would like their current phones to behave in a similar fashion. Right now I have a really kludgy system that mostly works, but doesn’t consistently trigger the cleanup macro to “clear” the device state on the end of a call. Rather than continue to beat my head against the wall playing “which context isn’t firing an h extension to dump calls into the cleanup macro”, I decided to investigate Asterisk 11 for the new Dial() b function and the new hangup handler CHANNEL variable. I have the hints working more or less correctly on direct calls to/from the phones, making use of the b and U functions in Dial() and some judicious use of GROUP channel variables and CHANNEL(hangup_handler_wipe). But, on my live system, sometimes the users receive calls from a queue, and I don’t see any way with the queue calls to emulate the b functionality in Dial() to be able to set the agent extension’s device state to RINGING when the queue call gets created. Obviously, I can use membergosub to set the agent to “INUSE” after they pick up the call (like Dial() U), but is there anything that I can use to manipulate the channel that is calling the agent while/before it is ringing? You could use local channels as queue members. Then you can use Dial(b) when the call goes out to the actual extension. Richard -- Heh, didn't really think of that. It looks like that should do what I need it to. Thanks. Thank you, Noah Engelberth MetaLINK Technologies -- _ -- 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 11 - BLF on Custom devices
I'd do a packet capture -- ideally from the phone, or using your switch to mirror the phone's port -- and look for a SIP NOTIFY. Then we can know if a NOTIFY is not being sent, or if it's just not being processed as desired by your Cisco SPA 509G. If it's not there, do the same on your asterisk server, and if we see it on the asterisk server but not at the endpoint, we can suspect network configuration. You can also get some more detail about what endpoints are subscribed with sip show subscriptions in the asterisk console, but since it says Watchers 2, that suggests the subscription has been made. I'd just verify that specifically the device you are using for testing is subscribed. Also, I know if you turn the verbosity up high enough (core set verbosity 3) you will get messages in the console about notifications sent. You can also set sip debug on or something along those lines and have Asterisk print all the SIP traffic it's attempting to send. Should help you narrow the possible causes. Here's the sequence I'm seeing with a packet capture from the Asterisk server: - 301 calls 302. The INVITE from 301 hits Asterisk. Asterisk sends back 100 Trying, and then a NOTIFY to 302 and 303 (which are both subscribed to 301, and they see 301 change to in use). 302 and 303 send back 200 OK for the NOTIFYs. - Asterisk sends the INVITE to 302. 302 sends back 100 Trying and then 180 Ringing. After the 180 Ringing, Asterisk sends a NOTIFY to 301 (which I have subscribed to hint 305, which is mapped to SIP/device corresponding to the one I have logged in as 302). No other NOTIFY updates are sent at this time. - I pick up on 302. 302 sends a 200 OK with session description to Asterisk. Asterisk ACKs this 200 and then sends 2 NOTIFYs to 301 (which is subscribed to both the 302 Custom device hint and the 305 SIP Physical device hint), and also sends 1 NOTIFY to 303 (which is only subscribed to the 302 Custom device hint). - While 301 and 302 are still on the call, 303 calls 302. The INVITE from 303 hits Asterisk. Asterisk sends back 100 Trying, and then a NOTIFY to 302 (subscribed to the Custom device hint for 303) and 2 NOTIFYs to 301 (subscribed to both the Custom device and SIP Physical device hints). - Asterisk sends the INVITE to 302. 302 sends back 100 Trying and then 180 Ringing. After the 180 Ringing, Asterisk sends a NOTIFY to 301 (which updates the SIP Physical device hint). No other NOTIFY updates are sent at this time. - 303 cancels the call and sends a CANCEL to Asterisk. Asterisk responds with 200 OK, sends a NOTIFY to 301, sends a CANCEL to 302, and then sends another NOTIFY to 301. 303 then ACKs Asterisk's SIP 487, and Asterisk sends 1 additional NOTIFY to 302 and 301. - 301 and 302 finish their call. Asterisk sends a total of 1 NOTIFY to 302 (the status for Custom device 301), 2 NOTIFYs to 303 (the status for Custom device 301 and 302), and 2 NOTIFYs to 301 (the status for Custom device 302 and Physical Device 302). So, it looks to me like I'm missing NOTIFYs for RINGING or RING_INUSE events on Custom devices. (Slightly sanitized) Verbose 3 output is pastebin'd: http://pastebin.com/q51XUeHe The short of the output is - there is no console output showing == Extension Changed 302[hints] new state on the Ringing or InUseRinging events - only on InUse or Idle events (which matches what I'm seeing on the phones). Thank you, Noah Engelberth MetaLINK Technologies -- _ -- 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 11 - BLF on Custom devices
From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Phil Frost Sent: Tuesday, August 21, 2012 3:20 PM To: asterisk-users@lists.digium.com Subject: Re: [asterisk-users] Asterisk 11 - BLF on Custom devices On 08/21/2012 02:52 PM, Noah Engelberth wrote: The short of the output is - there is no console output showing == Extension Changed 302[hints] new state on the Ringing or InUseRinging events - only on InUse or Idle events (which matches what I'm seeing on the phones). Weird. I just did a test on my production system, 1.8.11.1 (from digium repository) on Debian Squeeze and a Snom 870 running firmware 8.4.35. I had the verbosity set to 3, and I manually changed the devstate in the console with devstate change 207-support-agent RINGING. I got a message: Extension Changed 207-support-agent[employees] new state Ringing for Notify User pfrost and my phone updated its interface to reflect the change. Tested also with INUSE, NOT_INUSE, and RINGINUSE and all resulted in a NOTIFY being sent to the handset. Though the Snom 870 doesn't distinguish between RING and RINGINUSE, it did change from displaying talking to idle or ringing. So, at least with my environment, asterisk is capable and successful at sending SIP NOTIFY for custom devstates. I've no idea why you'd get updates for NOT_INUSE and INUSE but none of the other states. It looks like your dialplan logic is complex enough that I'm having a hard time following it and understanding what should be happening, so I'd suggest testing twiddling the device states through the console and see if that generates NOTIFYs. If not, I'd verify that something is actually subscribed with sip show subscriptions. If something is subscribed and a NOTIFY isn't generated, I'd suspect a bug. If you do get NOTIFYs when changing the devstate in the console but not when making calls, then maybe something in your dialplan logic is wrong, and I'd say simplify it until the problem is found, or it's simple enough to re-ask on the list. Changing the Custom devstate from the CLI generates Extension Changed for Notify User messages when I change to INUSE or NOT_INUSE, but not when I change to RINGING or RINGINUSE. If I change from NOT_INUSE to RINGING and then back to NOT_INUSE, no notify messages are being generated. core show hints does show the correct state for 301@hints when I make the manual change to RINGINUSE (or RINGING). sip show subscriptions does show 2 subscriptions (1 each from 302 and 303) for 301@hints. Thank you, Noah Engelberth MetaLINK Technologies -- _ -- 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
[asterisk-users] Asterisk 11 - XMPP and JabberSend()
I'm trying to get my Asterisk 11 test box set up with XMPP, having troubles with JabberSend(). My jabber.conf file is as follows: [general] debug=no autoprune=no [testaccount] type=client serverhost=my.jabber.server username=myaccount@my.jabber.server secret=mypassword port=jabberport usetls=yes usesasl=yes xmpp show connections gives the following output from the console: testasterisk11*CLI xmpp show connections Jabber Users and their status: [testaccount] aster...@jabber.metalink.net - Connected Number of clients: 1 xmpp show buddies lists out the users that are being auto-added to the buddy list from the XMPP server. I try to have a test extension send a message, and get this output (and the call fails with a Declined message on the calling phone). -- Executing [20005@metalink:2] JabberSend(SIP/649EF376CA25-000c, testaccount,user@my.jabber.server,Test) in new stack [Aug 21 15:42:54] WARNING[20469][C-000c]: res_xmpp.c:1752 xmpp_send_exec: JabberSend requires arguments (account,jid,message) I've tried putting in the full username and the [testaccount] for the first argument to JabberSend. I've tried just the username as well as the full user@my.jabber.servermailto:user@my.jabber.server in the jid argument. I've tried multi-word and single word messages. I've tried encapsulating each argument in quotes. With XMPP debug on, I can see presence messages being received XMPP received from 'test account', but no XMPP debug output occurs when I try to place my test call to send the XMPP message. Kinda going cross-eyed from looking at this - is there anything else I should try or anything wrong in my configuration? Thank you, Noah Engelberth MetaLINK Technologies -- _ -- 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
[asterisk-users] Asterisk 11 queue calls - emulate Dial(b) functionality
I currently run an Asterisk 10 system with hotdesking functionality set up. Several of the users have worked with a system in the past that supported BLF on their IP phones, and would like their current phones to behave in a similar fashion. Right now I have a really kludgy system that mostly works, but doesn't consistently trigger the cleanup macro to clear the device state on the end of a call. Rather than continue to beat my head against the wall playing which context isn't firing an h extension to dump calls into the cleanup macro, I decided to investigate Asterisk 11 for the new Dial() b function and the new hangup handler CHANNEL variable. I have the hints working more or less correctly on direct calls to/from the phones, making use of the b and U functions in Dial() and some judicious use of GROUP channel variables and CHANNEL(hangup_handler_wipe). But, on my live system, sometimes the users receive calls from a queue, and I don't see any way with the queue calls to emulate the b functionality in Dial() to be able to set the agent extension's device state to RINGING when the queue call gets created. Obviously, I can use membergosub to set the agent to INUSE after they pick up the call (like Dial() U), but is there anything that I can use to manipulate the channel that is calling the agent while/before it is ringing? Thank you, Noah Engelberth MetaLINK Technologies -- _ -- 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
[asterisk-users] Asterisk 11 - BLF on Custom devices
In testing Asterisk 11, I've found that Asterisk doesn't seem to be sending BLF updates to SIP peers that have subscribed to a hint looking at a Custom device if that Custom device state is RINGING or RING_INUSE. All other states seem to be working correctly. The hint section of the dialplan is: [hints] exten = _3XX,hint,Custom:${EXTEN} Console shows the following for core show hints with no calls: -= Registered Asterisk Dial Plan Hints =- _3XX@hints : Custom:${EXTEN} State:Idle Watchers 0 302@hints : Custom:302State:Idle Watchers 2 303@hints : Custom:303State:Idle Watchers 2 301@hints : Custom:301State:Idle Watchers 2 And with a ringing call (301 calling 302): -= Registered Asterisk Dial Plan Hints =- _3XX@hints : Custom:${EXTEN} State:Idle Watchers 0 302@hints : Custom:302 State:Ringing Watchers 2 303@hints : Custom:303State:Idle Watchers 2 301@hints : Custom:301State:InUse Watchers 2 And after 302 picks up (301 and 302 on a call): -= Registered Asterisk Dial Plan Hints =- _3XX@hints : Custom:${EXTEN} State:Idle Watchers 0 302@hints : Custom:302State:InUse Watchers 2 303@hints : Custom:303State:Idle Watchers 2 301@hints : Custom:301State:InUse Watchers 2 And after 303 tries to call 302 while 301 302 are still on a call (301 302 on a call, plus 303 calling 302): -= Registered Asterisk Dial Plan Hints =- _3XX@hints : Custom:${EXTEN} State:Idle Watchers 0 302@hints : Custom:302 State:InUseRinging Watchers 2 303@hints : Custom:303State:InUse Watchers 2 301@hints : Custom:301State:InUse Watchers 2 But despite the above, the BLF fields on my phones (Cisco SPA 509G for all 3 extensions) only update for Idle or InUse - they do not show the Ringing or InUseRinging statuses. I have verified the SPA phones BLFs do still show the correct Ringing and InUseRinging statuses if they subscribe directly to a SIP device's state with the hint - the issue only seems to be effecting Custom devices. Can anyone think of anything else I should check? Thank you, Noah Engelberth MetaLINK Technologies -- _ -- 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
[asterisk-users] DTMF transmission problem
I am having difficulties with customer-bound DTMF being very short clipped off (and basically unusable, as systems on the customer side aren't recognizing the DTMF digits, and I can barely tell that DTMF is there when I listen on a handset). My system set up as follows: PSTN -- Metaswitch -SIP- Asterisk -SIP or IAX2- CPE Asterisk is running Asterisk 10.4.0 on a CentOS 6.2 VM residing on a CentOS 6.3 KVM host. Asterisk has one network interface connected to the Metaswitch without NAT to place/receive calls from the PSTN, and a separate interface to connect to CPE equipment. SIP and IAX are bound to both interfaces. Vocal call quality is fine, DTMF is fine from the customer to the PSTN, but DTMF from the PSTN to the customer isn't. Asterisk is set to remain in the media path on all calls. The customer facing IP address on the Asterisk server is private and is being 1:1 NATed through a MikroTik RB 1100 to a public address that the customers are then connecting to. I have also placed test calls with the customer equipment inside the same LAN as the Asterisk server's customer facing IP address (no NAT) with precisely the same symptoms. The same symptoms persist whether the PSTN or the CPE initiate the call. My example configs are as follows: SIP - [general] limitonpeer=yes notifyringing=yes notifyhold=yes allowsubscribe=yes disallow=all allow=g722 allow=ulaw allow=gsm allowoverlap=no callevents=yes allowguest=no directmedia=no bindport=bind_here bindaddr=to_this_address srvlookup=yes maxexpiry=7200 defaultexpiry=3600 [authentication] [test-voice] type=friend host=dynamic secret=not_my_secret context=users disallow=all allow=ulaw nat=yes directmedia=no qualify=yes trunk=no IAX2 - [general] bindport=bind_here bindaddr=to_this_address delayreject=yes disallow=all allow=g722 allow=ulaw allow=gsm jitterbuffer=no encryption=yes [test-fax1] type=friend host=dynamic username=test-fax1 secret=not_my_secret context=users disallow=all allow=ulaw qualify=yes trunk=no requirecalltoken=no SIP peers are Zhone ZNID-2xxx series ONTs. IAX peers are ATCOM AG198 ATA gateways, either behind the ONTs (but on the same voice VLAN the ONTs use to talk to Asterisk) or on my Asterisk server's local network. The voice VLAN is a different subnet than Asterisk is on, but no NAT exists between the subnets. Thank you, Noah Engelberth System Administration MetaLINK Technologies -- _ -- 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] DTMF transmission problem
-Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users- boun...@lists.digium.com] On Behalf Of Shaun Ruffell Sent: Thursday, August 02, 2012 11:06 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] DTMF transmission problem On Thu, Aug 02, 2012 at 12:45:28PM +, Noah Engelberth wrote: I am having difficulties with customer-bound DTMF being very short clipped off (and basically unusable, as systems on the customer side aren't recognizing the DTMF digits, and I can barely tell that DTMF is there when I listen on a handset). My system set up as follows: PSTN -- Metaswitch -SIP- Asterisk -SIP or IAX2- CPE [snip] ... Vocal call quality is fine, DTMF is fine from the customer to the PSTN, but DTMF from the PSTN to the customer isn't ... [snip] The same symptoms persist whether the PSTN or the CPE initiate the call. What is the dtmf mode of Metaswitch in the above diagram? Is it possible that it's muting the DTMF and then not generating the corresponding DTMF event messages? Everytime I've seen clipped DTMF in the past it was due to imperfect muting at the PSTN - SIP interface. According to the gentleman that manages the Metaswitch, it's set to allow for either in or out of band dtmf. Based on the packet trace, the packets are coming across as RFC 2833 RTP events. Aside from the very first digit, which Wireshark shows as 7 RTP Event packets and 3 RTP Event (end) packets, all the other ones on my test call came across as 8 RTP Event packets and 3 RTP Event (end) packets. All of the RTP Event packets are in sequence for the call's RTP stream. Also, when I'm monitoring in Asterisk, if I configure logger.conf to output DTMF events into the console, Asterisk is recognizing the DTMF: [Aug 2 12:25:25] DTMF[19319]: channel.c:4136 __ast_read: DTMF begin '4' received on SIP/PSTN-SIP-PEER [Aug 2 12:25:25] DTMF[19319]: channel.c:4146 __ast_read: DTMF begin passthrough '4' on SIP/ PSTN-SIP-PEER [Aug 2 12:25:25] DTMF[19319]: channel.c:4051 __ast_read: DTMF end '4' received on SIP/ PSTN-SIP-PEER, duration 280 ms [Aug 2 12:25:25] DTMF[19319]: channel.c:4091 __ast_read: DTMF end accepted with begin '4' on SIP/ PSTN-SIP-PEER [Aug 2 12:25:25] DTMF[19319]: channel.c:4120 __ast_read: DTMF end passthrough '4' on SIP/ PSTN-SIP-PEER You should be able to take a packet trace on the interface of the Asterisk server communicating with the Metaswitch to determine whether the problem first appears at the switch or in your Asterisk server. Cheers, Shaun -- Shaun Ruffell Digium, Inc. | Linux Kernel Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: www.digium.com www.asterisk.org -- __ ___ -- 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 -- _ -- 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] DTMF transmission problem
-Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users- boun...@lists.digium.com] On Behalf Of Noah Engelberth Sent: Thursday, August 02, 2012 12:27 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] DTMF transmission problem -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users- boun...@lists.digium.com] On Behalf Of Shaun Ruffell Sent: Thursday, August 02, 2012 11:06 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] DTMF transmission problem On Thu, Aug 02, 2012 at 12:45:28PM +, Noah Engelberth wrote: I am having difficulties with customer-bound DTMF being very short clipped off (and basically unusable, as systems on the customer side aren't recognizing the DTMF digits, and I can barely tell that DTMF is there when I listen on a handset). My system set up as follows: PSTN -- Metaswitch -SIP- Asterisk -SIP or IAX2- CPE [snip] ... Vocal call quality is fine, DTMF is fine from the customer to the PSTN, but DTMF from the PSTN to the customer isn't ... [snip] The same symptoms persist whether the PSTN or the CPE initiate the call. What is the dtmf mode of Metaswitch in the above diagram? Is it possible that it's muting the DTMF and then not generating the corresponding DTMF event messages? Everytime I've seen clipped DTMF in the past it was due to imperfect muting at the PSTN - SIP interface. According to the gentleman that manages the Metaswitch, it's set to allow for either in or out of band dtmf. Based on the packet trace, the packets are coming across as RFC 2833 RTP events. Aside from the very first digit, which Wireshark shows as 7 RTP Event packets and 3 RTP Event (end) packets, all the other ones on my test call came across as 8 RTP Event packets and 3 RTP Event (end) packets. All of the RTP Event packets are in sequence for the call's RTP stream. Also, when I'm monitoring in Asterisk, if I configure logger.conf to output DTMF events into the console, Asterisk is recognizing the DTMF: [Aug 2 12:25:25] DTMF[19319]: channel.c:4136 __ast_read: DTMF begin '4' received on SIP/PSTN-SIP-PEER [Aug 2 12:25:25] DTMF[19319]: channel.c:4146 __ast_read: DTMF begin passthrough '4' on SIP/ PSTN-SIP- PEER [Aug 2 12:25:25] DTMF[19319]: channel.c:4051 __ast_read: DTMF end '4' received on SIP/ PSTN-SIP-PEER, duration 280 ms [Aug 2 12:25:25] DTMF[19319]: channel.c:4091 __ast_read: DTMF end accepted with begin '4' on SIP/ PSTN-SIP-PEER [Aug 2 12:25:25] DTMF[19319]: channel.c:4120 __ast_read: DTMF end passthrough '4' on SIP/ PSTN-SIP-PEER Additional information I discovered after my previous reply: I have a separate Asterisk VM instance (in all other ways the same implementation as above) that is running an IVR. This instance has no issues with inbound DTMF within the IVR, but does exhibit the same symptoms for DTMF when bridged through to an IAX2 peer with the same settings as the first Asterisk VM. On the second Asterisk (with the IVR), DTMF to my Cisco/Linksys SPA942 SIP phones works properly, but not to the IAX or SIP ATAs that I am using (the same ones I'm having problems with on the first Asterisk). All of the live customers on the first Asterisk are ATAs, so I don't know as of this time whether or not SPA phones are working correctly on the first server, though it's reasonable to assume they are. In addition, calls from an SPA942 phone to the IAX or SIP ATAs are also not transmitting DTMF to the ATA device's endpoint. DTMF from the ATA device's endpoint to the SPA942 is working correctly, as is both directions of voice audio. You should be able to take a packet trace on the interface of the Asterisk server communicating with the Metaswitch to determine whether the problem first appears at the switch or in your Asterisk server. Cheers, Shaun -- Shaun Ruffell Digium, Inc. | Linux Kernel Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: www.digium.com www.asterisk.org -- -- _ -- 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] DTMF transmission problem
-Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users- boun...@lists.digium.com] On Behalf Of Noah Engelberth Sent: Thursday, August 02, 2012 1:10 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] DTMF transmission problem -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users- boun...@lists.digium.com] On Behalf Of Noah Engelberth Sent: Thursday, August 02, 2012 12:27 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] DTMF transmission problem -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users- boun...@lists.digium.com] On Behalf Of Shaun Ruffell Sent: Thursday, August 02, 2012 11:06 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] DTMF transmission problem On Thu, Aug 02, 2012 at 12:45:28PM +, Noah Engelberth wrote: I am having difficulties with customer-bound DTMF being very short clipped off (and basically unusable, as systems on the customer side aren't recognizing the DTMF digits, and I can barely tell that DTMF is there when I listen on a handset). My system set up as follows: PSTN -- Metaswitch -SIP- Asterisk -SIP or IAX2- CPE [snip] ... Vocal call quality is fine, DTMF is fine from the customer to the PSTN, but DTMF from the PSTN to the customer isn't ... [snip] The same symptoms persist whether the PSTN or the CPE initiate the call. What is the dtmf mode of Metaswitch in the above diagram? Is it possible that it's muting the DTMF and then not generating the corresponding DTMF event messages? Everytime I've seen clipped DTMF in the past it was due to imperfect muting at the PSTN - SIP interface. According to the gentleman that manages the Metaswitch, it's set to allow for either in or out of band dtmf. Based on the packet trace, the packets are coming across as RFC 2833 RTP events. Aside from the very first digit, which Wireshark shows as 7 RTP Event packets and 3 RTP Event (end) packets, all the other ones on my test call came across as 8 RTP Event packets and 3 RTP Event (end) packets. All of the RTP Event packets are in sequence for the call's RTP stream. Also, when I'm monitoring in Asterisk, if I configure logger.conf to output DTMF events into the console, Asterisk is recognizing the DTMF: [Aug 2 12:25:25] DTMF[19319]: channel.c:4136 __ast_read: DTMF begin '4' received on SIP/PSTN-SIP-PEER [Aug 2 12:25:25] DTMF[19319]: channel.c:4146 __ast_read: DTMF begin passthrough '4' on SIP/ PSTN-SIP- PEER [Aug 2 12:25:25] DTMF[19319]: channel.c:4051 __ast_read: DTMF end '4' received on SIP/ PSTN-SIP-PEER, duration 280 ms [Aug 2 12:25:25] DTMF[19319]: channel.c:4091 __ast_read: DTMF end accepted with begin '4' on SIP/ PSTN-SIP-PEER [Aug 2 12:25:25] DTMF[19319]: channel.c:4120 __ast_read: DTMF end passthrough '4' on SIP/ PSTN-SIP-PEER Additional information I discovered after my previous reply: I have a separate Asterisk VM instance (in all other ways the same implementation as above) that is running an IVR. This instance has no issues with inbound DTMF within the IVR, but does exhibit the same symptoms for DTMF when bridged through to an IAX2 peer with the same settings as the first Asterisk VM. On the second Asterisk (with the IVR), DTMF to my Cisco/Linksys SPA942 SIP phones works properly, but not to the IAX or SIP ATAs that I am using (the same ones I'm having problems with on the first Asterisk). All of the live customers on the first Asterisk are ATAs, so I don't know as of this time whether or not SPA phones are working correctly on the first server, though it's reasonable to assume they are. In addition, calls from an SPA942 phone to the IAX or SIP ATAs are also not transmitting DTMF to the ATA device's endpoint. DTMF from the ATA device's endpoint to the SPA942 is working correctly, as is both directions of voice audio. You should be able to take a packet trace on the interface of the Asterisk server communicating with the Metaswitch to determine whether the problem first appears at the switch or in your Asterisk server. Cheers, Shaun -- Shaun Ruffell Digium, Inc. | Linux Kernel Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: www.digium.com www.asterisk.org -- -- At the risk of answering myself -- Found that on calls Asterisk was bridging together and not hearing the DTMF, it was working normally. On calls that Asterisk was still hearing the DTMF, it was being clipped. It seems that Asterisk was involved in relaying the DTMF on calls to IAX endpoints as well as calls to SIP endpoints on a different network from the Asterisk customer
[asterisk-users] res_odbc crashing asterisk after freetds dsn reconnects
I have an Asterisk Open Source 10 system set up that is using res_odbc to connect to a MSSQL database so that our users can clock in/out on our timeclock system from their phones. I've been having a consistent issue with Asterisk crashing (completely restarting and dropping active calls) when there is a network disruption that severs the connection between Asterisk and the MSSQL server while someone is trying to punch the timeclock. The setup is as follows: Asterisk 10.4 (also had same issues on 10.2) running on CentOS 6.2 (VM on a CentOS 6.3 KVM host cluster) - connected to Voice VLAN - freetds installed from epel yum repository, 0.91-2.el6 (most current version available on epel) - unixODBC unixODBC-devel 2.2.14-11.el6 installed - Asterisk also has an ODBC connection to a local MySQL server configured and in use for a separate purpose MSSQL 2008 R2 running on Server 2008 R2 (VM on a CentOS 6.3 KVM host cluster) - connected to Data VLAN The res_odbc.conf file: [my_freetds_dsn] enabled = yes dsn = my_freetds_dsn username = my_freetds_user password = my_freetds_password pre-connect = yes sanitysql = select 1 odbcinst.ini: [FreeTDS] Description = ODBC for Microsoft SQL Driver= /usr/lib64/libtdsodbc.so.0 UsageCount = 1 Threading= 2 odbc.ini: [my_freetds_instance] Description = my_freetds_instance Driver = FreeTDS Database = my_freetds_instanace Server = my_mssql_server Trace = no TDS_Version = 7.2 Port = my_mssql_port timeout = 10 connect_timeout = 5 The steps to replicate the crash are: 1) Network disruption that prevents the Asterisk server from communicating with the MSSQL server occurs. 2) While the network disruption is ongoing, a user dials into the Asterisk server's timeclock extension and inputs their employee ID, which causes Asterisk to perform a lookup on the MSSQL server. 3) Asterisk hangs for 3-5 minutes while it waits for the ODBC connection to the MSSQL server. 4) I get made aware of the problem and log in to Asterisk. 5) I execute module reload res_odbc.so and Asterisk reconnects successfully to the ODBC connection and can process new calls to the timeclock. 6) The hung calls continue to show in core show channels even after the user hangs up and tries again (for what it's worth users, typically create 3-4 hung calls each before one or more of them let me know. I've seen anywhere from 5-20 hung calls at the times I've logged in to try to reconnect the ODBC connection). 7) Asterisk crashes during or shortly after the module reload. Sometimes I've sent one or more channel request hangup commands from the Asterisk CLI for the hung calls. Sometimes it crashes immediately on the module reload, sometimes it runs for a few minutes after the reload. I don't think it's ever run more than 5 minutes after I reload the ODBC connections. I do have a 91MB core file from yesterday's incident in my /tmp directory (I assume that's a core dump from the crash?) Thank you, Noah Engelberth System Administration MetaLINK Technologies -- _ -- 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
[asterisk-users] IAX trunking stopped working
I administer a group of Asterisk servers running a mix of 10.3, 10.4, and 1.8.8.1 (mostly 10.4). One of those servers is a call concentrator/relay for E911 service. All of the other servers make an IAX connection to the relay server, which then hands off to a SIP trunk to my E911 provider. It all worked as recently as 2 weeks ago, but I discovered that sometime between then and now it stopped working without any explanation. Last modified time on the config files is over 2 months ago. The setup is as follows: On the call relay (IAX receiver) [my-remote-server] type=user host=dynamic username=my-remote-username encryption=yes secret=my-remote-secret context=my-call-context deny=0.0.0.0/0.0.0.0 permit=remote.server.ip.address/255.255.255.255 On the VoIP servers (IAX sender) - One of the servers is set to register: register = my-remote-username:my-remote-sec...@call.relay.server.ip - Another is set to just use the peer definition as below without trying to register [my-remote-server] type=peer host=call.relay.server.ip username=my-remote-username secret=my-remote-secret qualify=no Dialplan on the VoIP servers: exten = 911,1,Verbose() same = n,Dial(IAX2/my-remote-server/911) Dialplan on the relay server: [my-call-context] exten = 911,1,Verbose() same = n,Dial(Relay to E911) The issue I'm seeing is this: - On the servers that are set to register, the relay server is rejecting the registration (I've confirmed the username/peername/secrets are an exact match on both sides, and nothing has changed from when they were working). IAX debug on the relay server shows the auths come in and the relay server send REGREJ - Registration Refused, Cause Code 29. IAX debug on the server attempting to register shows sending the REGAUTH packets and receiving the REGREJ packets. The IP address shown in the IAX debug packets matches the IP address in the permit rule for each peer that's supposed to register. - On the server that is set to just send the calls, an attempt to dial 911 just hangs for 60 seconds and eventually times out without sending the call. IAX debug on the relay server shows the call start frame get RX'd, shows the relay server try to TX a CTOKEN frame, and nothing further (other than retransmissions of the call start frame). IAX debug on the server trying to send the call to the relay server shows the TX for the call start frame, but no RX for the CTOKEN frames. Ultimately, this has gone from working to totally broken without any apparent change to my configuration. I need help to try to troubleshoot it further, I've tried everything I can think of (including transferring the backed-up working config files to a brand new clean-load server, upgrading Asterisk, and recreating the configurations by hand), and nothing seems to be helping. Thank you, Noah Engelberth MetaLINK Technologies -- _ -- 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] IAX trunking stopped working
-Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users- boun...@lists.digium.com] On Behalf Of Matthew Jordan Sent: Tuesday, July 03, 2012 2:27 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] IAX trunking stopped working - Original Message - From: Noah Engelberth n...@directlinkcomputers.com To: Asterisk Users Mailing List - Non-Commercial Discussion asterisk-users@lists.digium.com Sent: Tuesday, July 3, 2012 10:56:10 AM Subject: [asterisk-users] IAX trunking stopped working I administer a group of Asterisk servers running a mix of 10.3, 10.4, and 1.8.8.1 (mostly 10.4). One of those servers is a call concentrator/relay for E911 service. All of the other servers make an IAX connection to the relay server, which then hands off to a SIP trunk to my E911 provider. It all worked as recently as 2 weeks ago, but I discovered that sometime between then and now it stopped working without any explanation. Last modified time on the config files is over 2 months ago. The setup is as follows: On the call relay (IAX “receiver”) [my-remote-server] type=user host=dynamic username=my-remote-username encryption=yes secret=my-remote-secret context=my-call-context deny=0.0.0.0/0.0.0.0 permit=remote.server.ip.address/255.255.255.255 On the VoIP servers (IAX “sender”) - One of the servers is set to register: register = my-remote-username:my-remote-sec...@call.relay.server.ip - Another is set to just use the peer definition as below without trying to register [my-remote-server] type=peer host=call.relay.server.ip username=my-remote-username secret=my-remote-secret qualify=no Dialplan on the VoIP servers: exten = 911,1,Verbose() same = n,Dial(IAX2/my-remote-server/911) Dialplan on the relay server: [my-call-context] exten = 911,1,Verbose() same = n,Dial(Relay to E911) The issue I’m seeing is this: - On the servers that are set to register, the relay server is rejecting the registration (I’ve confirmed the username/peername/secrets are an exact match on both sides, and nothing has changed from when they were working). IAX debug on the relay server shows the auths come in and the relay server send REGREJ – Registration Refused, Cause Code 29. IAX debug on the server attempting to register shows sending the REGAUTH packets and receiving the REGREJ packets. The IP address shown in the IAX debug packets matches the IP address in the permit rule for each peer that’s supposed to register. Can you set authdebug and iaxdebug to true in your iax2 configuration - preferably on both ends, but in particular on the server that is servicing the registration attempt - and post the portion of the DEBUG logs that shows it rejecting the registration? Something is failing authentication, and authdebug should tell us at least why the server thinks it should reject the attempt. After some more messing around, I think it's my configuration error on the registration. I have the peers on the receiving server set up as users, not friends, since the calls will only be one-way from the VoIP servers to the relay server. With the debugs on, the error on registration is [Jul 3 14:52:40] NOTICE[1447]: chan_iax2.c:8100 register_verify: No registration for peer 'my-remote-peer' (from remote.peer.ip.address). Changing the receiving server's definition to a friend and putting in a host=dynamic line makes the errors go away and registration work as expected. So I guess that was legacy cruft configuration causing me confusion there, sorry. - On the server that is set to just send the calls, an attempt to dial 911 just hangs for 60 seconds and eventually times out without sending the call. IAX debug on the relay server shows the call start frame get RX’d, shows the relay server try to TX a CTOKEN frame, and nothing further (other than retransmissions of the call start frame). IAX debug on the server trying to send the call to the relay server shows the TX for the call start frame, but no RX for the CTOKEN frames. Is this the same server that failed to register? If so, it may be best to focus on that problem first. No, different server. Also, after doing some further investigation, it looks like my problem of no-calls may be network related -- if I change what vlan the receiving server uses to connect to the network so it is internal to my LAN, the IAX connections start mostly working (though I break my trunk connection to my E911 provider, and the one server that connects has a NAT issue, but that's definitely a network problem). When the server is connected to my Public IP VLAN, the SIP trunk to the E911 provider works, but the IAX connections don't. Ultimately, this has gone from working to totally broken without any apparent change to my configuration. I need help to try
Re: [asterisk-users] Asterisk 10.4.0 GotoIf to label problem when DUNDi active
- dialplan show internal shows the label (and if I change it, it changes to the right one, etc.) - No syntax errors or warnings showing in the CLI when I reload with verbosity at 3. - I'll check moving things around on Monday, but I find it odd that all I have to do to make the GotoIf work with a label is to comment out the switch (no other changes). Noah -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Chad Wallace Sent: Friday, June 01, 2012 6:42 PM To: asterisk-users@lists.digium.com Subject: Re: [asterisk-users] Asterisk 10.4.0 GotoIf to label problem when DUNDi active On Wed, 30 May 2012 18:02:00 + Noah Engelberth n...@directlinkcomputers.com wrote: I have a hotdesking environment at my main office, and up until today, the GotoIf that jumps straight to voicemail if a user isn't log in was working just fine by label. Today, I deployed DUNDi to a satellite office, and now the GotoIf isn't jumping to the right place. If I replace the label with a priority number, it jumps correctly. Alternatively, if I disable the switch statement for DUNDi, it jumps correctly. But with the DUNDi switch in service and the named label to jump to, it gives me this error: [May 30 13:57:24] WARNING[6654]: pbx.c:10747 pbx_parseable_goto: Priority 'not_logged_in' must be a number 0, or valid label What do you get when you run dialplan show internal on the Asterisk CLI? Does it show the not_logged_in label? Have you looked at the CLI output when you reload? There may be a syntax error before your not_logged_in line... Also, along the same vein, you might try moving the [internal-privledged] context (with the switch/DUNDi line) to below the [internal] one. -- C. Chad Wallace, B.Sc. The Lodging Company http://www.lodgingcompany.com/ OpenPGP Public Key ID: 0x262208A0 -- _ -- 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 -- _ -- 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 10.4.0 GotoIf to label problem when DUNDi active
Yes, I tried several different combinations of possible labels, some with and some without underscores. From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of SamyGo Sent: Thursday, May 31, 2012 1:36 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Asterisk 10.4.0 GotoIf to label problem when DUNDi active Hi, You might have already tried but can you try reducing the label name and exclude the underscore in it ! Regards, Sammy On Wed, May 30, 2012 at 11:02 PM, Noah Engelberth n...@directlinkcomputers.commailto:n...@directlinkcomputers.com wrote: I have a hotdesking environment at my main office, and up until today, the GotoIf that jumps straight to voicemail if a user isn't log in was working just fine by label. Today, I deployed DUNDi to a satellite office, and now the GotoIf isn't jumping to the right place. If I replace the label with a priority number, it jumps correctly. Alternatively, if I disable the switch statement for DUNDi, it jumps correctly. But with the DUNDi switch in service and the named label to jump to, it gives me this error: [May 30 13:57:24] WARNING[6654]: pbx.c:10747 pbx_parseable_goto: Priority 'not_logged_in' must be a number 0, or valid label Dialplan snippets as follows: [hotdesk] ;phones dial here include = hotdesk_outbound [hotdesk_outbound] exten = _X.,1,NoOp() same = n,Set(LOCATION=${CUT(CHANNEL,/,2)}) same = n,Set(LOCATION=${CUT(LOCATION,-,1)}) same = n,Set(WHO=${HOTDESK_PHONE_STATUS(${LOCATION})}) same = n,GotoIf($[${ISNULL(${WHO})}]?internal,${EXTEN},1) same = n,Set(${WHO}_CID_NAME=${HOTDESK_INFO(cid_name,${WHO})}) same = n,Set(${WHO}_CID_NUMBER=${HOTDESK_INFO(cid_number,${WHO})}) same = n,Set(${WHO}_CONTEXT=${HOTDESK_INFO(defaultcontext,${WHO})}) same = n,Set(${WHO}_VMCONTEXT=${HOTDESK_INFO(vmcontext,${WHO})}) same = n,Set(GROUP(activecallers)=${WHO}) same = n,NoOp(Who: ${WHO} Calls: ${GROUP_COUNT(${WHO}@activecallers)}) same = n,Set(DEVICE_STATE(Custom:${WHO})=INUSE) same = n,Set(CALLERID(name)=${${WHO}_CID_NAME}) same = n,Set(CALLERID(num)=${${WHO}_CID_NUMBER}) same = n,Goto(${${WHO}_CONTEXT},${EXTEN},1) [outbound-context] include = internal-privledged [internal-privledged] include = internal switch = DUNDi/peer [internal] exten = _3XX,1,NoOp() same = n,Set(E=${EXTEN}) same = n,Set(${E}_VMCONTEXT=${HOTDESK_INFO(vmcontext,${E})}) same = n,Set(USER_LOCATION=${HOTDESK_USER_STATUS(${E})}) same = n,GotoIf($[${ODBCROWS} 1]?not_logged_in) same = n,Dial(SIP/${USER_LOCATION},20,wWU(answered^${E})) same = n,ExecIf(${ISNULL(${E})}?NoOp(${HOTDESK_INFO(location,${E})}):ExecIf($[${GROUP_COUNT(${E}@activecalls)}1]?Set(DEVICE_STATE(Custom:${E})=INUSE):Set(DEVICE_STATE(Custom:${E})=NOT_INUSE))) same = n,Set(GROUP(activecalls)=${NULL}) same = n,Voicemail(${E}@${${E}_VMCONTEXT},b) same = n,Hangup() same = n(not_logged_in),Set(LOGGED_OFF=1) same = n,Voicemail(${E}@${${E}_VMCONTEXT},u) same = n,Hangup() Any suggestions on other things to try? Or is this a bug I should file? Thank you, Noah Engelberth MetaLINK Technologies -- _ -- 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 -- _ -- 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
[asterisk-users] Asterisk 10.4.0 GotoIf to label problem when DUNDi active
I have a hotdesking environment at my main office, and up until today, the GotoIf that jumps straight to voicemail if a user isn't log in was working just fine by label. Today, I deployed DUNDi to a satellite office, and now the GotoIf isn't jumping to the right place. If I replace the label with a priority number, it jumps correctly. Alternatively, if I disable the switch statement for DUNDi, it jumps correctly. But with the DUNDi switch in service and the named label to jump to, it gives me this error: [May 30 13:57:24] WARNING[6654]: pbx.c:10747 pbx_parseable_goto: Priority 'not_logged_in' must be a number 0, or valid label Dialplan snippets as follows: [hotdesk] ;phones dial here include = hotdesk_outbound [hotdesk_outbound] exten = _X.,1,NoOp() same = n,Set(LOCATION=${CUT(CHANNEL,/,2)}) same = n,Set(LOCATION=${CUT(LOCATION,-,1)}) same = n,Set(WHO=${HOTDESK_PHONE_STATUS(${LOCATION})}) same = n,GotoIf($[${ISNULL(${WHO})}]?internal,${EXTEN},1) same = n,Set(${WHO}_CID_NAME=${HOTDESK_INFO(cid_name,${WHO})}) same = n,Set(${WHO}_CID_NUMBER=${HOTDESK_INFO(cid_number,${WHO})}) same = n,Set(${WHO}_CONTEXT=${HOTDESK_INFO(defaultcontext,${WHO})}) same = n,Set(${WHO}_VMCONTEXT=${HOTDESK_INFO(vmcontext,${WHO})}) same = n,Set(GROUP(activecallers)=${WHO}) same = n,NoOp(Who: ${WHO} Calls: ${GROUP_COUNT(${WHO}@activecallers)}) same = n,Set(DEVICE_STATE(Custom:${WHO})=INUSE) same = n,Set(CALLERID(name)=${${WHO}_CID_NAME}) same = n,Set(CALLERID(num)=${${WHO}_CID_NUMBER}) same = n,Goto(${${WHO}_CONTEXT},${EXTEN},1) [outbound-context] include = internal-privledged [internal-privledged] include = internal switch = DUNDi/peer [internal] exten = _3XX,1,NoOp() same = n,Set(E=${EXTEN}) same = n,Set(${E}_VMCONTEXT=${HOTDESK_INFO(vmcontext,${E})}) same = n,Set(USER_LOCATION=${HOTDESK_USER_STATUS(${E})}) same = n,GotoIf($[${ODBCROWS} 1]?not_logged_in) same = n,Dial(SIP/${USER_LOCATION},20,wWU(answered^${E})) same = n,ExecIf(${ISNULL(${E})}?NoOp(${HOTDESK_INFO(location,${E})}):ExecIf($[${GROUP_COUNT(${E}@activecalls)}1]?Set(DEVICE_STATE(Custom:${E})=INUSE):Set(DEVICE_STATE(Custom:${E})=NOT_INUSE))) same = n,Set(GROUP(activecalls)=${NULL}) same = n,Voicemail(${E}@${${E}_VMCONTEXT},b) same = n,Hangup() same = n(not_logged_in),Set(LOGGED_OFF=1) same = n,Voicemail(${E}@${${E}_VMCONTEXT},u) same = n,Hangup() Any suggestions on other things to try? Or is this a bug I should file? Thank you, Noah Engelberth MetaLINK Technologies -- _ -- 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] IAX2 passing back and forth variables
Uhm, if the dialplan is exactly as you pasted, you're not setting TESTVAR2 to anything. You would need some sort of Set(IAXVAR(TESTVAR2)=...) Noah From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Ruddy Gbaguidi Sent: Saturday, May 19, 2012 2:17 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] IAX2 passing back and forth variables Hi all, I have two asterisk servers A and B. And I would like from A, dial to B passing some IAX variables. Then B handles the calls, setup some other variables that become available to A which can continue. So far, I have used IAXVAR function. It works when sending call from A to B But variables setup on B are not available on A. Any idea how I can do it ? Here are my dialplans. +++ SERVER A +++ [contextA] exten = s,1,Set(IAXVAR(TESTVAR1)=abcd) exten = s,n,Dial(IAX2/serverb/s,30,g) exten = s,n,Noop( The out variable is : ${IAXVAR(TESTVAR2)} ) ; Does not work +++ SERVER B +++ [contextB] exten = s,1,Noop( ${IAXVAR(TESTVAR1)} ) - Does work exten = s,n,Set(IAXVAR(TESTVAR2)) exten = s,n,Hangup -- _ -- 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] MYSQL INSERT QUESTION IN DIALPLAN
-Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of list...@gmail.com Sent: Monday, April 09, 2012 8:34 PM To: asterisk-users@lists.digium.com Subject: [asterisk-users] MYSQL INSERT QUESTION IN DIALPLAN I am not a programmer and I have learned so much from examples and the list. Perhaps someone could tell me what I am doing wrong in my example below: I am getting the caller ID and caller name from my local POTS line and I want to add it into a sql table. I am trying with the following code but the data never gets put into the table. Can anyone correct my syntax and tell me what I am doing wrong? [callerinfo] exten = s,1,MYSQL(Connect connid localhost myuser mypassword cnam) exten = s,n,MYSQL(Query resultid ${connid} INSERT INTO `calleridcapture` (`number`,`name`) VALUES (${CALLERID(num)},${CALLERID(name)}) exten = s,n,MYSQL(Clear ${resultid}) exten = s,n,MYSQL(Disconnect ${connid}) exten = s,n,NoOp(Callerid Name ${CALLERID(name)}) exten = s,n,NoOp(Callerid Number ${CALLERID(num)}) The NoOP does show the correct CALLERID name number when I test it. The information just doesn't go into my calleridcapture table in the cnam database. Thanks very much for your help Again I am not a programmer and I am sure my syntax is wrong. This is Asterisk 1.8.10.0 As the previous two posters alluded, you need to encapsulate your values in quotes. I think you can get by without the backticks, not 100% sure as I've converted from MYSQL to func_odbc. If you're not going to go with Steve's recommendation of AGI, I would highly recommend switching from func_mysql to func_odbc; func_odbc is much more straightforward in my opinion, and you definitely get much better error messages within the CLI as you're watching your code execute. ofps.oreilly.com/titles/9780596517342/asterisk-DB.html is a good resource for setting up odbc. Noah The message does not contain any threats AVG for MS Exchange Server (2012.0.1913 - 2411/4924)-- _ -- 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] Park Bug?
The timeout value is milliseconds, not seconds. I know that wasn't properly documented in older versions of Asterisk, but it is at least in 10.1 From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Bryant Zimmerman Sent: Sunday, March 18, 2012 8:37 PM To: asterisk-users@lists.digium.com Subject: [asterisk-users] Park Bug? I think I have found a bug in the park command [Syntax] Park([timeout][,return_context[,return_exten[,return_priority[,options) exten = doParkAttempt,n,Park(60,DoMyParkReturn,2003,1,s) Each time I call it with a timeout value. it fails to use the time out value it is set to 0 and returns right away to the specified context. Can anyone else confirm this and give me some help? Thanks Bryant The message does not contain any threats AVG for MS Exchange Server (2012.0.1913 - 2114/4879)-- _ -- 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] Same provider - IAX sounds bad, SIP sounds great
I'd try turning off the jitterbuffer and see if that makes things better. I just traced a similar call quality issue transferring calls incoming DAHDI on one * box to another * box, and turning off the jitterbuffer on the side that couldn't hear (in my case, the * box with the DAHDI lines, as the DAHDI callers couldn't hear the remote callers) fixed the call quality issue. -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Troy Telford Sent: Tuesday, February 28, 2012 4:08 PM To: asterisk-users@lists.digium.com Subject: [asterisk-users] Same provider - IAX sounds bad, SIP sounds great On my Asterisk system, I'm using a provider that provides both IAX2 and SIP connectivity. Personally, I'd prefer to use IAX2, and that's what my account is setup to use. However, I'm having a problem: With IAX2: - Incoming Voice from my Provider - Asterisk = Sounds great - Outgoing Voice from Asterisk - my Provider = Sounds terrible By terrible, I mean skips, stutters, and distortion. It can be difficult (sometimes impossible) to understand. It doesn't matter what codec I use (at least between G.729, GSM, or ulaw). On the other hand: With SIP: - Incoming Voice from my Provider - Asterisk = Sounds great - Outgoing Voice from Asterisk - my Provider = Sounds great The obvious conclusion is to simply use SIP; however as I've said, I'd prefer to use IAX2 - plus, I'm curious why SIP sounds great, while IAX2 only sounds good one-way (ie. incoming to my asterisk system). The server for my provider is identical in either case. So I figure it's one of a few things: - misconfiguration - My ISP (Comcast) is throttling or giving a low priority to IAX, but not SIP - If there's something I can do here, I'd like to know, but I doubt it. - a problem with my provider - In which I'll contact them. For the first case - misconfiguration, I'd appreciate some input. My iax.conf is fairly straightforward: [general] bandwidth=low jitterbuffer=yes forcejitterbuffer=no encryption = yes autokill=yes maxcallnumbers=12 maxcallnumbers_nonvalidated=4 [guest] type=user context=default callerid=Guest IAX User [myprovider] type=friend username= secret= context=somecontext host=provider_server qualify=1000 disallow=all allow=g729 allow=ulaw auth=md5,rsa requirecalltoken=yes trunk=yes Firewall: Asterisk is behind a connection-tracking firewall; in my case, I've noticed that my own connection to my provider has always been sufficient to allow connection tracking to just work - and incoming calls are accepted without problems, and voice travels in both directions (albeit not so well when outgoing). I have configured my firewall to forward incoming connections on port 4569 to my Asterisk box, and tested. This had no effect on call quality (which is no surprise given it's the /outgoing/ voice that's problematic). Outgoing connections are fairly typical for a NAT setup - anything can go out. Any other ideas before I give up on using IAX? Thanks -- Troy Telford -- _ -- 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 The message does not contain any threats AVG for MS Exchange Server (2012.0.1913 - 2114/4837)-- _ -- 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
[asterisk-users] CDR Analyzer/Queue stats reporting
I've been tasked with finding and implementing a CDR/Queue analyzer to provide information to management about the call center's performance. My Google-fu seems to be returning a lot of things that are more or less abandoned projects. Does anyone have any recommended solutions for a CentOS 6 / Asterisk 10 vanilla server? Not opposed to something commercial, provided it actually works and isn't a disaster to set up. Thank you, Noah Engelberth MetaLINK Technologies System Administration nengelbe...@team-meta.netmailto:nengelbe...@team-meta.net 419-636-0999 ext 100 The message does not contain any threats AVG for MS Exchange Server (2012.0.1913 - 2114/4835)-- _ -- 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] Possible bug (or feature?) in extension matching and parking feature
My understanding regarding the pattern match order is that Asterisk will not search include= contexts unless there is no matching extension in the original context. So, since _X. matches anything, the include=parkedcalls context will never be searched. A better way to accomplish what you want to do is to use exten = i (the Asterisk reserved extension for invalid) to catch mis-dialed calls. That way Asterisk will search for correct extensions in the original context, then search your include= contexts, then fall through to exten = i if nothing matches. And the i DOES need to be lower case. -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Sebastian Arcus Sent: Sunday, February 26, 2012 5:32 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] Possible bug (or feature?) in extension matching and parking feature I wanted a custom extension to match miss-dialled numbers in my dialplan. I've included the following: exten = _X.,1,Answer() exten = _X.,n,Playback(extension_not_found_please_make_sure_you_dial_nine_in_front_of_external_numbers) exten = _X.,n,Hangup() However, this has the curious side effect of making the parking extensions (located at 700, 701-720 - as per defaults) invisible. For some reason Asterisk doesn't seem to include those extensions on an even footing with extensions in the local context when extensions matching, although they are included with include = parkedcalls. I can't park calls by transferring them to 700, I can't reach calls parked with the one step dialling sequence (which continues to work) any more. My understanding is the * would match the most specific extension first - but it would appear that this doesn't apply to parking extensions. All other extensions work fine when using the custom extension above. I'm running Asterisk 10.1.2 -- _ -- 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 The message does not contain any threats AVG for MS Exchange Server (2012.0.1913 - 2114/4833)-- _ -- 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] Hot desking and presence
One modification to my previous dialplan: [hotdesk_outbound] includes (via cascade) internal-calls exten = .X,1,NoOp() ...snip do stuff to determine who's calling, set their extension number to WHO... same = n,Set(GROUP(activecalls)=${WHO}) same = n,Set(DEVICE_STATE(Custom:${WHO})=INUSE) ...snip make the call... Needs to be: [hotdesk_outbound] includes (via cascade) internal-calls exten = .X,1,NoOp() ...snip do stuff to determine who's calling, set their extension number to WHO... same = n,Set(GROUP(activecallers)=${WHO}) same = n,Set(DEVICE_STATE(Custom:${WHO})=INUSE) ...snip make the call... And similarly, all checks or use of GROUP_COUNT(${WHO}@activecalls) should be changed to GROUP_COUNT(${WHO}@activecallers). I missed the fact that setting GROUP(activecalls)=${E} later on in my dialplan was overwriting the GROUP(activecalls)=${WHO} for intra-office calls, and thus breaking my ability to see that the person placing the intra-office call was on another line if a second call rang their phone or what have you. Noah Engelberth MetaLINK Technologies System Administration The message does not contain any threats AVG for MS Exchange Server (2012.0.1913 - 2114/4827)-- _ -- 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
[asterisk-users] format_mp3.so in 1.6.1
I have been trying to get format_mp3 to work in 1.6.1.1 (addons 1.6.1.0) to no avail; Asterisk seems to find the file and try to start playing back the .slin conversion of the mp3 file, but fails. These files work correctly with addons 1.6.0.0 against asterisk 1.6.0.9. Any suggestions as to where I should start looking? I have confirmed that the format_mp3.so module is loading in 1.6.1.1 (attempting to load it kicks an error that it is already loaded), but even after I have made a call in that should have triggered the format_mp3.so module to playback the MP3 file in question, format_mp3.so is reporting that it has been used 0 times since asterisk was started. Noah Engelberth Direct Link Computer Systems ___ -- 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