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@default 2008-03-17 12:46:33 [NOTICE] switch_ivr.c:982 switch_ivr_session_transfer() Transfer sofia/default/305@192.168.10.2:5060 to enum[limit_exceeded@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
bsnipes wrote:
<condition field="sip_req_user" expression="^(317)$">
Looks like this was my problem. If I change sip_req_user to "rdnis" it works as expected. Brian -- View this message in context: http://www.nabble.com/mod_limit-tp16108683p16122103.html Sent from the Freeswitch-users mailing list archive at Nabble.com.
You can also wedge in the info app and it will dump all the vars that you can regexp on. /b On Mar 18, 2008, at 10:06 AM, bsnipes wrote:
bsnipes wrote:
<condition field="sip_req_user" expression="^(317)$">
Looks like this was my problem. If I change sip_req_user to "rdnis" it works as expected.
Brian -- View this message in context: http://www.nabble.com/mod_limit-tp16108683p16122103.html Sent from the Freeswitch-users mailing list archive at Nabble.com.
_______________________________________________ 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
On Tue, 2008-03-18 at 10:14 -0500, Brian West wrote:
You can also wedge in the info app and it will dump all the vars that you can regexp on.
/b
I did that at first but wasn't sure how much of the text to take off the variables I received back. For instance, here is some of the output of info: Caller-Destination-Number: [limit_exceeded] Caller-Unique-ID: [ec888388-f447-11dc-818f-d3fbcfc70174] Caller-Source: [mod_sofia] Caller-Context: [default] Caller-RDNIS: [317] ... variable_sip_authorized: [true] variable_sip_mailbox: [305] variable_sip_auth_username: [305] I assumed at first that in the conditions I had to check for 'Caller-RDNIS' or 'variable_*'. When that didn't work I found a Wiki page that listed several variables, one being 'rdnis' ( note the lowercase ), and that seemed to work for me. This brings up 2 other questions. Is the field checking case insensitive? In the checks do you always just remove anything before and including the first hypen to get the var name? Brian
participants (3)
-
Brian Snipes
-
Brian West
-
bsnipes