[Freeswitch-users] mod_limit
Brian Snipes
bsnipes at snipes.org
Mon Mar 17 14:17:59 PDT 2008
A little background:
I would like our phones to have the ability to roll a call over to a
second registration on the phone if the first registration is in use.
An example: line1 is registered as 317, line2 as 417. If line1 is in
use I would like the call to 317 to go to 417. If 417 is in use then
have it rollover to 317 voicemail.
Using suggestions on the irc channel I've added extensions for limit
and limit_exceeded but when a second call comes into the 317 extension
it gets a hangup with the following:
2008-03-17 12:46:33 [INFO] mod_dialplan_xml.c:223 dialplan_hunt()
Processing Brian Snipes->limit_exceeded at default
2008-03-17 12:46:33 [NOTICE] switch_ivr.c:982
switch_ivr_session_transfer() Transfer
sofia/default/305 at 192.168.10.2:5060 to enum[limit_exceeded at default]
2008-03-17 12:46:34 [INFO] switch_core_state_machine.c:113
switch_core_standard_on_ring() No Route, Aborting
Here is what I have cobbled together through reading and experimenting.
I'm not sure if all the set/export statements are needed or not. I used
the info application to try and figure out what condition to test for
but I'm not doing something right.
<extension name="limit" continue="true">
<condition>
<action application="limit" data="inbound ${destination_number}
1"/>
</condition>
</extension>
<extension name="limit_exceeded">
<!-- <condition field="destination_number"
expression="^limit_exceeded$"> -->
<!-- <action application="info"/> -->
<!-- <action application="playback"
data="${base_dir}/sounds/music/8000/partita-no-3-in-e-major-bwv-1006-1-preludio.wav"/> -->
<!-- <action application="hangup"/> -->
<!-- </condition> -->
<condition field="sip_req_user" expression="^(317)$">
<action application="set" data="destination_number=417"/>
<action application="export" data="destination_number=417"/>
<action application="set" data="dialed_ext=417"/>
<action application="export" data="dialed_ext=417"/>
<action application="set" data="hangup_after_bridge=true"/>
<action application="bridge"
data="${sofia_contact($${domain}/${dialed_ext}@$${domain})}"/>
</condition>
</extension>
Many thanks,
Brian
More information about the FreeSWITCH-users
mailing list