David I took your advice and clean everything up and built everthing from
scratch. Inbound and outbouns context and all that, and now all works fine.
Thanks guys. Good learning experience as well..
Cheers
Ionel
________________________________
From: David Kerr <da...@kerr.net>
To: AstLinux Users Mailing List <astlinux-users@lists.sourceforge.net>
Sent: Mon, July 12, 2010 9:27:46 PM
Subject: Re: [Astlinux-users] extensions.conf quick question
You've got a mixture of stuff here all in the same [rom] context. I would try
and simplify things by separating your incoming context from your outbound
context.... dialing from SIP/101 should go nowhere near your inbound context.
Also, I'd be very wary of include statements. Try removing them and just
imbedding the Dial() commands directly into the [rom] context. The reason for
this is that asterisk sorts the extensions internally to assist with its
extension matching. However, extensions inside an include are only sorted
within that include, not with all the other extensions inside the context. Its
all very confusing
(see http://www.voip-info.org/wiki/view/Asterisk+config+extensions.conf+sorting )
which is good enough reason to try and avoid includes.
As for detecting a key sequence during an incoming call, there is no need for
AGI scripts. I use the following...
; Caller interrupted prompts by pressing 0 (zero). This is an escape to let
caller
; authenticate themselves with a PIN...
exten = 0,1,Authenticate(/whitelist,da,4)
exten = 0,n,Set(CDR(userfield)=${CDR(userfield)}-"PIN OK")
exten = 0,n,Set(CALLERID(ani)=${CDR(accountcode)})
exten = 0,n,Set(CALLERID(num)=${CDR(accountcode)})
exten = 0,n,Set(DB_RESULT=${DB(whitelist/${CDR(accountcode)})})
exten = 0,n,Goto(whitelist,1)
This lets you place a 4-digit PIN into the astdb under "whitelist" in my
example. If caller presses '0' they will hear the prompt "please enter your
passcode followed by the pound key." If they passcode is correct, it falls
through to the next instruction. If incorrect after three attempts it says
"goodbye" and hangs up.
David
On Mon, Jul 12, 2010 at 6:34 PM, Ionel Chila <ionelch...@yahoo.com> wrote:
Please forgive me for posting a more gereneric question around my
>extensions.conf configuration in the astlinux forum but the level of help and
>support in this forum is outstanding so I will give it a try.
>
>Bellow please see my entire configuration. I have my astlinux box configured
for
>two providers, one in USA and one in Europe and my internal PAP2-NA box being
>client 101. My analog phone is conected to the PAP2-NA (101) box.
>
>Now, I added a custom configuration name "TRANSPARENT MENU" to allow me when
>dialing my own number from oustside hit a key sequence which will send me to an
>asociated agi script. All of that works fine except, when I am trying to dial
>out from my PAP2-NA (101) via the european provider from my I get this error.
>
>[Jul 12 17:27:24] NOTICE[2106]: chan_sip.c:15133 handle_request_invite: Call
>from '101' to extension '0238711050' rejected because extension not found.
>
>Is something have to do with the include statement. As soon as I remove the
>"include => outteliax" it works fine but the custom "TRANSPARENT MENU" no
longer
>works when I dial in and try to trigger one of the agi scripts.
>
>Does it make sense :-) Can one of you guys give me some ideas how to fix
>this? Thanks bunch.....
>
>;
>[globals]
>iROMs = SIP/101
>;
>[rom]
>exten => _339910611,1,DIAL(SIP/101, 16)
>exten => _339910611,2,Followme(${EXTEN})
>exten => _339910611,3,Voicemail(u101)
>exten => _339910611,101,Hangup()
>;
>; TRANSPARENT MENU
>:
>exten => s,1,GotoIf(${DB_EXISTS(blacklist/${CALLERID(num)})}?blacklisted,s,1)
>exten => s,2,Playback(wait-moment) ; 4 seconds of ringing music
>exten => s,3,Waitexten(1)
>exten => s,4,Goto(bypass,s,1)
>exten => 99,1,Goto(script1,s,1)
>exten => 88,1,Goto(script2,s,1)
>exten => i,1,Goto(bypass,s,1)
>;
>;
>include => outteliax
>include => outeurope
>include => vmail
>;
>; INCOMING IF NO CODE ENTERED
>;
>[bypass]
>exten => s,1,GotoIf(${DB_EXISTS(blacklist/${CALLERID(num)})}?blacklisted,s,1)
>exten => s,2,DIAL(SIP/101)
>exten => s,3,Voicemail(u101)
>exten => s,101,Hangup()
>;
>; SCRIPT-1 MENU (99)
>;
>[script1]
>exten => s,1,Answer
>exten => s,2,AGI(script1.agi)
>;
>;
>; SCRIPT-2 MENU (88)
>;
>[script1]
>exten => s,1,Answer
>exten => s,2,AGI(script2.agi)
>;
>; BLACKLIST
>;
>[blacklisted]
>exten => s,1,Answer
>exten => s,n,Wait(2)
>exten => s,n,Playback(vm-nobodyavail)
>exten => s,n,Wait(1)
>exten => s,n,Hangup
>;
>;
>[outteliax]
>exten => _1XXXXXXXXXX,1,DIAL(SIP/teliax/${EXTEN},90,tr)
>;
>;
>[outeurope]
>exten => _XXXXXXXXXX,1,DIAL(SIP/europe/4${EXTEN}, 60)
>;
>;
>[vmail]
>exten => 111,1,VoicemailMain(s${CALLERID(num)})
>exten => 111,2,Hangup
>;
>
>------------------------------------------------------------------------------
>This SF.net email is sponsored by Sprint
>What will you do first with EVO, the first 4G phone?
>Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>_______________________________________________
>Astlinux-users mailing list
>Astlinux-users@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/astlinux-users
>
>Donations to support AstLinux are graciously accepted via PayPal to
>pay...@krisk.org.
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Astlinux-users mailing list
Astlinux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/astlinux-users
Donations to support AstLinux are graciously accepted via PayPal to
pay...@krisk.org.