Sure, you can simply set your regexp in your dialplan. Your example routes numbers starting with 04 to voicepulse_pt 4 or 10 digit numbers go to voicepulse. Now, why you named your gateways voicepulse when neither are using voicepulse, I'll let you ponder. :) If your needs are more complex and/or you have many routes, look into using mod_lcr. I have routes loaded from 2 providers in my tables (teliax and vitelity). phone=> select count(*) from lcr; count ------- 15425 (1 row) Queries against this datbase (postgresql 8.3, using prefix module on a lower end box in the middle of a rsync backup) for lcr info are on the order of 5 milliseconds. http://wiki.freeswitch.org/wiki/Mod_lcr On Sat, Apr 11, 2009 at 11:55 PM, David Robinson <pawzlion@gmail.com> wrote:
I have configured two providers in sip_profiles/external/example.xml as follows:
<include> <gateway name="voicepulse"> <param name="username" value="09515130"/> <param name="realm" value="sip.faktortel.com.au"/> <param name="password" value="xxxx"/> <param name="expire-seconds" value="600"/> <param name="register" value="true"/> <param name="extension" value="1000"/> </gateway>
<gateway name="voicepulse_pt"> <param name="username" value="8889200745"/> <param name="realm" value="sip.pennytel.com"/> <param name="password" value="xxxx"/> <param name="expire-seconds" value="600"/> <param name="register" value="true"/> <param name="extension" value="1000"/> </gateway> </include>
I have put this in dialplan/defaul.xml to dial out. Regexp matches the first extension if it's a mobile. I want it to route to Pennytelm. voicepulse_pt.
<extension name="Long Distance - voicepulse pt"> <condition field="destination_number" expression="^(04\d+)$"> <action application="set" data="effective_caller_id_number=11111111111"/> <!-- If your provider does not provide ringback (180 or 183) you may simulate ringback by uncommenting the following line. --> <!-- action application="ringback" /--> <action application="bridge" data="sofia/gateway/voicepulse_pt/ $1"/> </condition> </extension>
<extension name="Long Distance - voicepulse"> <condition field="destination_number" expression="^(\d{4,10})$"> <action application="set" data="effective_caller_id_number=99999999999"/> <!-- If your provider does not provide ringback (180 or 183) you may simulate ringback by uncommenting the following line. --> <!-- action application="ringback" /--> <action application="bridge" data="sofia/gateway/voicepulse/$1"/> </condition> </extension>
Is this how I should be doing this ? I want to specify a different gateway for a different rexep. Please give me some idea what path I should take.
David
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- -Rupa