<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>For extensions you usually have a 4 digit number so you would do this: ^(\d{4})$ then for the pstn you would not want to match just all digits like that. ^(\d{7,15})$</div><div><br></div><div>/b</div><div><br></div><div><br></div><br><div><div>On Aug 28, 2008, at 1:01 PM, Cliconnect wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div><font face="Tahoma" color="#000080" size="2"><div><font face="Tahoma" color="#000080" size="2"><span class="484171816-28082008">Hi,</span></font></div><div><font face="Tahoma" color="#000080" size="2"><span class="484171816-28082008"></span></font> </div><div><font face="Tahoma" color="#000080" size="2"><span class="484171816-28082008"> I can call extensions like 1000 with</span></font></div><div><font face="Tahoma" color="#000080" size="2"><span class="484171816-28082008"></span></font> </div><div><font face="Tahoma" color="#000080" size="2"><span class="484171816-28082008"><extension name="extensions"><br> <condition field="destination_number" expression="^(\d+)$"><br> <action application="bridge" data="sofia/doublenat/$1%voipclic.com "/><br> </span></font><font face="Tahoma" color="#000080" size="2"><span class="484171816-28082008"> </condition><br> </extension></span></font></div><div><font face="Tahoma" color="#000080" size="2"><span class="484171816-28082008"></span></font> </div><div><font face="Tahoma" color="#000080" size="2"><span class="484171816-28082008">and I can call PSTN with</span></font></div><div><font face="Tahoma" color="#000080" size="2"><span class="484171816-28082008"></span></font> </div><div><font face="Tahoma" color="#000080" size="2"><span class="484171816-28082008"><extension name="PSTN"><br> <condition field="destination_number" expression="^(\d+)$"><br> <action application="bridge" data="sofia/gateway/inphonex/$0"/></span></font></div><div><span class="484171816-28082008"><font face="Tahoma" color="#000080" size="2"> </condition><br> </extension><br></font></span></div><div><br><span class="484171816-28082008"><font face="Tahoma" color="#000080" size="2">Both config being in the same default.xml dialplan but I must use one or the other config. What I have to do in order to have them working at the same time. In other words the<span class="671505817-28082008"><span class="Apple-converted-space"> </span>same<span class="Apple-converted-space"> </span></span> user can call PSTN and the extension.</font></span></div><div><span class="484171816-28082008"><font face="Tahoma" color="#000080" size="2"></font></span> </div><div><span class="484171816-28082008"><font face="Tahoma" color="#000080" size="2">thanks</font></span></div><div><span class="484171816-28082008"><font face="Tahoma" color="#000080" size="2"></font></span> </div><div><span class="484171816-28082008"><font face="Tahoma" color="#000080" size="2">Duan</font></span></div></font></div><div> </div></span></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Brian West</div><div><a href="sip:brian@freeswitch.org">sip:brian@freeswitch.org</a></div><div><br></div></div></span><br class="Apple-interchange-newline"> </div><br></body></html>