Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

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

[Freeswitch-users] Implementing h extension in FS


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





PostPosted: Thu Sep 10, 2009 12:32 am    Post subject: [Freeswitch-users] Implementing h extension in FS Reply with quote

HI,

I'm newbie in FS, I want to know how to implement h extension of asterisk to FS. As I listed down below;

h =>
    {
        NOOP("Call Completed with Carrier ${CARRIER}");
        goto add_cdr|h|1;
    };

My other question is, which application/function/class is use in mod_perl to check the channel status? i.e. busy, answer,hangup,ringing,etc.

Kindly advice me soon.

--
Regards,

Ahmed Munir
Back to top
josh at radianttiger.com
Guest





PostPosted: Thu Sep 10, 2009 12:50 am    Post subject: [Freeswitch-users] Implementing h extension in FS Reply with quote

You should be able to handle hangups in one of two ways:1) Register a hangup handler in your script or dialplan. This will execute a script on the hangup of the call.
2) Use the Event Socket Layer(ESL) to listen to hangup events and then perform your actions there.


You can find more about these options in the wiki.

On Wed, Sep 9, 2009 at 10:16 PM, Ahmed Munir <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)> wrote:
Quote:
HI,

I'm newbie in FS, I want to know how to implement h extension of asterisk to FS. As I listed down below;

h =>
    {
        NOOP("Call Completed with Carrier ${CARRIER}");
        goto add_cdr|h|1;
    };

My other question is, which application/function/class is use in mod_perl to check the channel status? i.e. busy, answer,hangup,ringing,etc.

Kindly advice me soon.

--
Regards,

Ahmed Munir



_______________________________________________
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
jmesquita at freeswitc...
Guest





PostPosted: Thu Sep 10, 2009 2:04 am    Post subject: [Freeswitch-users] Implementing h extension in FS Reply with quote

Try to explain a little bit better what add_cdr does right here. Unlike Asterisk, FreeSWITCH do have lots on information on CDR and it feels like you are trying to do things on the wrong place.

If you want to understand where I am going with this, take a look at this example XML CDR that can be posted by FreeSWITCH to a webserver at the end of a call: http://wiki.freeswitch.org/wiki/Example_XML_cdr

Also you might want to check this referece here: http://wiki.freeswitch.org/wiki/Mod_xml_cdr

jmesquita

On Thu, Sep 10, 2009 at 2:44 AM, Josh Rivers <josh@radianttiger.com (josh@radianttiger.com)> wrote:
Quote:
You should be able to handle hangups in one of two ways:1) Register a hangup handler in your script or dialplan. This will execute a script on the hangup of the call.
2) Use the Event Socket Layer(ESL) to listen to hangup events and then perform your actions there.


You can find more about these options in the wiki.


On Wed, Sep 9, 2009 at 10:16 PM, Ahmed Munir <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)> wrote:


Quote:

HI,

I'm newbie in FS, I want to know how to implement h extension of asterisk to FS. As I listed down below;

h =>
    {
        NOOP("Call Completed with Carrier ${CARRIER}");
        goto add_cdr|h|1;
    };

My other question is, which application/function/class is use in mod_perl to check the channel status? i.e. busy, answer,hangup,ringing,etc.

Kindly advice me soon.

--
Regards,

Ahmed Munir





_______________________________________________
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: Thu Sep 10, 2009 2:59 am    Post subject: [Freeswitch-users] Implementing h extension in FS Reply with quote

On Wed, Sep 9, 2009 at 10:16 PM, Ahmed Munir <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)> wrote:
Quote:
HI,

I'm newbie in FS, I want to know how to implement h extension of asterisk to FS. As I listed down below;

h =>
    {
        NOOP("Call Completed with Carrier ${CARRIER}");
        goto add_cdr|h|1;
    };

My other question is, which application/function/class is use in mod_perl to check the channel status? i.e. busy, answer,hangup,ringing,etc.

Kindly advice me soon.

--
Regards,

Ahmed Munir


It depends on what you are trying to accomplish, but the closest thing you'll find in FS to the 'h' extension is the channel variable api_hangup_hook which lets you launch an API at the end of the call. It sounds like you are working on CDR processing. Please tell us more about your application and we'll do our best to offer advice.
-MC
Back to top
krice at freeswitch.org
Guest





PostPosted: Thu Sep 10, 2009 3:25 am    Post subject: [Freeswitch-users] Implementing h extension in FS Reply with quote

