I have the following setup.. [extensions] ; all extensions defined here. exten => 1234,.... exten => 1235,.... [dial-out] ; PSTN dialout config ignorepat = 9 exten => _9,.... exten => h,.... [local] ; phone context in sip.conf is here.. include => extensions include => dialout The question is where will the "h" extension be active?? it appears to run for ALL, both internal and PSTN calls, not just the calls to the PSTN.. Is that correct?? is there any way to limit it to PSTN calls?? Later..
>I have the following setup.. > >[extensions] >; all extensions defined here. >exten => 1234,.... > >exten => 1235,.... > >[dial-out] >; PSTN dialout config >ignorepat = 9 > >exten => _9,.... > >exten => h,.... > >[local] >; phone context in sip.conf is here.. >include => extensions >include => dialout > > >The question is where will the "h" extension be active?? it appears >to run for ALL, both internal and PSTN calls, not just the calls to >the PSTN.. Is that correct?? is there any way to limit it to PSTN >calls?? > >Later..No. If you include "h" from anywhere, it gets included everywhere. The first one included, wins. There are extremely ugly ways to handle that problem in the way I think you want it handled using Goto and include. Essentially, create two contexts (one for external, and one for internal) and then use Goto(othercontext,${EXTEN},1) at the end of the first one if nothing matches. Put the "new" h extension definition in that new context. Verrrry ugly. I'm sure there is more than one way to address this problem, though, but in the 10 seconds I've thought about it, I didn't come up with any others. :-) JT
Your inheritied context is including the exten => h,... for dial-out & internal because your sip.conf is pulling both via your "local" context. Something like this should fix it: [local] include => extensions exten => _9,....,1,Goto(dial-out,${EXTEN},1) That will only execute the exten => h,... entry for matched outgoing calls that use "9". Hope it helps!! -----Original Message----- From: WipeOut [mailto:wipe_out@onetel.com] Sent: Thursday, November 20, 2003 10:26 AM To: asterisk-users@lists.digium.com Subject: [Asterisk-Users] Scope of the "h" extension.. I have the following setup.. [extensions] ; all extensions defined here. exten => 1234,.... exten => 1235,.... [dial-out] ; PSTN dialout config ignorepat = 9 exten => _9,.... exten => h,.... [local] ; phone context in sip.conf is here.. include => extensions include => dialout The question is where will the "h" extension be active?? it appears to run for ALL, both internal and PSTN calls, not just the calls to the PSTN.. Is that correct?? is there any way to limit it to PSTN calls?? Later.. _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users