Re: [Freeswitch-users] Fwd: execute function in ESL.pm module is not working

2009-08-06 Thread Michael Collins
On Wed, Aug 5, 2009 at 11:38 PM, velusamy velu velu.techni...@gmail.comwrote:

 Please any one help for this problem..


Sorry for the delay but many of the FreeSWITCH experts are at ClueCon right
now so we'll ask for your patience... in the meantime could you pastebin
your script and your dialplan entry so that we can take a look at them?

Thanks,
MC
___
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


Re: [Freeswitch-users] Monitoring On-Hold/Off-Hold

2009-08-06 Thread mayamatakeshi
2009/8/6 João Mesquita jmesqu...@gmail.com:
 I only see one way out of this. If you manage presence, an event like the
 following is sent:

 Event-Name: PRESENCE_IN
 Core-UUID: 189b12c0-7fb0-11de-b0bc-37eec03ad00f
 FreeSWITCH-Hostname: cl-t146-421cl
 FreeSWITCH-IPv4: XX
 FreeSWITCH-IPv6: %3A%3A1
 Event-Date-Local: 2009-08-05%2013%3A42%3A24
 Event-Date-GMT: Wed,%2005%20Aug%202009%2017%3A42%3A24%20GMT
 Event-Date-Timestamp: 1249494144628132
 Event-Calling-File: switch_channel.c
 Event-Calling-Function: switch_channel_presence
 Event-Calling-Line-Number: 472
 Channel-State: CS_HIBERNATE
 Channel-State-Number: 8
 Channel-Name: X
 Unique-ID: 4e73668e-81e7-11de-b0bc-37eec03ad00f
 Call-Direction: inbound
 Presence-Call-Direction: inbound
 Answer-State: answered
 Caller-Username: 1000
 Caller-Dialplan: XML
 Caller-Caller-ID-Name: Mesquita
 Caller-Caller-ID-Number: 1000
 Caller-Network-Addr: X
 Caller-Destination-Number: 1005
 Caller-Unique-ID: 4e73668e-81e7-11de-b0bc-37eec03ad00f
 Caller-Source: mod_sofia
 Caller-Context: X
 Caller-Channel-Name: X
 Caller-Profile-Index: 1
 Caller-Profile-Created-Time: 1249494132128119
 Caller-Channel-Created-Time: 1249494132128119
 Caller-Channel-Answered-Time: 1249494139500129
 Caller-Channel-Progress-Time: 1249494132368119
 Caller-Channel-Progress-Media-Time: 0
 Caller-Channel-Hangup-Time: 0
 Caller-Channel-Transfer-Time: 0
 Caller-Screen-Bit: true
 Caller-Privacy-Hide-Name: false
 Caller-Privacy-Hide-Number: false
 Other-Leg-Username: 1000
 Other-Leg-Dialplan: XML
 Other-Leg-Caller-ID-Name: Joao%20Mesquita
 Other-Leg-Caller-ID-Number: 1000
 Other-Leg-Network-Addr: 190.2.41.65
 Other-Leg-Destination-Number:
 sip%3A1005%40192.168.0.106%3A4559%3Bfs_nat%3Dyes%3Bfs_path%3Dsip%253A1005%2540190.2.41.65%253A4559
 Other-Leg-Unique-ID: 4e7622ac-81e7-11de-b0bc-37eec03ad00f
 Other-Leg-Source: mod_sofia
 Other-Leg-Context: X
 Other-Leg-Channel-Name: XX
 Other-Leg-Screen-Bit: true
 Other-Leg-Privacy-Hide-Name: false
 Other-Leg-Privacy-Hide-Number: false
 proto: src/switch_channel.c
 login: src/switch_channel.c
 from: XX
 rpid: unknown
 status: hold
 event_type: presence
 alt_event_type: dialog
 event_count: 3

 Content-Length: 543
 Content-Type: text/event-plain

 Other than that, I think it can be patched. I will take a look at it.

Thanks, that would be the best.

Just in case someone else needs this:
I have also tried to watch for
CHANNEL_EXECUTE/CHANNEL_EXECUTE_COMPLETE with Application set to
playback and some indication of MOH in the Application-Data header.
That would work but:
- they will be fired continuously if you set hold_music=some_file
- they will not be fired if you set hold_music=silence (of course)

___
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


Re: [Freeswitch-users] TLS/SRTP with Innovaphone IP200

2009-08-06 Thread NOx-WHV

Hi Jim,

yes! It´s possible to call the IP200 full encrypted for example from a SNOM
or phonerlite. But when i try to call the SNOM from a innovaphone, the call
fails and i only hear the mailbox.

To modify the dialplan i am not so sure how i works. I don´t have any
experience of configure freeswitch or working with xml files. :confused:

In my dialplan i just modify a few lines. If you want, you can have a look
on the file in the attachment. 

http://www.nabble.com/file/p24841050/default.xml default.xml 

Thanks for your help. =)

NOx


Jim Burke-2 wrote:
 
 Hi NOx,
 
 Can you clarify the direction of the calls.  When you say outgoing do
 you mean a call is terminating to the ip200?
 
 I have been down a similar path while testing Eyebeam.  If the
 terminating phone sets an option to only accept secure calls and FS
 does not send Secure Descriptions in the INVITE, Eyebeam would respond
 with 415 response code and the call would fail.  Depending on your
 diaplan this could send your call to voicemail.
 
 To fix it I added the following code to dialplan.
 action application=set data=continue_on_fail=79/
 bridge blah blah blah
 action application=set data=bypass_media=false/
 action application=set data=proxy_media=true/
 action application=set data=ringback=$${uk-ring}/
 action application=pre_answer/
 action application=export data=sip_secure_media=true/
 bridge blah blah blah
 
 The continue on fail captures the 415 response code forces the call to
 continue to the next bridge while sip_secure_media forces the second
 invite to include security descriptors.  The rest was required because
 I did not want to proxy media if the call was not secure, obviously if
 the call is secure on a point to point basis FS will have to proxy the
 media and this was the only way I could find for it to work.
 
 Hope this helps.
 
 Regards,
 
 
 On Wed, Aug 5, 2009 at 6:52 PM, NOx-WHVenno.egb...@googlemail.com wrote:

 Hello,

 i have a problem using a innovaphone ip200 with freeswitch and tls/srtp.
 The
 freeswitch certificate is in the trust list of the phone and it works
 with
 tls for incomming calls. But outgoing calls were rejected to the mailbox.
 The freeswitch configuration is ok, because it works with a snom 320.

 Who can help me to confugure the IP200?

 Thanks

 NOx
 --
 View this message in context:
 http://www.nabble.com/TLS-SRTP-with-Innovaphone-IP200-tp24823167p24823167.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

 
 
 
 -- 
 Jim Burke
 Director Evolutiontel.
 http://www.evolutiontel.net
 
 ___
 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
 
 

-- 
View this message in context: 
http://www.nabble.com/TLS-SRTP-with-Innovaphone-IP200-tp24823167p24841050.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


Re: [Freeswitch-users] Question about dynamic registration

2009-08-06 Thread Juan Backson
Hi,

Is there a sample module that I can take a look at on how to do that?
I don't understand how to get the registration request and how to pass back
auth result to freeswitch.

JB

On Mon, Aug 3, 2009 at 8:42 PM, Brian West br...@freeswitch.org wrote:

 You could build your own module to do it how ever you please.  But
 forking a script every time to auth is not very scalable.

 /b

___
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


[Freeswitch-users] question about latest version of mod_limit

2009-08-06 Thread mark morreny
Hello,

I have the following setup in the dialplan.  Then, I fire up sipp to send
5calls/s and I expect to get limit-pass=false in most of the INFO output.
However, I am getting all limit-pass=pass.

Does anyone know what is wrong with my dialplan?


 context name=internal

  extension name=test-limit

condition field=destination_number expression=^9(.*)$

