Re: [Freeswitch-users] Setting effecting_caller_id_name
If you put the $ at the end then it will try to match the entire string instead of just the beginning of it, which won't work in this case. Is there a way to match just the beginning of the string in FS? Thanks, - Phil You need a $ after 'lookup' for it to be a regex. Brian Foster Endigo Computer LLC _____________________________________________ From: Phil Quesinberry Sent: Thursday, July 26, 2012 3:59 PM To: 'freeswitch-users@lists.freeswitch.org' Subject: Setting effecting_caller_id_name And while I'm asking dumb questions. When doing CNAM dips from opencnam.com, often you get a result of "Currently running a lookup for phone 'xxxxxxxxxx'. on incoming calls, typically for wireless or other unknown name callers and I wanted to change that to "Wireless/Unknown" Since caller_id_name is apparently read-only, I am attempting to set effective_caller_id_name. I put the following in public.xml right below the "fix_cidnam_plus" entry, in other words after a CNAM lookup has been performed. <extension name="fix_currently_running" continue="true"> <condition field="caller_id_name" expression="^Currently running a lookup"> <action application="set" data="effective_caller_id_name=Wireless/Unknown"/> </condition> </extension> If I crafted my regex properly, then it should be matching on the first part of the string and setting the variable appropriately. Is 'effective_caller_id_name' the variable I should be setting? Many thanks, Phil Quesinberry Q Systems Engineering, Inc. Electronic Controls and Embedded Systems Development (410) 969-8002 http://www.qsystemsengineering.com
You can just not use a regex. Do you need to escape the spaces? Brian Foster Endigo Computer LLC Sent from a mobile device. On Jul 26, 2012 5:47 PM, "Phil Quesinberry" <philq@qsystemsengineering.com> wrote:
**
If you put the $ at the end then it will try to match the entire string instead of just the beginning of it, which won’t work in this case. Is there a way to match just the beginning of the string in FS?
Thanks,
- Phil
You need a $ after 'lookup' for it to be a regex.
Brian Foster
Endigo Computer LLC
_____________________________________________ *****From:* Phil Quesinberry *****Sent:* Thursday, July 26, 2012 3:59 PM *****To:* 'freeswitch-users@lists.freeswitch.org' *****Subject:* Setting effecting_caller_id_name
And while I’m asking dumb questions…
When doing CNAM dips from opencnam.com, often you get a result of “Currently running a lookup for phone ‘xxxxxxxxxx’… on incoming calls, typically for wireless or other unknown name callers and I wanted to change that to “Wireless/Unknown” Since caller_id_name is apparently read-only, I am attempting to set effective_caller_id_name. I put the following in public.xml right below the “fix_cidnam_plus” entry, in other words after a CNAM lookup has been performed.
<extension name="fix_currently_running" continue="true">
<condition field="caller_id_name" expression="^Currently running a lookup">
<action application="set" data="effective_caller_id_name=Wireless/Unknown"/>
</condition>
</extension>
If I crafted my regex properly, then it should be matching on the first part of the string and setting the variable appropriately. Is ‘effective_caller_id_name’ the variable I should be setting?
Many thanks,
*******Phil Quesinberry*
Q Systems Engineering, Inc.
Electronic Controls and Embedded Systems Development
(410) 969-8002
***http://www.qsystemsengineering.com*<http://www.qsystemsengineering.com>
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
This exmaple should be correct provided that caller_id_name containts ³Currently runnint a lookup² with this pinned to that start of the field... On that extension in your dialplan toss a <anti-action application=²info²/> If your regex isnt matching on the caller_id_name field the above will show you whats in there (along with every thing else too heh) K On 7/26/12 7:11 PM, "Brian Foster" <bdfoster@endigotech.com> wrote:
<extension name="fix_currently_running" continue="true">
<condition field="caller_id_name" expression="^Currently running a lookup">
<action application="set" data="effective_caller_id_name=Wireless/Unknown"/>
</condition>
</extension>
Sounds like your doing openCNAM, check the cnam.cgi in tree, you should be checking the response code and not the text returned. I built the wrapper to clean up the input before I query because of this. -- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH_Wire T: +1.213.286.0410 | F: +1.213.286.0401 | M: +1.918.424.WEST iNUM: +883 5100 1286 0410 On Jul 27, 2012, at 10:06 AM, Ken Rice <krice@freeswitch.org> wrote: Re: [Freeswitch-users] Setting effecting_caller_id_name This exmaple should be correct provided that caller_id_name containts “Currently runnint a lookup” with this pinned to that start of the field... On that extension in your dialplan toss a <anti-action application=”info”/> If your regex isnt matching on the caller_id_name field the above will show you whats in there (along with every thing else too heh) K On 7/26/12 7:11 PM, "Brian Foster" <bdfoster@endigotech.com> wrote: <extension name="fix_currently_running" continue="true"> <condition field="caller_id_name" expression="^Currently running a lookup"> <action application="set" data="effective_caller_id_name=Wireless/Unknown"/> </condition> </extension> _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com Join Us At ClueCon - Aug 7-9, 2012 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
I've been having problems with some aspects of Enterprise Origin (notably call_leg_delay) and am wondering if I need to be using EO at all. Trouble is that even pretty simple multi-destination dialplans just don't seem to be working for me with multiple SIP registrations. eg. <include> <extension name="0095301"> <condition field="destination_number" expression="^(301|441223900481)$"> <action application="set" data="hangup_after_bridge=true"/> <action application="set" data="continue_on_fail=true"/> <action application="set" data="bridge_generate_comfort_noise=true"/> <action application="set" data="ignore_early_media=true"/> <action application="set" data="leg_common=sess_ref=${uuid},tenant_id=0095,b_ext=301,group_confirm_file=lua confirmcall.lua,group_confirm_key=exec,whisper_msg=/home/pabx/004-0095/20120730-100551-00001/recordings/tts/301_whisper.wav,accept_msg=/home/pabx/004-0095/20120730-100551-00001/recordings/tts/accept1.wav"/> <action application="set" data="leg_sip=[accept_mode=Direct,sip_h_sb_routing=${sb_routing}&441223900481_301_pers_Fred,origination_caller_id_name=WizzCo x301 Fred,leg_timeout=60]user/0095301@${domain_name}"/> <action application="set" data="leg_pstn=[leg_delay_start=10,accept_mode=Direct,leg_timeout=60,origination_caller_id_number=00953010${ani}]sofia/internal/898000000000202074904992@x.y.z.a"/> <action application="bridge" data="<${leg_common}>${leg_sip},${leg_pstn}"/> </condition> </extension> </include> The idea here is that the user can have a SIP phone as well as a PSTN phone. The above script works OK with a single SIP registration against user 0095301. But when one tries to connect more than one SIP handset, It doesn't work (and the warning "[WARNING] switch_ivr_originate.c:2351 Only calling the first element in the list in this mode." comes up). (However, the pstn phone does kick in after 10s, which is nice). That's why we went for Enterprise Originate - which works well for multiple SIP registrations, except for the fact that we no longer have control over delayed leg-starting. Now I'm wondering what that warning is all about - eg. what is "this mode"??? Just in case you're wondering - we do have the line : <param name="multiple-registrations" value="true"/> in the /conf/sip_profiles/internal.xml (Although I confess to not quite understanding why it's using a profile called "internal" for this) *** Question: What does "this mode" mean? A variant on this is to not use multiple SIP registrations to the same user, but actually create another user (so we have a and b): <action application="set" data="leg_sipa=[accept_mode=Direct,sip_h_sb_routing=${sb_routing}&441223900481_301_pers_Fred,leg_timeout=60]user/0095301a@${domain_name}"/> <action application="set" data="leg_sipb=[accept_mode=Direct,sip_h_sb_routing=${sb_routing}&441223900481_301_pers_Fred,leg_timeout=60]user/0095301b@${domain_name}"/> <action application="set" data="leg_pstn=[leg_delay_start=10,accept_mode=Direct,leg_timeout=60,origination_caller_id_number=00953010${ani}]sofia/internal/898000000000202074904992@x.y.z.a"/> <action application="bridge" data="<${leg_common}>${leg_sipa},${leg_sipb},${leg_pstn}"/> This is close to achieving our aim, although it would be better if it could also support multiple SIP regsitrations.
This issue is now closed (the problem is with "user/0095301@${domain_name}" - if that is changed to "${sofia_contact(0095301)}" then all is well). Thanks to Anthony for that one....
I've been having problems with some aspects of Enterprise Origin (notably call_leg_delay) and am wondering if I need to be using EO at all.
Trouble is that even pretty simple multi-destination dialplans just don't seem to be working for me with multiple SIP registrations.
eg.
<include> <extension name="0095301"> <condition field="destination_number" expression="^(301|441223900481)$"> <action application="set" data="hangup_after_bridge=true"/> <action application="set" data="continue_on_fail=true"/> <action application="set" data="bridge_generate_comfort_noise=true"/> <action application="set" data="ignore_early_media=true"/> <action application="set" data="leg_common=sess_ref=${uuid},tenant_id=0095,b_ext=301,group_confirm_file=lua confirmcall.lua,group_confirm_key=exec,whisper_msg=/home/pabx/004-0095/20120730-100551-00001/recordings/tts/301_whisper.wav,accept_msg=/home/pabx/004-0095/20120730-100551-00001/recordings/tts/accept1.wav"/> <action application="set" data="leg_sip=[accept_mode=Direct,sip_h_sb_routing=${sb_routing}&441223900481_301_pers_Fred,origination_caller_id_name=WizzCo x301 Fred,leg_timeout=60]user/0095301@${domain_name}"/> <action application="set" data="leg_pstn=[leg_delay_start=10,accept_mode=Direct,leg_timeout=60,origination_caller_id_number=00953010${ani}]sofia/internal/898000000000202074904992@x.y.z.a"/> <action application="bridge" data="<${leg_common}>${leg_sip},${leg_pstn}"/> </condition> </extension> </include>
The idea here is that the user can have a SIP phone as well as a PSTN phone.
The above script works OK with a single SIP registration against user 0095301.
But when one tries to connect more than one SIP handset, It doesn't work (and the warning "[WARNING] switch_ivr_originate.c:2351 Only calling the first element in the list in this mode." comes up). (However, the pstn phone does kick in after 10s, which is nice).
That's why we went for Enterprise Originate - which works well for multiple SIP registrations, except for the fact that we no longer have control over delayed leg-starting.
Now I'm wondering what that warning is all about - eg. what is "this mode"??? Just in case you're wondering - we do have the line : <param name="multiple-registrations" value="true"/> in the /conf/sip_profiles/internal.xml (Although I confess to not quite understanding why it's using a profile called "internal" for this)
*** Question: What does "this mode" mean?
A variant on this is to not use multiple SIP registrations to the same user, but actually create another user (so we have a and b):
<action application="set" data="leg_sipa=[accept_mode=Direct,sip_h_sb_routing=${sb_routing}&441223900481_301_pers_Fred,leg_timeout=60]user/0095301a@${domain_name}"/> <action application="set" data="leg_sipb=[accept_mode=Direct,sip_h_sb_routing=${sb_routing}&441223900481_301_pers_Fred,leg_timeout=60]user/0095301b@${domain_name}"/> <action application="set" data="leg_pstn=[leg_delay_start=10,accept_mode=Direct,leg_timeout=60,origination_caller_id_number=00953010${ani}]sofia/internal/898000000000202074904992@x.y.z.a"/> <action application="bridge" data="<${leg_common}>${leg_sipa},${leg_sipb},${leg_pstn}"/>
This is close to achieving our aim, although it would be better if it could also support multiple SIP regsitrations.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
----- No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.2196 / Virus Database: 2437/5143 - Release Date: 07/20/12 Internal Virus Database is out of date.
Is fix_cidnam_plus setting it's data inline? I think it must update the caller_id_name var inline, to make it possible to do a regex on that variable right afterwards in the dialplan. /Peter 26 jul 2012 kl. 23:51 skrev "Phil Quesinberry" <philq@qsystemsengineering.com<mailto:philq@qsystemsengineering.com>>: If you put the $ at the end then it will try to match the entire string instead of just the beginning of it, which won’t work in this case. Is there a way to match just the beginning of the string in FS? Thanks, - Phil You need a $ after 'lookup' for it to be a regex. Brian Foster Endigo Computer LLC _____________________________________________ From: Phil Quesinberry Sent: Thursday, July 26, 2012 3:59 PM To: 'freeswitch-users@lists.freeswitch.org<mailto:freeswitch-users@lists.freeswitch.org>' Subject: Setting effecting_caller_id_name And while I’m asking dumb questions… When doing CNAM dips from opencnam.com<http://opencnam.com>, often you get a result of “Currently running a lookup for phone ‘xxxxxxxxxx’… on incoming calls, typically for wireless or other unknown name callers and I wanted to change that to “Wireless/Unknown” Since caller_id_name is apparently read-only, I am attempting to set effective_caller_id_name. I put the following in public.xml right below the “fix_cidnam_plus” entry, in other words after a CNAM lookup has been performed. <extension name="fix_currently_running" continue="true"> <condition field="caller_id_name" expression="^Currently running a lookup"> <action application="set" data="effective_caller_id_name=Wireless/Unknown"/> </condition> </extension> If I crafted my regex properly, then it should be matching on the first part of the string and setting the variable appropriately. Is ‘effective_caller_id_name’ the variable I should be setting? Many thanks, Phil Quesinberry Q Systems Engineering, Inc. Electronic Controls and Embedded Systems Development (410) 969-8002 http://www.qsystemsengineering.com !DSPAM:5011b86432763191115303! _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com Join Us At ClueCon - Aug 7-9, 2012 FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto: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 !DSPAM:5011b86432763191115303!
If this is still an issue, please paste a log of FS going over this extension. This entire thread has been only speculation. -Avi On Fri, Jul 27, 2012 at 11:09 AM, Peter Olsson < peter.olsson@visionutveckling.se> wrote:
Is fix_cidnam_plus setting it's data inline? I think it must update the caller_id_name var inline, to make it possible to do a regex on that variable right afterwards in the dialplan.
/Peter
26 jul 2012 kl. 23:51 skrev "Phil Quesinberry" < philq@qsystemsengineering.com<mailto:philq@qsystemsengineering.com>>:
If you put the $ at the end then it will try to match the entire string instead of just the beginning of it, which won’t work in this case. Is there a way to match just the beginning of the string in FS?
Thanks,
- Phil
You need a $ after 'lookup' for it to be a regex.
Brian Foster
Endigo Computer LLC
_____________________________________________ From: Phil Quesinberry Sent: Thursday, July 26, 2012 3:59 PM To: 'freeswitch-users@lists.freeswitch.org<mailto: freeswitch-users@lists.freeswitch.org>' Subject: Setting effecting_caller_id_name
And while I’m asking dumb questions…
When doing CNAM dips from opencnam.com<http://opencnam.com>, often you get a result of “Currently running a lookup for phone ‘xxxxxxxxxx’… on incoming calls, typically for wireless or other unknown name callers and I wanted to change that to “Wireless/Unknown” Since caller_id_name is apparently read-only, I am attempting to set effective_caller_id_name. I put the following in public.xml right below the “fix_cidnam_plus” entry, in other words after a CNAM lookup has been performed.
<extension name="fix_currently_running" continue="true">
<condition field="caller_id_name" expression="^Currently running a lookup">
<action application="set" data="effective_caller_id_name=Wireless/Unknown"/>
</condition>
</extension>
If I crafted my regex properly, then it should be matching on the first part of the string and setting the variable appropriately. Is ‘effective_caller_id_name’ the variable I should be setting?
Many thanks,
Phil Quesinberry
Q Systems Engineering, Inc.
Electronic Controls and Embedded Systems Development
(410) 969-8002
http://www.qsystemsengineering.com
!DSPAM:5011b86432763191115303! _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto: 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
!DSPAM:5011b86432763191115303!
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
participants (7)
-
Alex
-
Avi Marcus
-
Brian Foster
-
Brian West
-
Ken Rice
-
Peter Olsson
-
Phil Quesinberry