Using CGRAteS with Freeswitch Originate

122 views
Skip to first unread message

Sonnie

unread,
Feb 14, 2018, 9:18:31 AM2/14/18
to CGRateS
Hello Dan, 

It might not be a CGRateS Issue completely, but i'll appreciate your thoughts on how to achieve this. 

I'm using Freeswitch Originate to send calls out and i want to use CGRateS to handle the billing, such that if a particular account does not have funds, the calls should not be placed through. 

What would be the best approach in achiving this?


I've tried this - 
originate {origination_caller_id_number='123456789',ignore_early_media=true,originate_timeout=45,account_code=12345}sofia/gateway/provider_one/7774262712 &playback(/usr/share/freeswitch/sounds/en/us/callie/voicemail/8000/vm-hello.wav) default CGRates_Auth

That sends the call out and then hangs it up(expectedly)


Is there a way i can check if account_code(for user ) has funds first before sending the calls out with Originate?

Thank you

DanB

unread,
Feb 14, 2018, 9:51:26 AM2/14/18
to cgr...@googlegroups.com
Hi Sonnie,

We like billing always on inbound (although outbound should also work
fine). If you want to go with billing on inbound, you can use fs_path
in your originate dialplan and then have everything checked in the way
we have published in FreeSWITCH tutorial.
Otherwise, you should capture the communication between FreeSWITCH and
CGRateS and see what is going on there. Regarding checking the account
in advance, you can use park application to perform that check (park in
your dialplan, we will check account and whether it has funds and
unpark call after to the original dialed number, populating also
cgr_notify variable which you can use in your dialplan to avoid looping
to park again).

Hope this helps.

DanB
> --
> You received this message because you are subscribed to the Google
> Groups "CGRateS" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to cgrates+u...@googlegroups.com.
> To post to this group, send email to cgr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/cgrates/5c7f7a8a-438a-4b5b-a471-e6ac75c03c0e%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.

Sonnie

unread,
Feb 14, 2018, 7:15:27 PM2/14/18
to cgr...@googlegroups.com
Thank you Dan! 

Thank you so much! 
You received this message because you are subscribed to a topic in the Google Groups "CGRateS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cgrates/HdXcILlecNo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cgrates+u...@googlegroups.com.

To post to this group, send email to cgr...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages