Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

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


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
dujinfang at gmail.com
Guest





PostPosted: Wed Aug 05, 2009 9:07 am    Post subject: [Freeswitch-users] How to distinguish between the different Reply with quote

variable_originate_disposition

On Aug 5, 2009, at 9:56 PM, Max Bridgewater wrote:
Quote:
Hi,

Say i originate a call to a mobile phone and the call fails. There
are many possible reasons: congestion, user busy, call rejected by
user, etc. Is there a way i can get the failure code from Javascript?
Thanks,
Max.
_______________________________________________
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
Back to top
max.bridgewater at gma...
Guest





PostPosted: Wed Aug 05, 2009 9:14 am    Post subject: [Freeswitch-users] How to distinguish between the different Reply with quote

Hi,

Say i originate a call to a mobile phone and the call fails. There are many possible reasons: congestion, user busy, call rejected by user, etc. Is there a way i can get the failure code from Javascript?
Thanks,
Max.
Back to top
raffaele.p.guidi at gm...
Guest





PostPosted: Wed Aug 05, 2009 4:04 pm    Post subject: [Freeswitch-users] How to distinguish between the different Reply with quote

interesting! what values can contain "variable_originate_disposition"? And can I set them manually in a script to reject a call simulating user busy or call rejected? A lua example?

Thanks,
   Raffaele

On Wed, Aug 5, 2009 at 16:02, Seven Du <dujinfang@gmail.com (dujinfang@gmail.com)> wrote:
Quote:
variable_originate_disposition


On Aug 5, 2009, at 9:56 PM, Max Bridgewater wrote:
Quote:
Hi,

Say i originate a call to a mobile phone and the call fails. There
are many possible reasons: congestion, user busy, call rejected by
user, etc. Is there a way i can get the failure code from Javascript?
Thanks,
Max.


Quote:
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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 (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
Back to top
msc at freeswitch.org
Guest





PostPosted: Wed Aug 05, 2009 5:22 pm    Post subject: [Freeswitch-users] How to distinguish between the different Reply with quote

On Wed, Aug 5, 2009 at 3:54 PM, Raffaele P. Guidi <raffaele.p.guidi@gmail.com (raffaele.p.guidi@gmail.com)> wrote:
Quote:
interesting! what values can contain "variable_originate_disposition"? And can I set them manually in a script to reject a call simulating user busy or call rejected? A lua example?

Thanks,
   Raffaele

Start here:
http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_hangup

And note the link to the hangup causes. As far as Lua, I'm not sure there's a good reason to do it there. Could you give us pseudo code example of what you're thinking of doing?
-MC
Back to top
raffaele.p.guidi at gm...
Guest





PostPosted: Wed Aug 05, 2009 6:37 pm    Post subject: [Freeswitch-users] How to distinguish between the different Reply with quote

Actually I was reading that page, right now. I wrote a small lua script that simulates a call with random wait time before answering, randomly not answering at all and saying things for a random times once answered. This would be useful for testing purposes simulating load, letting call center operators try scripts against "fake" numbers with a "realistic" behaviour and eventually to test and debug an automated dialer.

The script is almost ready (can contribute it should you find it useful), I used it today to simulate load on my windows laptop with 50 concurrent calls and peaks of 20/30 simultaneous calls connected (cpu was below 3%). I only miss some use cases such as some CALL_REJECTED, USER_BUSY, NO_ANSWER


On Thu, Aug 6, 2009 at 00:16, Michael Collins <msc@freeswitch.org (msc@freeswitch.org)> wrote:
Quote:


On Wed, Aug 5, 2009 at 3:54 PM, Raffaele P. Guidi <raffaele.p.guidi@gmail.com (raffaele.p.guidi@gmail.com)> wrote:
Quote:
interesting! what values can contain "variable_originate_disposition"? And can I set them manually in a script to reject a call simulating user busy or call rejected? A lua example?

Thanks,
   Raffaele


Start here:
http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_hangup

And note the link to the hangup causes. As far as Lua, I'm not sure there's a good reason to do it there. Could you give us pseudo code example of what you're thinking of doing?
-MC




_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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

Back to top
brian at freeswitch.org
Guest





PostPosted: Wed Aug 05, 2009 6:37 pm    Post subject: [Freeswitch-users] How to distinguish between the different Reply with quote

The bigger problem is some end points won't hang up the call in a consistent manner... some phones say user_rejected or user_busy when you reject the call with the reject button.

/b

On Aug 5, 2009, at 5:16 PM, Michael Collins wrote:
Quote:


On Wed, Aug 5, 2009 at 3:54 PM, Raffaele P. Guidi <raffaele.p.guidi@gmail.com (raffaele.p.guidi@gmail.com)> wrote:
Quote:
interesting! what values can contain "variable_originate_disposition"? And can I set them manually in a script to reject a call simulating user busy or call rejected? A lua example?

Thanks,
Raffaele

Start here:
http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_hangup

And note the link to the hangup causes. As far as Lua, I'm not sure there's a good reason to do it there. Could you give us pseudo code example of what you're thinking of doing?
-MC



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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
Back to top
raffaele.p.guidi at gm...
Guest





PostPosted: Wed Aug 05, 2009 6:50 pm    Post subject: [Freeswitch-users] How to distinguish between the different Reply with quote

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). 