action application=limit_hash_execute data=192.168.1.102 6000
1/1 transfer to-next /
action application=set data=limit-pass=false/
action application=info /
action application=hangup /

/condition

  /extension
extension name=to-next
condition field=destination_number expression=^to-next$
action application=set data=limit-pass=true/
action application=info /
action application=hangup /



/condition
/extension
/context
___
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


[Freeswitch-users] A few questions about lua

2009-08-06 Thread Seven Du
ALL-
I have a few questions when scripting lua. According to wiki, it is possible
to run looping forever lua scripts through start-up config or luarun.

1) Will the lua script stop when unload mod_lua? I experienced core dump
when unload mod_lua while there was a running lua script. Reported on jira.

2) How to stop a forever running lua script?  I stop it by listening a
CUSTOM event fired elsewhere. See code below. Is there any standard way like
luastop ?

3) Any way to show how many running lua scripts? luashow ?

4) It seems cannot get the lua script name in a lua script, I made a patch
to jira by assign it to the argv[0].

5) Seems that only EventConsumer(all) working.
EventConsumer(CHANNEL_HANUP CUSTOM lua::stop) doesn't seem to work. Any
idea to this?

Thanks a lot.



code example:

con = freeswitch.EventConsumer(all);

argv[0] = test.lua

freeswitch.consoleLog(info,  Lua Script [ .. argv[0] .. ] Starting
=\n);

local all_events = 0


for e in (function() return con:pop(1) end) do
  -- freeswitch.consoleLog(info, event\n .. e:serialize(xml));
   all_events = all_events + 1;
freeswitch.consoleLog(info, all_events:  .. all_events .. \n)
 event_name = e:getHeader(Event-Name) or 
event_subclass = e:getHeader(Event-Subclass) or 
 if (event_name == CUSTOM and event_subclass == lua::stop) then
  freeswitch.consoleLog(info, -lua Script [ .. argv[0] ..
]---Exiting--\n)
  break
end

end
___
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


Re: [Freeswitch-users] Numeric Value Ranges Expressions in dialplan

2009-08-06 Thread Jason White
Dome Charoenyost d...@tel.co.th wrote:
 Is posible to check numeric range in dialplan (expression).
example i got balance vaiable from somewhere and want to check  0
 or not before call bridge application.
( I don't want to call scripts)

Can you write a regular expression to match it?

^[1-9]\d*$
for example, might be a good start to identify non-zero integers.


___
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


[Freeswitch-users] SVN error

2009-08-06 Thread Saeed Ahmed
Hi,

While doing 'make current' or 'svn up' I am getting following errors:

svn: REPORT request failed on '/svn/!svn/vcc/default'

svn: Can't find a temporary directory: Internal error

 

- Saeed

 

___
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


Re: [Freeswitch-users] How to distinguish between the different type of call rejections from Javascript?

2009-08-06 Thread Raffaele P. Guidi
Done, it (of course, thanks) worked smoothly. I've published the example on
the wiki.
http://wiki.freeswitch.org/wiki/Fakecall_responder (and linked in mod_lua
samples)

Regards,
   Raffaele

On Thu, Aug 6, 2009 at 04:03, Michael Collins m...@freeswitch.org wrote:



 On Wed, Aug 5, 2009 at 6:44 PM, Raffaele P. Guidi 
 raffaele.p.gu...@gmail.com wrote:

 Well, I would randomly insert all of those cases to make it more
 realistic... only thing I cannot manage to issue USER_BUSY from lua (and
 neither from the dialplan, actually).

 anti-action application=respond data=407 / (407 or 486 or
 whatever...)


 doesn't behave as I expected and neither

 action application=hangup data=407 / (407 or 486 or USER_BUSY or
 whatever...)


 and I cannot find a a session:reject(hangupcause) method in lua.

 Can you give me a hint?


 You can execute pretty much any dialplan app with the session:execute
 command:
 http://wiki.freeswitch.org/wiki/Lua#session:execute

 Try something like:
 session:execute(hangup,USER_BUSY);

 -MC

 ___
 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


___
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


[Freeswitch-users] Error while creating object

2009-08-06 Thread lakshmanan ganapathy
Hi all,
Greets.

I am in the process of controlling the freeswitch with perl.
I have read about mod_perl and I wrote some scripts to test which works
fine.
Yesterday I tried to access the digit_set function.
So I create an object for the freeswitch::DTMF.
But it reported the following error.

2009-08-06 15:53:46 [ERR] mod_perl.c:69 Perl_safe_eval() [require
'/usr/local/freeswitch/conf/test.pl';]
No matching function for overloaded 'new_DTMF' at
/usr/local/freeswitch/perl/freeswitch.pm line 197.
Compilation failed in require at (eval 2) line 1.

Here is my code.

#!/usr/bin/perl
use strict;
use freeswitch;
our $session;
$session-execute(bridge,user/1010);
my $sess=freeswitch::DTMF::new;
return 1;

The bridge is working fine. But while creating the object it said error.

Can any one explain why this happens and how can I correct it?
___
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


Re: [Freeswitch-users] A few questions about lua

2009-08-06 Thread Eli Hayun
Hi
I dont know about events so much but I cannot see variable e is
setting

event_name = e:getHeader(Event-Name) or  
event_subclass = e:getHeader(Event-Subclass) or  

regurds
Eli

On Thu, 2009-08-06 at 12:58 +0300, Seven Du wrote:

 ALL-
 
 
 
 I have a few questions when scripting lua. According to wiki, it is
 possible to run looping forever lua scripts through start-up config or
 luarun. 
 
 
 1) Will the lua script stop when unload mod_lua? I experienced core
 dump when unload mod_lua while there was a running lua script.
 Reported on jira.
 
 
 2) How to stop a forever running lua script?  I stop it by listening a
 CUSTOM event fired elsewhere. See code below. Is there any standard
 way like luastop ?
 
 
 3) Any way to show how many running lua scripts? luashow ?
 
 
 4) It seems cannot get the lua script name in a lua script, I made a
 patch to jira by assign it to the argv[0].
 
 
 5) Seems that only EventConsumer(all) working.
 EventConsumer(CHANNEL_HANUP CUSTOM lua::stop) doesn't seem to work.
 Any idea to this?
 
 
 Thanks a lot.
 
 
 
 

 code example:
 
 
 con = freeswitch.EventConsumer(all);  
 
 
 argv[0] = test.lua

 freeswitch.consoleLog(info,  Lua Script [ .. argv[0] .. ]
 Starting =\n);
 
 local all_events = 0
 
  
 for e in (function() return con:pop(1) end) do
   -- freeswitch.consoleLog(info, event\n .. e:serialize(xml));
all_events = all_events + 1;
 freeswitch.consoleLog(info, all_events:  .. all_events .. \n)
 
 event_name = e:getHeader(Event-Name) or 
 event_subclass = e:getHeader(Event-Subclass) or 
 
 if (event_name == CUSTOM and event_subclass == lua::stop) then
  freeswitch.consoleLog(info, -lua Script [ .. argv[0] ..
 ]---Exiting--\n)
  break
 end
 
 
 end 
 
 
___
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


[Freeswitch-users] CURL directory issue

2009-08-06 Thread Jim Page
Afternoon All

I wonder if someone (perhaps even the illustrious intralanman) could help me 
out with a problem I am experiencing with a CURL directory.

In the interests of understanding how the mechanism works, I am using a 
super-braindead php script to return info about a specific set of users. I plan 
to move to something more sophisticated once the proof of concept is complete, 
possibly based on intralanman's scripts.

The basic problem is that all works fine (boot, register, voicemail etc), 
except that user's variables seem not to be being read correctly, eg 
'toll_allow' and 'user_context'. Here's a typical user XML message I am 
returning:

document type=freeswitch/xml
  section name=directory
   domain name=pbx.redmatter.com
params
  param name=dial-string 