If you are just doing CDR processing the easiest ways are using the event socket to trigger this on the hangup event and you will get all the data you want or use mod_xml_cdr which will either drop a file or fire a web request. You can use either of these methods to trigger a billing update From: Michael Collins <msc@freeswitch.org> Reply-To: <freeswitch-users@lists.freeswitch.org> Date: Thu, 10 Sep 2009 00:55:02 -0700 To: <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] Implementing h extension in FS On Wed, Sep 9, 2009 at 10:16 PM, Ahmed Munir <ahmedmunir007@gmail.com> wrote: HI, I'm newbie in FS, I want to know how to implement h extension of asterisk to FS. As I listed down below; h =>     {         NOOP("Call Completed with Carrier ${CARRIER}");         goto add_cdr|h|1;     }; My other question is, which application/function/class is use in mod_perl to check the channel status? i.e. busy, answer,hangup,ringing,etc. Kindly advice me soon. -- Regards, Ahmed Munir It depends on what you are trying to accomplish, but the closest thing you'll find in FS to the 'h' extension is the channel variable api_hangup_hook which lets you launch an API at the end of the call. It sounds like you are working on CDR processing. Please tell us more about your application and we'll do our best to offer advice. -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
Back to top
diego.viola at gmail.com
Guest





PostPosted: Thu Sep 10, 2009 12:49 pm    Post subject: [Freeswitch-users] Implementing h extension in FS Reply with quote

Here you have an example of how to get the CDR vars from the hangup event and send it to the db.

http://fisheye.freeswitch.org/browse/FreeSWITCH/contrib/diegoviola/ruby/callcard/cdr.rb

Regards,

Diego

On Thu, Sep 10, 2009 at 8:06 AM, Ken Rice <krice@freeswitch.org (krice@freeswitch.org)> wrote:
Quote:
If you are just doing CDR processing the easiest ways are using the event socket to trigger this on the hangup event and you will get all the data you want or use mod_xml_cdr which will either drop a file or fire a web request. You can use either of these methods to trigger a billing update


From: Michael Collins <msc@freeswitch.org (msc@freeswitch.org)>
Reply-To: <freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)>
Date: Thu, 10 Sep 2009 00:55:02 -0700
To: <freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)>
Subject: Re: [Freeswitch-users] Implementing h extension in FS




On Wed, Sep 9, 2009 at 10:16 PM, Ahmed Munir <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)> wrote:



Quote:
HI,

I'm newbie in FS, I want to know how to implement h extension of asterisk to FS. As I listed down below;

h =>
    {
        NOOP("Call Completed with Carrier ${CARRIER}");
        goto add_cdr|h|1;
    };

My other question is, which application/function/class is use in mod_perl to check the channel status? i.e. busy, answer,hangup,ringing,etc.


Kindly advice me soon.

--
Regards,

Ahmed Munir





It depends on what you are trying to accomplish, but the closest thing you'll find in FS to the 'h' extension is the channel variable api_hangup_hook which lets you launch an API at the end of the call. It sounds like you are working on CDR processing. Please tell us more about your application and we'll do our best to offer advice.
-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
brian at freeswitch.org
Guest





PostPosted: Thu Sep 10, 2009 9:24 pm    Post subject: [Freeswitch-users] Implementing h extension in FS Reply with quote

There will NEVER be an easy way to do billing inline and we never
support such crazy because its WRONG. That said... You're not the
first to approach FreeSWITCH with an Asterisk mentality.

Billing inline = NO
Billing direct to DB = NO
Post Processing = YES, do this.
Nibble/Heartbeat billing via event socket = YES, (this is rather
powerful if you take the time to learn it.)

The above is just my advice...

/b
PS: see mod_nibblebill

On Sep 10, 2009, at 12:16 AM, Ahmed Munir wrote:

Quote:
HI,

I'm newbie in FS, I want to know how to implement h extension of
asterisk to FS. As I listed down below;

h =>
{
NOOP("Call Completed with Carrier ${CARRIER}");
goto add_cdr|h|1;
};

My other question is, which application/function/class is use in
mod_perl to check the channel status? i.e. busy,
answer,hangup,ringing,etc.


Kindly advice me soon.

--
Regards,

Ahmed Munir


_______________________________________________
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
ahmedmunir007 at gmail...
Guest





