Sebastian Arcus
2012-Feb-26 10:32 UTC
[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
Noah Engelberth
2012-Feb-26 13:32 UTC
[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-bounces at lists.digium.com [mailto:asterisk-users-bounces at 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 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: AVG Certification.txt URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120226/2f33f233/attachment.txt>
Hi, I have a question regarding NAT - I have two Asterisk setups, and a couple of softphones on my laptop to test them. In the first Asterisk I've got nat=yes for all SIP phones. The second setup is identical as far as software is concerned, but the server is running on a VPS with one of the larger VPS hosting services. On this second setup I was able to phone out from my XLite softphone but when I tried phoning in nothing happened, basically because the phone was always UNREACHABLE. It would register fine with Asterisk but then disappear. After nosing around for quite a bit I found a suggestion that I try setting nat=route for the SIP phone, and suddenly it worked both ways. Another SIP phone on the same laptop connects to the first Asterisk server setup (which runs on a dedicated box with fixed IP, not in VPS) but I notice that every minute or so Asterisk tells me that the phone is unreachable, then a few seconds later it becomes reachable again. My laptop is currently sitting at home with typical home-Internet configuration (ADSL, Nat, no fixed IP). I did see something somewhere about the big VPS providers using some form of "hidden" NAT but I don't know what that could mean. My question is: Does this difference in behaviour have something to do with the second server running on a VPS - and are there any drawbacks to using nat=route on all client SIP phones? Best regards Binni Care Solutions Brettesvillesgade 14 9000 Aalborg Telefon: 8832 1600 Mobil: 3020 0868 www.netklinik.dk, www.gangweb.dk, www.caresolutions.dk