value={presence_id=${dialed_us...@${dialed_domain}}${sofia_contact(${dialed_us...@${dialed_domain})}/
/params

variables
  variable name=record_stereo value=true/
  variable name=default_gateway value=$${default_provider}/
  variable name=default_areacode value=$${default_areacode}/
  variable name=transfer_fallback_extension value=operator/
/variables

groups
  group name=default
usersuser id=1009 cidr=172.30.99.0/24
   params
 param name=password value=$${default_password}/
 param name=vm-password value=1009/
 param name=vm-email-all-messages value=true/
 param name=vm-attach-file value=true/
 param name=vm-mailto value=1...@redmatter.com/
 param name=vm-keep-local-after-email value=true/
 param name=vm_message_ext value=mp3/
   /params
   variables
 variable name=toll_allow 
value=domestic,international,local/
 variable name=accountcode value=1009/
 variable name=user_context value=default/
 variable name=effective_caller_id_name value=Extension 
1009/
 variable name=effective_caller_id_number value=1009/
 variable name=outbound_caller_id_name 
value=$${outbound_caller_name}/
 variable name=outbound_caller_id_number 
value=$${outbound_caller_id}/
 variable name=callgroup value=techsupport/
   /variables
 /user/users
  /group
/groups
   /domain
 /section
/document

I return this kind of message in all cases except the 
(sip_auth_method==REGISTER) request message where I return

document type=freeswitch/xml
  section name=directory
domain name=pbx.redmatter.com
  user id=1007
params
  param name=password value=1234/
/params
  /user
/domain
  /section
/document

Also it's probably worth mentioning that I have removed all trace of xml from 
conf/directory and I don't believe there is a conflict happening there. 

The phones register correctly. The trouble is they don't operate on the correct 
dialplan context (I fixed that by hardcoding the internal gateway to dialplan 
default), but the 'toll_allow' variable is now not working so that outbound 
calls fail, which is what made me think that the user variables are being 
ignored.

Freeswitch version is 1.0.4, built by me and running on a dell 1950 running 
Centos 5.3 x86_64. HTTP application is running on standard Centos 5.3 
apache/php.

Any ideas gratefully and humbly received.

All the best
Jim

___
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


Re: [Freeswitch-users] A few questions about lua

2009-08-06 Thread Seven Du
for e in (function() return con:pop(1) end) do

btw, the script works.

Thanks.
On Aug 6, 2009, at 6:47 PM, Eli Hayun wrote:
 Hi
 I dont know about events so much but I cannot see variable e is  
 setting

 event_name = e:getHeader(Event-Name) or 
 event_subclass = e:getHeader(Event-Subclass) or 

 regurds
 Eli

 On Thu, 2009-08-06 at 12:58 +0300, Seven Du wrote:
 ALL-


 I have a few questions when scripting lua. According to wiki, it is  
 possible to run looping forever lua scripts through start-up config  
 or luarun.


 1) Will the lua script stop when unload mod_lua? I experienced core  
 dump when unload mod_lua while there was a running lua script.  
 Reported on jira.


 2) How to stop a forever running lua script?  I stop it by  
 listening a CUSTOM event fired elsewhere. See code below. Is there  
 any standard way like luastop ?


 3) Any way to show how many running lua scripts? luashow ?


 4) It seems cannot get the lua script name in a lua script, I made  
 a patch to jira by assign it to the argv[0].


 5) Seems that only EventConsumer(all) working.  
 EventConsumer(CHANNEL_HANUP CUSTOM lua::stop) doesn't seem to  
 work. Any idea to this?


 Thanks a lot.





 code example:


 con = freeswitch.EventConsumer(all);


 argv[0] = test.lua

 freeswitch.consoleLog(info,  Lua Script [ .. argv[0] .. ]  
 Starting =\n);

 local all_events = 0

 for e in (function() return con:pop(1) end) do
   -- freeswitch.consoleLog(info, event\n .. e:serialize(xml));
all_events = all_events + 1;
 freeswitch.consoleLog(info, all_events:  .. all_events .. \n)

 event_name = e:getHeader(Event-Name) or 
 event_subclass = e:getHeader(Event-Subclass) or 

 if (event_name == CUSTOM and event_subclass == lua::stop) then
  freeswitch.consoleLog(info, -lua Script [ .. argv[0] ..  
 ]---Exiting--\n)
  break
 end


 end


 ___
 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


___
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


[Freeswitch-users] skypiax on Mac OS X

2009-08-06 Thread Ivan C Myrvold
Is skypiax now working on Mac OS X in Freeswitch?

Ivan

___
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


Re: [Freeswitch-users] skypiax on Mac OS X

2009-08-06 Thread Brian West
I'm not sure about that one I haven't tried lately because the API  
differs on the Mac last I looked at it.

/b

On Aug 6, 2009, at 10:53 AM, Ivan C Myrvold wrote:

 Is skypiax now working on Mac OS X in Freeswitch?

 Ivan


___
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


Re: [Freeswitch-users] CURL directory issue

2009-08-06 Thread Kevin Green
Try returning the full information on the register. It may be that the
variables are read onto the user profile upon registration and since you are
only supplying a dumbed down version for registration the variables aren't
being read and cached.

Regards,
   Kevin Green

On Thu, Aug 6, 2009 at 7:24 AM, Jim Page jim.p...@redmatter.com wrote:

 Afternoon All

 I wonder if someone (perhaps even the illustrious intralanman) could help
 me out with a problem I am experiencing with a CURL directory.

 In the interests of understanding how the mechanism works, I am using a
 super-braindead php script to return info about a specific set of users. I
 plan to move to something more sophisticated once the proof of concept is
 complete, possibly based on intralanman's scripts.

 The basic problem is that all works fine (boot, register, voicemail etc),
 except that user's variables seem not to be being read correctly, eg
 'toll_allow' and 'user_context'. Here's a typical user XML message I am
 returning:

 document type=freeswitch/xml
  section name=directory
   domain name=pbx.redmatter.com
params
  param name=dial-string value={presence_id=${dialed_user}@
 ${dialed_domain}}${sofia_contact(${dialed_us...@${dialed_domain})}/
/params

variables
  variable name=record_stereo value=true/
  variable name=default_gateway value=$${default_provider}/
  variable name=default_areacode value=$${default_areacode}/
  variable name=transfer_fallback_extension value=operator/
/variables

groups
  group name=default
usersuser id=1009 cidr=172.30.99.0/24
   params
 param name=password value=$${default_password}/
 param name=vm-password value=1009/
 param name=vm-email-all-messages value=true/
 param name=vm-attach-file value=true/
 param name=vm-mailto value=1...@redmatter.com/
 param name=vm-keep-local-after-email value=true/
 param name=vm_message_ext value=mp3/
   /params
   variables
 variable name=toll_allow
 value=domestic,international,local/
 variable name=accountcode value=1009/
 variable name=user_context value=default/
 variable name=effective_caller_id_name value=Extension
 1009/
 variable name=effective_caller_id_number value=1009/
 variable name=outbound_caller_id_name
 value=$${outbound_caller_name}/
 variable name=outbound_caller_id_number
 value=$${outbound_caller_id}/
 variable name=callgroup value=techsupport/
   /variables
 /user/users
  /group
/groups
   /domain
  /section
 /document

 I return this kind of message in all cases except the
 (sip_auth_method==REGISTER) request message where I return

 document type=freeswitch/xml
  section name=directory
domain name=pbx.redmatter.com
  user id=1007
params
  param name=password value=1234/
/params
  /user
/domain
  /section
 /document

 Also it's probably worth mentioning that I have removed all trace of xml
 from conf/directory and I don't believe there is a conflict happening there.

 The phones register correctly. The trouble is they don't operate on the
 correct dialplan context (I fixed that by hardcoding the internal gateway to
 dialplan default), but the 'toll_allow' variable is now not working so that
 outbound calls fail, which is what made me think that the user variables are
 being ignored.

 Freeswitch version is 1.0.4, built by me and running on a dell 1950 running
 Centos 5.3 x86_64. HTTP application is running on standard Centos 5.3
 apache/php.

 Any ideas gratefully and humbly received.

 All the best
 Jim

 ___
 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

___
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


Re: [Freeswitch-users] Multiple DIDs per SIP trunk (how to configure?)

2009-08-06 Thread Vladimir Rodionov
Pete,

Thank you for script. I can not find find channel variables rdnis,
sip_to_user and all others which start with sb on wiki page

http://wiki.freeswitch.org/wiki/Channel_Variables

Are they undocumented?

-Vladimir Rodionov


On Wed, Aug 5, 2009 at 8:45 PM, Pete Mueller p...@privateconnect.comwrote:

 Disclaimer: I'm not familiar with all the mods of FS, There may be one that
 does this already.  There are probably many ways to do this, I am just
 offering one that works well for me.

 Item #1 - Findout the callee #.   destination_number can be set to
 several different things based on the gateway configuration (forced override
 with an extension) and may or may not start with a + so the example below
 may not work.  To make matters worse, different gateways set fields
 differently when they hand off the call.  The most reliable I've found is
 rdnis or sip_to_user , however if you know you are going to stay with
 one gateway, you can relay on the oddities of the way they are configured.
 I had to write something relatively generic, so I moved all processing to a
 script (see #3 below)

 Item #2 - Find the caller ID. This is located in caller_id_number, but
 remember in your processing that caller ID may be anonymous, restricted,
 unknown or some other word when dealing with blocked/private numbers.  You
 cannot looks for just numbers.

 Item #3 - Routing.  As I mentioned I have 100s of numbers across many
 gateways, so I needed a way to route the calls to the right places AND know
 which gateway the call came in on, so I can bridge the call out the same
 gateway.  I handled this by creating a small DB table (using postgreSQL) and
 connecting using LUA and luasql.  The table has three fields: number,
 gateway, and extension to route to.  In my public.xml I list all the places
 a call can be routed to and the last entry is a unconditional transfer to
 the switchboard script.  The switchboard script matches rdnis and
 sip_to_user to find the callee and then performs a lookup for the
 extension to route to.

 If you would like a copy of my switchboard script I can provide it to you
 in a PM.
 -pete

   Original Message 
 Subject: Re: [Freeswitch-users] Multiple DIDs per SIP trunk (how to
 configure?)
 From: Vladimir Rodionov vladrodio...@gmail.com
 Date: Wed, August 05, 2009 6:57 pm
 To: freeswitch-users@lists.freeswitch.org

 No, it is more like static routing. I need my *script program* be invoked
 when somebody dial in. That is it. One script for all inbound DIDs. Suppose
 I have thousand of them.  I think I know how to accomplish this but I am not
 sure yet.

 in my dialplan I need to define:

 !-- Launch a JavaScript application if dialed in--
extension name=ProviderABC
 condition field=source expression=mod_sofia/
 *condition field=destination_number expression=^1NXXNXX$*

  action application=javascript 
 data=/usr/local/freeswitch/scripts/myapp.js/
 /condition
/extension


 In provider configuration:

 gateway name=voicepulse
!--/// account username *required* ///--
param name=username value=your-username/
!--/// auth realm: *optional* same as gateway name, if blank 
 ///--

param name=realm value=nyc.voicepulse.com/
!--/// account password *required* ///--
param name=password value=your-password/

!--/// extension for inbound calls: *optional* same as username, 
 if blank ///--
 *   * *param name=extension value=1NXXNXX/ *
!--/// proxy host: *optional* same as realm, if blank ///--

param name=proxy value=nyc.voicepulse.com/
!--/// expire in seconds: *optional* 3600, if blank ///--
param name=expire-seconds value=600/

  param name=register value=true/
  /gateway


 Something like this, yes? I can use regular expressions in
 destination_number?

 Q: There is object Session in JavaScript, Lua. Is Session.destination ==
 destination_number from incoming call? It is not clear for me from what I
 have read so far.

 TIA,

 -Vladimir Rodionov

 On Wed, Aug 5, 2009 at 6:26 PM, Seven Du dujinf...@gmail.com wrote:

 mod_easyroute?

 2009/8/6 Vladimir Rodionov vladrodio...@gmail.com

  Hi, everybody

 This is a newbie question: Suppose I have XX (variable dynamic number)
 DIDs assigned to one sip trunk (from VOIP provider ABC ). All calls coming
 from VOIP provider ABC MUST be routed to the same lua/js/whatever script. Is
 it possible in FS? If yes, how everything should be configuered? Dialplan,
 sip gateway? One more question: suppose it is doeable as I hope then how can
 I get in my script CalleeID (not a CallerID)? Basicaly,

 I want to acomplish the following:

 1. Avoid re-configuring FS every time I got new bunch of DIDs
 assigned/released from/to my Voip provider.
 2. Have a way of extracting CalleeID in my script.

 TIA,

 Vladimir Rodionov


 ___
 

Re: [Freeswitch-users] Multiple DIDs per SIP trunk (how to configure?)

2009-08-06 Thread Vladimir Rodionov
Thanks, I will give it it a try and let you know.

On Wed, Aug 5, 2009 at 8:40 PM, Michael Collins m...@freeswitch.org wrote:



 On Wed, Aug 5, 2009 at 8:57 PM, Vladimir Rodionov 
 vladrodio...@gmail.comwrote:

 No, it is more like static routing. I need my *script program* be invoked
 when somebody dial in. That is it. One script for all inbound DIDs. Suppose
 I have thousand of them.  I think I know how to accomplish this but I am not
 sure yet.


 Have the external profile be used only for provider ABC, or define a new
 profile. Then in the profile have the calls go to a specific context. You
 could have something like this in the sip profile definition:

 param name=context value=abc_calls/

 Then create a dialplan context called abc_calls that handles all inbound
 calls. Create a file in conf/dialplan/ called abc_calls.xml:

 include
   context name=abc_calls
 extension name=abc_calls
   condition field=destination_number expression=^(.*)$
 action application=lua data=myscript.lua/
   /condition
 /extension
   /context
 /include

 Essentially you're just creating a SIP profile and a dialplan context that
 are servicing your VoIP provider. You can add other profiles/contexts for
 other providers if need be.

 Let us know how it goes...
 -MC


 ___
 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


___
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


Re: [Freeswitch-users] skypiax on Mac OS X

2009-08-06 Thread Giovanni Maruzzelli
No, it needs implementation of the message pump between the module and
the Skype API.

It's probably kind of trivial, if no other problems I'm not aware of.

I do not have a Mac to implement it, tough :-(.

-giovanni





Sincerely,

Giovanni Maruzzelli
=
www.celliax.org
via Pierlombardo 9, 20135 Milano
Italy
gmaruzz at celliax dot org
Cell : +39-347-2665618
Fax : +39-02-87390039




On Thu, Aug 6, 2009 at 5:55 PM, Brian Westbr...@freeswitch.org wrote:
 I'm not sure about that one I haven't tried lately because the API
 differs on the Mac last I looked at it.

 /b

 On Aug 6, 2009, at 10:53 AM, Ivan C Myrvold wrote:

 Is skypiax now working on Mac OS X in Freeswitch?

 Ivan


 ___
 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


___
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


[Freeswitch-users] Which event contains ORIGINATOR_CANCEL?

2009-08-06 Thread Nicolas Brenner
I'm bridging 2 calls in a javascript file, I originate the first call and
then execute a bridge with an origination string for the second call. If I
hangup the first call while trying to make the second call, I get this on
the console:

2009-08-05 16:44:05.69122 [NOTICE] switch_ivr_originate.c:1994 Hangup
sofia/external/005622170039 [CS_CONSUME_MEDIA] [ORIGINATOR_CANCEL]
2009-08-05 16:44:05.69122 [DEBUG] switch_channel.c:1683 Send signal
sofia/external/005622170039 [KILL]
2009-08-05 16:44:05.69122 [DEBUG] switch_core_session.c:932 Send signal
sofia/external/005622170039 [BREAK]
2009-08-05 16:44:05.69122 [DEBUG] switch_ivr_originate.c:2134 Originate
Cancelled by originator termination Cause: 487 [ORIGINATOR_CANCEL]
2009-08-05 16:44:05.69122 [INFO] mod_dptools.c:2092 Originate Failed.
Cause: ORIGINATOR_CANCEL

But if I check hangup_cause in the CHANNEL_HANGUP_COMPLETE event, I see
NORMAL_CLEARING. And the variable_originate_disposition has a value of
failure. Where can I get the detail of the call/bridge failure due to
'ORIGINATOR_CANCEL' as reported through the console?

Thanks!

Nicolas
___
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


Re: [Freeswitch-users] How to distinguish between the different type of call rejections from Javascript?

2009-08-06 Thread Michael Collins
On Thu, Aug 6, 2009 at 7:49 AM, Raffaele P. Guidi 
raffaele.p.gu...@gmail.com wrote:

 Done, it (of course, thanks) worked smoothly. I've published the example on
 the wiki.
 http://wiki.freeswitch.org/wiki/Fakecall_responder (and linked in mod_lua
 samples)

 Regards,
Raffaele


Thanks for paying the wiki tax! We appreciate it when folks document their
knowledge. Please let me know if you have any wiki questions in the future.
-MC
___
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


[Freeswitch-users] FreeSwitch doesn't play music on hold forbriged channel

2009-08-06 Thread Kozak Vladimir

The scenario is the following:
FS User A dial an extension
Extention opens outbound socket channel to my application
My application bridges the call to FS User B
The application check for CHANNEL_BRIDGED event and stores Other-leg-unique-id
The application sends hold to the bridged channel using SendMsg with 
Other-leg-unique-id
User B is placed on hold but no music on hold is played to the caller (User A)


I have outbound socket channel and the following sequence of commands/event:
listening on [any] 8084 ...
connect to [172.26.200.251] from centos4-4-vm.abisoft.spb.ru [172.26.200.250] 
34000
connect

myevents

SendMsg
call-command: execute
execute-app-name: bridge
execute-app-arg:user/1...@uat.agent.starpoundtech.net

Channel-Username: 1001
Channel-Dialplan: XML
Channel-Caller-ID-Name: 1001
Channel-Caller-ID-Number: 1001
Channel-Network-Addr: 172.26.10.39
Channel-Destination-Number: 
Channel-Unique-ID: 15826d29-b807-4955-a2f9-038e0b3ee6e2
Channel-Source: mod_sofia
Channel-Context: default
Channel-Channel-Name: sofia/internal/1001%40172.26.200.250
Channel-Profile-Index: 1
Channel-Profile-Created-Time: 1249142681680114
Channel-Channel-Created-Time: 1249142681680114
Channel-Channel-Answered-Time: 0
Channel-Channel-Progress-Time: 0
Channel-Channel-Progress-Media-Time: 1249142681809352
Channel-Channel-Hangup-Time: 0
Channel-Channel-Transfer-Time: 0
Channel-Screen-Bit: true
Channel-Privacy-Hide-Name: false
Channel-Privacy-Hide-Number: false
Channel-State: CS_EXECUTE
Channel-State-Number: 4
Channel-Name: sofia/internal/1001%40172.26.200.250
Unique-ID: 15826d29-b807-4955-a2f9-038e0b3ee6e2
Call-Direction: inbound
Answer-State: early
Channel-Read-Codec-Name: PCMU
Channel-Read-Codec-Rate: 8000
Channel-Write-Codec-Name: PCMU
Channel-Write-Codec-Rate: 8000
Caller-Username: 1001
Caller-Dialplan: XML
Caller-Caller-ID-Name: 1001
Caller-Caller-ID-Number: 1001
Caller-Network-Addr: 172.26.10.39
Caller-Destination-Number: 
Caller-Unique-ID: 15826d29-b807-4955-a2f9-038e0b3ee6e2
Caller-Source: mod_sofia
Caller-Context: default
Caller-Channel-Name: sofia/internal/1001%40172.26.200.250
Caller-Profile-Index: 1
Caller-Profile-Created-Time: 1249142681680114
Caller-Channel-Created-Time: 1249142681680114
Caller-Channel-Answered-Time: 0
Caller-Channel-Progress-Time: 0
Caller-Channel-Progress-Media-Time: 1249142681809352
Caller-Channel-Hangup-Time: 0
Caller-Channel-Transfer-Time: 0
Caller-Screen-Bit: true
Caller-Privacy-Hide-Name: false
Caller-Privacy-Hide-Number: false
variable_sip_received_ip: 172.26.10.39
variable_sip_received_port: 13488
variable_sip_via_protocol: udp
variable_sip_authorized: true
variable_sip_mailbox: 1001
variable_sip_auth_username: 1001
variable_sip_auth_realm: 172.26.200.250
variable_mailbox: 1001
variable_toll_allow: domestic,international,local
variable_accountcode: 1001
variable_user_context: default
variable_effective_caller_id_name: Extension%201001
variable_effective_caller_id_number: 1001
variable_outbound_caller_id_name: StarPound%20FreeSWITCH
variable_outbound_caller_id_number: 00
variable_callgroup: techsupport
variable_sip_from_user: 1001
variable_sip_from_uri: 1001%40172.26.200.250
variable_sip_from_host: 172.26.200.250
variable_sip_from_user_stripped: 1001
variable_sip_from_tag: bd11f93c
variable_sofia_profile_name: internal
variable_sip_req_user: 
variable_sip_req_uri: %40172.26.200.250
variable_sip_req_host: 172.26.200.250
variable_sip_to_user: 
variable_sip_to_uri: %40172.26.200.250
variable_sip_to_host: 172.26.200.250
variable_sip_contact_user: 1001
variable_sip_contact_port: 13488
variable_sip_contact_uri: 1001%40172.26.10.39%3A13488
variable_sip_contact_host: 172.26.10.39
variable_channel_name: sofia/internal/1001%40172.26.200.250
variable_sip_call_id: ZTYwOGM2NDNmMzA5ZjFmOWRhZGJiNTZkMDEyMjQ4YTc.
variable_sip_user_agent: X-Lite%20release%201103d%20stamp%2053117
variable_sip_via_host: 172.26.10.39
variable_sip_via_port: 13488
variable_sip_via_rport: 13488
variable_max_forwards: 70
variable_presence_id: 1001%40172.26.200.250
variable_switch_r_sdp: 
v%3D0%0D%0Ao%3D-%208%202%20IN%20IP4%20172.26.10.39%0D%0As%3DCounterPath%20X-Lite%203.0%0D%0Ac%3DIN%20IP4%20172.26.10.39%0D%0At%3D0%200%0D%0Am%3Daudio%2029826%20RTP/AVP%200%208%203%20101%0D%0Aa%3Drtpmap%3A101%20telephone-event/8000%0D%0Aa%3Dfmtp%3A101%200-15%0D%0A
variable_remote_media_ip: 172.26.10.39
variable_remote_media_port: 29826
variable_read_codec: PCMU
variable_read_rate: 8000
variable_write_codec: PCMU
variable_write_rate: 8000
variable_use_profile: nat
variable_record_stereo: true
variable_transfer_fallback_extension: operator
variable_numbering_plan: US
variable_default_areacode: 918
variable_default_gateway: example.com
variable_user_name: default
variable_domain_name: 172.26.200.250
variable_current_application_data: 172.26.200.251%3A8084%20async%20full
variable_current_application: socket
variable_socket_host: 172.26.200.251
variable_local_media_ip: 172.26.200.250
variable_local_media_port: 29370

[Freeswitch-users] FreeSWITCH 1.0.4 Release Announcement

2009-08-06 Thread Michael Collins
We are happy to announce the official release of FreeSWITCH 1.0.4! Please
visit this link http://digg.com/d3zt5X to Digg and read the story, and
then spread the word!

Thanks for being such a great community!
-Michael
___
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


Re: [Freeswitch-users] Which event contains ORIGINATOR_CANCEL?

2009-08-06 Thread Matthew Fong
Hi Nicolas,
do you have a copy of the .js code you can paste. I would guess tho, that
ORIGINATOR_CANCLE might be related to not setting hangup_after_bridge to
false. Just a guess tho.

Hangup causes can be found here:
http://wiki.freeswitch.org/wiki/Hangup_causes

http://wiki.freeswitch.org/wiki/Hangup_causes--matt
hello hunter - hosted predictive dialer  voice broadcasting
http://www.hellohunter.com


On Thu, Aug 6, 2009 at 9:38 AM, Nicolas Brenner nico...@medularis.comwrote:

 I'm bridging 2 calls in a javascript file, I originate the first call and
 then execute a bridge with an origination string for the second call. If I
 hangup the first call while trying to make the second call, I get this on
 the console:

 2009-08-05 16:44:05.69122 [NOTICE] switch_ivr_originate.c:1994 Hangup
 sofia/external/005622170039 [CS_CONSUME_MEDIA] [ORIGINATOR_CANCEL]
 2009-08-05 16:44:05.69122 [DEBUG] switch_channel.c:1683 Send signal
 sofia/external/005622170039 [KILL]
 2009-08-05 16:44:05.69122 [DEBUG] switch_core_session.c:932 Send signal
 sofia/external/005622170039 [BREAK]
 2009-08-05 16:44:05.69122 [DEBUG] switch_ivr_originate.c:2134 Originate
 Cancelled by originator termination Cause: 487 [ORIGINATOR_CANCEL]
 2009-08-05 16:44:05.69122 [INFO] mod_dptools.c:2092 Originate Failed.
 Cause: ORIGINATOR_CANCEL

 But if I check hangup_cause in the CHANNEL_HANGUP_COMPLETE event, I see
 NORMAL_CLEARING. And the variable_originate_disposition has a value of
 failure. Where can I get the detail of the call/bridge failure due to
 'ORIGINATOR_CANCEL' as reported through the console?

 Thanks!

 Nicolas



 ___
 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


___
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


Re: [Freeswitch-users] Which event contains ORIGINATOR_CANCEL?

2009-08-06 Thread Nicolas Brenner
Hi Matt,

Actually I'm explicitly setting hangup_after_bridge to true, think setting
it to false would help? I'm going to try that.

Here's the JS code:
(Note: session.getVariable() doesn't work, FS complains saying it is not a
function, also tried self.session.getVariable() - that's what the wiki says
- and FS complains that self does not exist)


var uuid = argv[0]; // Call identifier
var dialstr1 = argv[1]; // Dial string obtained from previous call to LCR
var dialstr2 = argv[2]; // Dial string obtained from previous call to LCR
var greeting_snd = /var/audio/alert.wav;

console_log(notice, *** STARTING C2C Call ***\n);
timeout = 30;

console_log(notice, *** DIALING +dialstr1+ ***\n);

//var stUsRing = session.getVariable(us-ring);  // This doesn't work,
self.session.getVariable doesn't work either
var stUsRing = %(2000,4000,440,480);

// Create new_session
new_session = new Session(originate_str1);
console_log(notice, *** Leg1:  + new_session.cause + 
***\n);

if (new_session.ready()) {
// log to the console
console_log(notice, *** Leg1 (+dialstr1+) CONNECTED!
***\n);
console_log(notice, *** Playing greeting sound:
+greeting_snd+ ***\n);

new_session.execute(sleep, 100);
new_session.execute(playback, greeting_snd);

// Originate second call and bridge
originate_str2 =
{ignore_early_media=true,originate_timeout=+timeout+,hangup_after_bridge=true,medularis_uuid=+uuid+,c2c_call=true,leg=2}+dialstr2;

// Create new_session
new_session.execute(bridge, originate_str2);
console_log(notice, *** Leg2:  + new_session.cause + 
***\n);

if (new_session.ready()) {
console_log(notice, *** Leg2 (+dialstr2+)
CONNECTED! ***\n);
}
}

exit();


Thanks!


Nicolas


On Thu, Aug 6, 2009 at 2:25 PM, Matthew Fong mattdf...@gmail.com wrote:

 Hi Nicolas,
 do you have a copy of the .js code you can paste. I would guess tho, that
 ORIGINATOR_CANCLE might be related to not setting hangup_after_bridge to
 false. Just a guess tho.

 Hangup causes can be found here:
 http://wiki.freeswitch.org/wiki/Hangup_causes

 http://wiki.freeswitch.org/wiki/Hangup_causes --matt
 hello hunter - hosted predictive dialer  voice broadcasting
 http://www.hellohunter.com


 On Thu, Aug 6, 2009 at 9:38 AM, Nicolas Brenner nico...@medularis.comwrote:

 I'm bridging 2 calls in a javascript file, I originate the first call and
 then execute a bridge with an origination string for the second call. If I
 hangup the first call while trying to make the second call, I get this on
 the console:

 2009-08-05 16:44:05.69122 [NOTICE] switch_ivr_originate.c:1994 Hangup
 sofia/external/005622170039 [CS_CONSUME_MEDIA] [ORIGINATOR_CANCEL]
 2009-08-05 16:44:05.69122 [DEBUG] switch_channel.c:1683 Send signal
 sofia/external/005622170039 [KILL]
 2009-08-05 16:44:05.69122 [DEBUG] switch_core_session.c:932 Send signal
 sofia/external/005622170039 [BREAK]
 2009-08-05 16:44:05.69122 [DEBUG] switch_ivr_originate.c:2134 Originate
 Cancelled by originator termination Cause: 487 [ORIGINATOR_CANCEL]
 2009-08-05 16:44:05.69122 [INFO] mod_dptools.c:2092 Originate Failed.
 Cause: ORIGINATOR_CANCEL

 But if I check hangup_cause in the CHANNEL_HANGUP_COMPLETE event, I see
 NORMAL_CLEARING. And the variable_originate_disposition has a value of
 failure. Where can I get the detail of the call/bridge failure due to
 'ORIGINATOR_CANCEL' as reported through the console?

 Thanks!

 Nicolas



 ___
 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



 ___
 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


___
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


Re: [Freeswitch-users] CURL directory issue

2009-08-06 Thread Jim Page
Spot on. Many thanks!
Jim

Sent from my iPhone

On 6 Aug 2009, at 18:02, Kevin Green 
ke...@johnnyvoip.commailto:ke...@johnnyvoip.com wrote:

Try returning the full information on the register. It may be that the 
variables are read onto the user profile upon registration and since you are 
only supplying a dumbed down version for registration the variables aren't 
being read and cached.

Regards,
   Kevin Green

On Thu, Aug 6, 2009 at 7:24 AM, Jim Page 
mailto:jim.p...@redmatter.comjim.p...@redmatter.commailto:jim.p...@redmatter.com
 wrote:
Afternoon All

I wonder if someone (perhaps even the illustrious intralanman) could help me 
out with a problem I am experiencing with a CURL directory.

In the interests of understanding how the mechanism works, I am using a 
super-braindead php script to return info about a specific set of users. I plan 
to move to something more sophisticated once the proof of concept is complete, 
possibly based on intralanman's scripts.

The basic problem is that all works fine (boot, register, voicemail etc), 
except that user's variables seem not to be being read correctly, eg 
'toll_allow' and 'user_context'. Here's a typical user XML message I am 
returning:

document type=freeswitch/xml
 section name=directory
  domain 
name=http://pbx.redmatter.compbx.redmatter.comhttp://pbx.redmatter.com
   params
 param name=dial-string 
value={presence_id=${dialed_us...@${dialed_domain}}${sofia_contact(${dialed_us...@${dialed_domain})}/
   /params

   variables
 variable name=record_stereo value=true/
 variable name=default_gateway value=$${default_provider}/
 variable name=default_areacode value=$${default_areacode}/
 variable name=transfer_fallback_extension value=operator/
   /variables

   groups
 group name=default
   usersuser id=1009 
cidr=172.30.99.0/24http://172.30.99.0/24
  params
param name=password value=$${default_password}/
param name=vm-password value=1009/
param name=vm-email-all-messages value=true/
param name=vm-attach-file value=true/
param name=vm-mailto 
value=mailto:1...@redmatter.com1...@redmatter.commailto:1...@redmatter.com/
param name=vm-keep-local-after-email value=true/
param name=vm_message_ext value=mp3/
  /params
  variables
variable name=toll_allow 
value=domestic,international,local/
variable name=accountcode value=1009/
variable name=user_context value=default/
variable name=effective_caller_id_name value=Extension 
1009/
variable name=effective_caller_id_number value=1009/
variable name=outbound_caller_id_name 
value=$${outbound_caller_name}/
variable name=outbound_caller_id_number 
value=$${outbound_caller_id}/
variable name=callgroup value=techsupport/
  /variables
/user/users
 /group
   /groups
  /domain
 /section
/document

I return this kind of message in all cases except the 
(sip_auth_method==REGISTER) request message where I return

document type=freeswitch/xml
 section name=directory
   domain 
name=http://pbx.redmatter.compbx.redmatter.comhttp://pbx.redmatter.com
 user id=1007
   params
 param name=password value=1234/
   /params
 /user
   /domain
 /section
/document

Also it's probably worth mentioning that I have removed all trace of xml from 
conf/directory and I don't believe there is a conflict happening there.

The phones register correctly. The trouble is they don't operate on the correct 
dialplan context (I fixed that by hardcoding the internal gateway to dialplan 
default), but the 'toll_allow' variable is now not working so that outbound 
calls fail, which is what made me think that the user variables are being 
ignored.

Freeswitch version is 1.0.4, built by me and running on a dell 1950 running 
Centos 5.3 x86_64. HTTP application is running on standard Centos 5.3 
apache/php.

Any ideas gratefully and humbly received.

All the best
Jim

___
FreeSWITCH-users mailing list
mailto:FreeSWITCH-users@lists.freeswitch.orgFreeSWITCH-users@lists.freeswitch.orgmailto:FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-usershttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.orghttp://www.freeswitch.org

___
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.orgmailto: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

[Freeswitch-users] Lua Script Return Value mod_xmlrpc

2009-08-06 Thread Nick Lemberger
Is it possible to have a LUA script return something to the client when 
accessed via the XML RPC gateway  luarun?

ie: access the url: http://FSip:8080/api/luarun?myscript.lua and have the 
script return a value?

-Nick


___
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


Re: [Freeswitch-users] Lua Script Return Value mod_xmlrpc

2009-08-06 Thread Pete Mueller
Yes, you can use the stream global object. example: local api = freeswitch.API(); local reply = api:execute("originate", someRoute); if (reply) then stream:write("RESULT: " .. reply .. "\n"); else stream:write("ERROR") end


 Original Message 
Subject: [Freeswitch-users] Lua Script Return Value  mod_xmlrpc
From: "Nick Lemberger" nick.lember...@lkfd.net
Date: Thu, August 06, 2009 4:19 pm
To: freeswitch-users@lists.freeswitch.org

Is it possible to have a LUA script return something to the client when accessed via the XML RPC gateway  luarun?

ie: access the url: http://FSip:8080/api/luarun?myscript.lua and have the script return a value?

-Nick


___
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




___
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


Re: [Freeswitch-users] A few questions about lua

2009-08-06 Thread Raffaele P. Guidi
 5) Seems that only EventConsumer(all) working.
EventConsumer(CHANNEL_HANUP CUSTOM lua::stop) doesn't seem to work. Any
idea to this?

isn't it CHANNEL_HAN*G*UP? Is the G missing only in the email or in the
code, too?

On Thu, Aug 6, 2009 at 17:52, Seven Du dujinf...@gmail.com wrote:

 for e in (function() return con:pop(1) end) do

 btw, the script works.

 Thanks.
 On Aug 6, 2009, at 6:47 PM, Eli Hayun wrote:
  Hi
  I dont know about events so much but I cannot see variable e is
  setting
 
  event_name = e:getHeader(Event-Name) or 
  event_subclass = e:getHeader(Event-Subclass) or 
 
  regurds
  Eli
 
  On Thu, 2009-08-06 at 12:58 +0300, Seven Du wrote:
  ALL-
 
 
  I have a few questions when scripting lua. According to wiki, it is
  possible to run looping forever lua scripts through start-up config
  or luarun.
 
 
  1) Will the lua script stop when unload mod_lua? I experienced core
  dump when unload mod_lua while there was a running lua script.
  Reported on jira.
 
 
  2) How to stop a forever running lua script?  I stop it by
  listening a CUSTOM event fired elsewhere. See code below. Is there
  any standard way like luastop ?
 
 
  3) Any way to show how many running lua scripts? luashow ?
 
 
  4) It seems cannot get the lua script name in a lua script, I made
  a patch to jira by assign it to the argv[0].
 
 
  5) Seems that only EventConsumer(all) working.
  EventConsumer(CHANNEL_HANUP CUSTOM lua::stop) doesn't seem to
  work. Any idea to this?
 
 
  Thanks a lot.
 
 
 
 
 
  code example:
 
 
  con = freeswitch.EventConsumer(all);
 
 
  argv[0] = test.lua
 
  freeswitch.consoleLog(info,  Lua Script [ .. argv[0] .. ]
  Starting =\n);
 
  local all_events = 0
 
  for e in (function() return con:pop(1) end) do