PostPosted: Thu Sep 10, 2009 11:54 pm    Post subject: [Freeswitch-users] Implementing h extension in FS Reply with quote

Thanks for reply, well actually I'm doing billing after call hangup. If h extension is interupts I'm sending to it to addcdr context which interupts perl script for billing purpose. As I'm listing down below asterisk configuration;

h =>
    {
        NOOP("Call Completed with Carrier ${CARRIER}");
        goto add_cdr|h|1;
    };

context add_cdr
{
    _X. =>
    {
        Hangup();
    };
    h =>
    {
        Set(CALL_END_TIME=${EPOCH});
        //&print_variables();
        NOOP("Call Ended: Card:${CARDNUM} Destination:${CALLEDNUM} Caller-ID:${CALLERID(num)}");
        if (${DIALEXECUTED}=YES)
        {
            NOOP("Dial-Status:${DIALSTATUS}");
        }else
        {
            NOOP("Dial was not Executed");
        };
        DeadAGI(/vopium/agi/billing.pl);
        NOOP();
    };

};

Kindly advice me how I pass/translate h extension in FS in this situation i.e. <action application="api_hangup_hook" data="addcdr 1"/> or there is other way around???
From: Michael Collins <msc@freeswitch.org (msc@freeswitch.org)>
Reply-To: <freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)>
Date: Thu, 10 Sep 2009 00:55:02 -0700
To: <freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)>
Subject: Re: [Freeswitch-users] Implementing h extension in FS



On Wed, Sep 9, 2009 at 10:16 PM, Ahmed Munir <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)> wrote:
Quote:
HI,

I'm newbie in FS, I want to know how to implement h extension of asterisk to FS. As I listed down below;

h =>
    {
        NOOP("Call Completed with Carrier ${CARRIER}");
        goto add_cdr|h|1;
    };

My other question is, which application/function/class is use in mod_perl to check the channel status? i.e. busy, answer,hangup,ringing,etc.


Kindly advice me soon.

--
Regards,

Ahmed Munir


It depends on what you are trying to accomplish, but the closest thing you'll find in FS to the 'h' extension is the channel variable api_hangup_hook which lets you launch an API at the end of the call. It sounds like you are working on CDR processing. Please tell us more about your application and we'll do our best to offer advice.
-MC
--
Regards,

Ahmed Munir
Back to top
brian at freeswitch.org
Guest





PostPosted: Fri Sep 11, 2009 8:52 am    Post subject: [Freeswitch-users] Implementing h extension in FS Reply with quote

No you should never be doing your billing inline like this. You
should be doing this externally of your application not inside your
dialplan.

/b

On Sep 10, 2009, at 11:40 PM, Ahmed Munir wrote:

Quote:
Thanks for reply, well actually I'm doing billing after call hangup.
If h extension is interupts I'm sending to it to addcdr context
which interupts perl script for billing purpose. As I'm listing down
below asterisk configuration;


_______________________________________________
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
anthony.minessale at g...
Guest





PostPosted: Fri Sep 11, 2009 10:19 am    Post subject: [Freeswitch-users] Implementing h extension in FS Reply with quote

FreeSWITCH is driven by a state machine and execute and hangup are opposing states so once you change to hangup state that is the end of executing extensions.

asterisk has 4 special extensions s h i and t  we don't support any of them because our dialplan concept and paradigm is completely different.



There is a feature in FS called api_hangup_hook which is a variable you can set to a desired script to execute when the call hangs up.
you should be able to find it on the wiki


On Thu, Sep 10, 2009 at 11:40 PM, Ahmed Munir <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)> wrote:
Quote:
Thanks for reply, well actually I'm doing billing after call hangup. If h extension is interupts I'm sending to it to addcdr context which interupts perl script for billing purpose. As I'm listing down below asterisk configuration;

h =>
    {
        NOOP("Call Completed with Carrier ${CARRIER}");
        goto add_cdr|h|1;
    };


context add_cdr
{
    _X. =>
    {
        Hangup();
    };
    h =>
    {
        Set(CALL_END_TIME=${EPOCH});
        //&print_variables();
        NOOP("Call Ended: Card:${CARDNUM} Destination:${CALLEDNUM} Caller-ID:${CALLERID(num)}");
        if (${DIALEXECUTED}=YES)
        {
            NOOP("Dial-Status:${DIALSTATUS}");
        }else
        {
            NOOP("Dial was not Executed");
        };
        DeadAGI(/vopium/agi/billing.pl);
        NOOP();
    };

};