Quote:
<anti-action application="respond" data="407" /> (407 or 486 or whatever...)


doesn't behave as I expected and neither


Quote:
<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? 

On Thu, Aug 6, 2009 at 01:23, Brian West <brian@freeswitch.org (brian@freeswitch.org)> wrote:
Quote:
The bigger problem is some end points won't hang up the call in a consistent manner... some phones say user_rejected or user_busy when you reject the call with the reject button.

/b


On Aug 5, 2009, at 5:16 PM, Michael Collins wrote:



Quote:



On Wed, Aug 5, 2009 at 3:54 PM, Raffaele P. Guidi <raffaele.p.guidi@gmail.com (raffaele.p.guidi@gmail.com)> wrote:
Quote:
interesting! what values can contain "variable_originate_disposition"? And can I set them manually in a script to reject a call simulating user busy or call rejected? A lua example?

Thanks,
   Raffaele

Start here:
http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_hangup

And note the link to the hangup causes. As far as Lua, I'm not sure there's a good reason to do it there. Could you give us pseudo code example of what you're thinking of doing?
-MC





_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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 (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

Back to top
nicolas at medularis.com
Guest





PostPosted: Wed Aug 05, 2009 6:50 pm    Post subject: [Freeswitch-users] How to distinguish between the different Reply with quote

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 knowing the call/bridge failed because of 'ORIGINATOR_CANCEL' as reported through the console?

Thanks!

Nicolas


 the value of variable_originate_disposition at the events level and when I have an origination failure due to 'ORIGINATOR_CANCEL

On Wed, Aug 5, 2009 at 6:16 PM, Michael Collins <msc@freeswitch.org (msc@freeswitch.org)> wrote:
Quote:


On Wed, Aug 5, 2009 at 3:54 PM, Raffaele P. Guidi <raffaele.p.guidi@gmail.com (raffaele.p.guidi@gmail.com)> wrote:
Quote:
interesting! what values can contain "variable_originate_disposition"? And can I set them manually in a script to reject a call simulating user busy or call rejected? A lua example?

Thanks,
   Raffaele


Start here:
http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_hangup

And note the link to the hangup causes. As far as Lua, I'm not sure there's a good reason to do it there. Could you give us pseudo code example of what you're thinking of doing?
-MC




_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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

Back to top
msc at freeswitch.org
Guest





PostPosted: Wed Aug 05, 2009 9:07 pm    Post subject: [Freeswitch-users] How to distinguish between the different Reply with quote

On Wed, Aug 5, 2009 at 6:44 PM, Raffaele P. Guidi <raffaele.p.guidi@gmail.com (raffaele.p.guidi@gmail.com)> wrote:
Quote:
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). 

Quote:
<anti-action application="respond" data="407" /> (407 or 486 or whatever...)


doesn't behave as I expected and neither


Quote:
<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
Back to top
raffaele.p.guidi at gm...
Guest





PostPosted: Thu Aug 06, 2009 7:57 am    Post subject: [Freeswitch-users] How to distinguish between the different Reply with quote

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 <msc@freeswitch.org (msc@freeswitch.org)> wrote:
Quote:


On Wed, Aug 5, 2009 at 6:44 PM, Raffaele P. Guidi <raffaele.p.guidi@gmail.com (raffaele.p.guidi@gmail.com)> wrote:
Quote:
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). 

Quote:
<anti-action application="respond" data="407" /> (407 or 486 or whatever...)


doesn't behave as I expected and neither


Quote:
<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 (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

Back to top
msc at freeswitch.org
Guest





PostPosted: Thu Aug 06, 2009 11:50 am    Post subject: [Freeswitch-users] How to distinguish between the different Reply with quote

On Thu, Aug 6, 2009 at 7:49 AM, Raffaele P. Guidi <raffaele.p.guidi@gmail.com (raffaele.p.guidi@gmail.com)> wrote:
Quote:
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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services