-- freeswitch.consoleLog(info, event\n .. e:serialize(xml));
 all_events = all_events + 1;
  freeswitch.consoleLog(info, all_events:  .. all_events .. \n)
 
  event_name = e:getHeader(Event-Name) or 
  event_subclass = e:getHeader(Event-Subclass) or 
 
  if (event_name == CUSTOM and event_subclass == lua::stop) then
   freeswitch.consoleLog(info, -lua Script [ .. argv[0] ..
  ]---Exiting--\n)
   break
  end
 
 
  end
 
 
  ___
  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


 ___
 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

___
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


[Freeswitch-users] Lua on Windows and additional modules

2009-08-06 Thread Vladimir Rodionov
Good evening,
This is newbie question.

The FreeSWITCH lua module does not support sockets and sql out of box that
is why
I just installed LuaBinaries (including socket, sql modules). My dev
environment is Win XP not Linux/Unix.

I am trying to understand what will happen when lua_module get this:

require socket or
require luasql.mysql
?

How does lua_module look up additional lua modules on Windows platform?

Do I have to set some env variables?

TIA
-Vladimir Rodionov
___
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


Re: [Freeswitch-users] A few questions about lua

2009-08-06 Thread Seven Du
Sorry it's a typo. I read the code, it works not like in event socket. So,
only works with one event.
either
EventConsumer(all)
or
EventConsumer(CUSTOM, lua::stop);