Kindly advice me how I pass/translate h extension in FS in this situation i.e. <action application="api_hangup_hook" data="addcdr 1"/> or there is other way around???
From: Michael Collins <msc@freeswitch.org (msc@freeswitch.org)>
Reply-To: <freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)>
Date: Thu, 10 Sep 2009 00:55:02 -0700
To: <freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)>
Subject: Re: [Freeswitch-users] Implementing h extension in FS




On Wed, Sep 9, 2009 at 10:16 PM, Ahmed Munir <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)> wrote:

Quote:
HI,

I'm newbie in FS, I want to know how to implement h extension of asterisk to FS. As I listed down below;

h =>
    {
        NOOP("Call Completed with Carrier ${CARRIER}");
        goto add_cdr|h|1;
    };

My other question is, which application/function/class is use in mod_perl to check the channel status? i.e. busy, answer,hangup,ringing,etc.


Kindly advice me soon.

--
Regards,

Ahmed Munir



It depends on what you are trying to accomplish, but the closest thing you'll find in FS to the 'h' extension is the channel variable api_hangup_hook which lets you launch an API at the end of the call. It sounds like you are working on CDR processing. Please tell us more about your application and we'll do our best to offer advice.
-MC

--
Regards,

Ahmed Munir



_______________________________________________
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




--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
diego.viola at gmail.com
Guest





PostPosted: Fri Sep 11, 2009 11:02 am    Post subject: [Freeswitch-users] Implementing h extension in FS Reply with quote

You could create a daemon like this that listens for the CHANNEL_HANGUP_COMPLETE event and send your CDR to the db.

http://fisheye.freeswitch.org/browse/FreeSWITCH/contrib/diegoviola/ruby/callcard/cdr.rb

Then do the billing stuff outside FreeSWITCH or use mod_nibblebill.

I suggest also that you enable mod_xml_cdr or mod_cdr_csv so you always have a copy of the CDR on disk in case if something fails (like the db).

Diego

On Fri, Sep 11, 2009 at 4:40 AM, Ahmed Munir <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)> wrote:
Quote:
Thanks for reply, well actually I'm doing billing after call hangup. If h extension is interupts I'm sending to it to addcdr context which interupts perl script for billing purpose. As I'm listing down below asterisk configuration;

h =>
    {
        NOOP("Call Completed with Carrier ${CARRIER}");
        goto add_cdr|h|1;
    };


context add_cdr
{
    _X. =>
    {
        Hangup();
    };
    h =>
    {
        Set(CALL_END_TIME=${EPOCH});
        //&print_variables();
        NOOP("Call Ended: Card:${CARDNUM} Destination:${CALLEDNUM} Caller-ID:${CALLERID(num)}");
        if (${DIALEXECUTED}=YES)
        {
            NOOP("Dial-Status:${DIALSTATUS}");
        }else
        {
            NOOP("Dial was not Executed");
        };
        DeadAGI(/vopium/agi/billing.pl);
        NOOP();
    };

};

Kindly advice me how I pass/translate h extension in FS in this situation i.e. <action application="api_hangup_hook" data="addcdr 1"/> or there is other way around???
From: Michael Collins <msc@freeswitch.org (msc@freeswitch.org)>
Reply-To: <freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)>
Date: Thu, 10 Sep 2009 00:55:02 -0700
To: <freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)>
Subject: Re: [Freeswitch-users] Implementing h extension in FS




On Wed, Sep 9, 2009 at 10:16 PM, Ahmed Munir <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)> wrote:

Quote:
HI,

I'm newbie in FS, I want to know how to implement h extension of asterisk to FS. As I listed down below;

h =>
    {
        NOOP("Call Completed with Carrier ${CARRIER}");
        goto add_cdr|h|1;
    };

My other question is, which application/function/class is use in mod_perl to check the channel status? i.e. busy, answer,hangup,ringing,etc.


Kindly advice me soon.

--
Regards,

Ahmed Munir



It depends on what you are trying to accomplish, but the closest thing you'll find in FS to the 'h' extension is the channel variable api_hangup_hook which lets you launch an API at the end of the call. It sounds like you are working on CDR processing. Please tell us more about your application and we'll do our best to offer advice.
-MC

--
Regards,

Ahmed Munir



_______________________________________________
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
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