Thank you.

2009/8/7 Raffaele P. Guidi raffaele.p.gu...@gmail.com

  5) Seems that only EventConsumer(all) working.
 EventConsumer(CHANNEL_HANUP CUSTOM lua::stop) doesn't seem to work. Any
 idea to this?

 isn't it CHANNEL_HAN*G*UP? Is the G missing only in the email or in the
 code, too?

 On Thu, Aug 6, 2009 at 17:52, Seven Du dujinf...@gmail.com wrote:

 for e in (function() return con:pop(1) end) do

 btw, the script works.

 Thanks.
 On Aug 6, 2009, at 6:47 PM, Eli Hayun wrote:
  Hi
  I dont know about events so much but I cannot see variable e is
  setting
 
  event_name = e:getHeader(Event-Name) or 
  event_subclass = e:getHeader(Event-Subclass) or 
 
  regurds
  Eli
 
  On Thu, 2009-08-06 at 12:58 +0300, Seven Du wrote:
  ALL-
 
 
  I have a few questions when scripting lua. According to wiki, it is
  possible to run looping forever lua scripts through start-up config
  or luarun.
 
 
  1) Will the lua script stop when unload mod_lua? I experienced core
  dump when unload mod_lua while there was a running lua script.
  Reported on jira.
 
 
  2) How to stop a forever running lua script?  I stop it by
  listening a CUSTOM event fired elsewhere. See code below. Is there
  any standard way like luastop ?
 
 
  3) Any way to show how many running lua scripts? luashow ?
 
 
  4) It seems cannot get the lua script name in a lua script, I made
  a patch to jira by assign it to the argv[0].
 
 
  5) Seems that only EventConsumer(all) working.
  EventConsumer(CHANNEL_HANUP CUSTOM lua::stop) doesn't seem to
  work. Any idea to this?
 
 
  Thanks a lot.
 
 
 
 
 
  code example:
 
 
  con = freeswitch.EventConsumer(all);
 
 
  argv[0] = test.lua
 
  freeswitch.consoleLog(info,  Lua Script [ .. argv[0] .. ]
  Starting =\n);
 
  local all_events = 0
 
  for e in (function() return con:pop(1) end) do
-- freeswitch.consoleLog(info, event\n .. e:serialize(xml));
 all_events = all_events + 1;
  freeswitch.consoleLog(info, all_events:  .. all_events .. \n)
 
  event_name = e:getHeader(Event-Name) or 
  event_subclass = e:getHeader(Event-Subclass) or 
 
  if (event_name == CUSTOM and event_subclass == lua::stop) then
   freeswitch.consoleLog(info, -lua Script [ .. argv[0] ..
  ]---Exiting--\n)
   break
  end
 
 
  end
 
 
  ___
  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


 ___
 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



 ___
 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


___
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


Re: [Freeswitch-users] FreeSWITCH 1.0.4 Release Announcement

2009-08-06 Thread Dome Charoenyost
Good News..

2009/8/7 Michael Collins m...@freeswitch.org:
 We are happy to announce the official release of FreeSWITCH 1.0.4! Please
 visit this link to Digg and read the story, and then spread the word!

 Thanks for being such a great community!
 -Michael

 ___
 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



___
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


Re: [Freeswitch-users] Lua on Windows and additional modules

2009-08-06 Thread Pete Mueller
I believe you need to set LUA_PATH, here's more information:http://www.lua.org/pil/8.1.html-pete


 Original Message 
Subject: [Freeswitch-users] Lua on Windows and additional modules
From: Vladimir Rodionov vladrodio...@gmail.com
Date: Thu, August 06, 2009 5:55 pm
To: freeswitch-users@lists.freeswitch.org

Good evening,This is newbie question. The FreeSWITCH lua module does not support sockets and sql out of box that is whyI just installed LuaBinaries (including socket, sql modules). My dev environment is Win XP not Linux/Unix. I am trying to understand what will happen when lua_module get this:require "socket" or require "luasql.mysql"? How does lua_module look up additional lua modules on Windows platform? Do I have to set some env variables? TIA-Vladimir Rodionov ___
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




___
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


Re: [Freeswitch-users] Fwd: execute function in ESL.pm module is not working

2009-08-06 Thread velusamy velu
Dear Expert,
   Thanks for you reply

My Perl Script is,
use strict;
use warnings;

#---
# Event socket library.
# Socket programming
# printing the data structures
# Using posix parametered functions.
#---
use lib('/root/freeswitch-1.0.3/libs/esl/perl/');
require ESL;
use IO::Socket::INET;
use Data::Dumper qw(Dumper);
use POSIX;
use Config::IniFiles;


# Global variables to store the socket connection and eneterd DTM digits.
my ($conn,$digit);
$digit='';

#Registering the ALARM signal.
$SIG{ALRM}=\sub_alr;

# When alarm signal occurs call the play_digit function
sub sub_alr {
print IN Sigalarm---\n;
play_digit;
return ;
}   # --  end of subroutine sub_alr  --



# Play the voice files for menu.
sub play(){
$conn-execute(playback,ivr/ivr-please.wav);
$conn-execute(playback,ivr/ivr-enter_ext.wav);
}


sub play_digit {
print In Play Digit\n;
my  ( $par1 )   = $digit; #$digit is global variable

print Eneterd Digits=,$digit,\n;

# Here what is my problem the execute function is not working  #

$conn-execute(phrase, spell,$par1);
return ;
}   # --  end of subroutine play_digit  --


#---
# IP address and port of the server.
# Sound path file.
#---
my $ip = 192.168.1.222; my $port = '5057';
my $sound_path = /usr/local/freeswitch/sounds/en/us/callie/;


# Creating a socket
my $sock = new IO::Socket::INET (
LocalHost = $ip,
LocalPort = $port,
Proto = 'tcp',
Listen= 1,
Reuse = 1
);
# Checking the error.
die Cannot create a socket:$!\n unless $sock;


for(;;){

my $new_socket = $sock-accept();
print Current Process Id:.POSIX::getpid().\n;
my $pid = fork();

if($pid){
close($new_socket);
next;
}

print Child Process Id:.POSIX::getpid().\n;

my $fd = fileno($new_socket);
print File Number:$fd\n;

# Create a conenction with Event socket library.
$conn = new ESL::ESLconnection($fd);

# Getting the connection informations and values of the variables.
my $info = $conn-getInfo();

# Getting the caller id and print the statement.
my $caller_id =$info-getHeader(caller-caller-id-number);
printf  Connected from %s\n, $caller_id;

# Receive the events from only in this switch.
$conn-sendRecv(myevents);

# Answer the call.
$conn-execute(answer);

# playback the welcome message.
$conn-setEventLock(true);

$conn-execute(playback,$sound_path.ivr/ivr-welcome_to_freeswitch.wav);
$conn-execute(sleep, 1000);

play;


alarm(10);
while($conn-connected()){

# Receive the event
my $event = $conn-recvEvent();

# Check the event is received
if($event){
# Get the event name  and print it.
my $name = $event-getHeader(event-name);
print EVENT:[$name]\n;

# If the event name is DTMF then print the  enterted
digit.
if($name eq 'DTMF'){
my $digi = $event-getHeader(dtmf-digit);
# Here concatenate the eneterd digits
$digit.=$digi;
}
}
}
# Kill the child process.
print Disconnected:$caller_id\n; kill 9,POSIX::getpid();
}


My dial plan is,
!-- Testing IVR --
extension name=Test
  condition field=destination_number expression=^(200)$
action application=socket data=192.168.1.222:5057 async
full/
  /condition
/extension

The output of the Script is,

Current Process Id:2906
Child Process Id:2908
File Number:4
Connected from 1000
EVENT:[CHANNEL_EXECUTE]
EVENT:[CHANNEL_ANSWER]
EVENT:[CHANNEL_EXECUTE_COMPLETE]
EVENT:[CHANNEL_EXECUTE]
EVENT:[CHANNEL_EXECUTE_COMPLETE]
EVENT:[CHANNEL_EXECUTE]
EVENT:[CHANNEL_EXECUTE_COMPLETE]
EVENT:[CHANNEL_EXECUTE]
EVENT:[CHANNEL_EXECUTE_COMPLETE]
EVENT:[CHANNEL_EXECUTE]
EVENT:[CHANNEL_EXECUTE_COMPLETE]
EVENT:[DTMF]
EVENT:[DTMF]
EVENT:[DTMF]
EVENT:[DTMF]
IN Sigalarm---
In Play Digit
Eneterd Digits=7485
Disconnected:1000

When alarm signal generated, it prints digits but it won't execute the
execute function..

Please  any one give suggestions where I made wrong...

Thanks...

Regards,
Velusamy.