[OpenSIPS-Users] OPENSIPS+ASTERISK Integration
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Fri Jun 11 10:56:05 CEST 2010
Hi Prem,
Once asterisk did the IVR based auth, I suggest that asterisk should
route the SIP call back to OpenSIPS - and OpenSIPS will do the
lookup(location) to send the call to the callee device.
In OpenSIPS, based on source Ip, you can have 2 routing logics - if call
comes from Asterisk -> outbound routing ; if not from asterisk ->
inbound logic.
Regards,
Bogdan
Premalatha Kuppan wrote:
> Yes, i have checked all these options. Everything is in correct status.
>
> I doubt, connecting between vmware and with 64 bit RHEL. My set is
> running on vmware image. When i ping on from vmware where
> opensips+asterisk is running to the MySQL server vmware image, i see
> this problem. But when i set MySQL server on non-vmware, it works
> perferctly fine.
>
> i 'll update once i figure out the reason.
>
> Between, to route a call from OPENSIP to the destination. I need to
> fetch the destination details IP from MySQL DB.
> Meaning,
>
> User -------->
> OPENSIPS(1)--------->ASTERISK(IVR)-------------->OPENSIPS(1)----------------->Destination
>
> Here, for authentication user enters the PIn and extension to access,
> if the extension is present in the DB, Asterisk(IVR) will allow the
> user to access it. From this from asterisk, i can make query to DB and
> fetch the neccessary details. Likewise is it possible to fetch the
> details(IP where the extension is connected and to be routed) from DB
> from opensips.cfg to route the call to requested destination.
>
> Thanks,
> Prem
>
> On Thu, Jun 10, 2010 at 3:01 PM, Bogdan-Andrei Iancu
> <bogdan at voice-system.ro <mailto:bogdan at voice-system.ro>> wrote:
>
> Are you sure the DB conn params are correct (like address of myql
> server) ?
>
> Also are you sure the mysql server is remotely reachable (it
> listens on
> routable IP and there is no firewall in front)
>
> Have you tried to connect to mysql by using directly the mysql
> client -
> just to see if it works?
>
> Regards,
> Bogdan
>
> Premalatha Kuppan wrote:
> > Iam facing one more problem.
> >
> > Iam running my set up on 64bit processor. Opensips and asterisk
> on one
> > PC and Mysql server on seperate PC.
> >
> > Iam running on RHEL enterprise version.
> >
> > Problem is that, its taking more than 2 mins to connect to MySQL
> > server when i start Opensips. Also user is not getting
> registered. of
> > 10 attmept, only 1 is getting successful. But even this is not
> consistent.
> >
> > I have increased connection_timeout in /etc/my.cnf also. But still
> > facing the same problem.
> >
> > Any insight ?
> >
> >
> > Jun 9 03:36:03 204548-4 /usr/local/sbin/opensips[7575]:
> > DBG:db_mysql:db_mysql_connect: opening connection:
> > mysql://xxxx:xxxx@MySQLserver/opensips
> > Jun 9 03:36:03 204548-4 /usr/local/sbin/opensips[7576]:
> > DBG:core:init_mod_child: type=PROC_TCP_MAIN, rank=-4, module=acc
> > Jun 9 03:36:03 204548-4 /usr/local/sbin/opensips[7576]:
> > DBG:core:init_mod_child: type=PROC_TCP_MAIN, rank=-4, module=auth_db
> > Jun 9 03:36:03 204548-4 /usr/local/sbin/opensips[7576]:
> > DBG:core:db_do_init: connection 0x79e858 not found in pool
> > Jun 9 03:36:03 204548-4 /usr/local/sbin/opensips[7576]:
> > DBG:db_mysql:db_mysql_connect: opening connection:
> > mysql://xxxx:xxxx@MySQLserver/opensips
> > Jun 9 03:39:12 204548-4 /usr/local/sbin/opensips[7567]:
> > ERROR:db_mysql:db_mysql_connect: driver error(2003): Can't
> connect to
> > MySQL server on 'MySQLserver' (110)
> > Jun 9 03:39:12 204548-4 /usr/local/sbin/opensips[7567]:
> > ERROR:db_mysql:db_mysql_new_connection: initial connect failed
> > Jun 9 03:39:12 204548-4 /usr/local/sbin/opensips[7567]:
> > ERROR:core:db_do_init: could not add connection to the pool
> > Jun 9 03:39:12 204548-4 /usr/local/sbin/opensips[7567]:
> > ERROR:auth_db:child_init: unable to connect to the database
> > Jun 9 03:39:12 204548-4 /usr/local/sbin/opensips[7567]:
> > ERROR:core:init_mod_child: failed to initializing module
> auth_db, rank 3
> > Jun 9 03:39:12 204548-4 /usr/local/sbin/opensips[7567]:
> > ERROR:core:main_loop: init_child failed for UDP listener
> > Jun 9 03:39:12 204548-4 /usr/local/sbin/opensips[7341]:
> > ERROR:db_mysql:db_mysql_connect: driver error(2003): Can't
> connect to
> > MySQL server on 'MySQL server' (110)
> > Jun 9 03:39:12 204548-4 /usr/local/sbin/opensips[7341]:
> > ERROR:db_mysql:db_mysql_new_connection: initial connect failed
> > Jun 9 03:39:12 204548-4 /usr/local/sbin/opensips[7341]:
> > ERROR:core:db_do_init: could not add connection to the pool
> > Jun 9 03:39:12 204548-4 /usr/local/sbin/opensips[7341]:
> > ERROR:usrloc:child_init: child(0): failed to connect to database
> > Jun 9 03:39:12 204548-4 /usr/local/sbin/opensips[7341]:
> > ERROR:core:init_mod_child: failed to initializing module usrloc,
> rank 0
> > Jun 9 03:39:12 204548-4 /usr/local/sbin/opensips[7341]:
> > ERROR:core:main_loop: error in init_child for PROC_MAIN
> > Jun 9 03:39:12 204548-4 /usr/local/sbin/opensips[7341]:
> > DBG:xlog:destroy: destroy module...
> >
> > On Wed, Jun 9, 2010 at 1:04 PM, ram <talk2ram at gmail.com
> <mailto:talk2ram at gmail.com>
> > <mailto:talk2ram at gmail.com <mailto:talk2ram at gmail.com>>> wrote:
> >
> > depends on the design
> >
> > you can have one point of authenticaion and transaction
> >
> > Ram
> >
> >
> >
> > On Tue, Jun 8, 2010 at 10:59 PM, Premalatha Kuppan
> > <premalatha at ngintech.com <mailto:premalatha at ngintech.com>
> <mailto:premalatha at ngintech.com <mailto:premalatha at ngintech.com>>>
> wrote:
> >
> > Thanks a lot.
> >
> > I have one question. If i route the call to asterisk for
> IVR (
> > in my case ivr is to authenticate the user to access the
> > system), who will have the control, meaning who will
> maintian
> > all the transactions and dailog. Is it opensips/Asterisk ?
> >
> > Thanks,
> > Prem
> >
> > On Tue, Jun 8, 2010 at 9:50 AM, Gabriel Bermudez
> > <elgabo81 at gmail.com <mailto:elgabo81 at gmail.com>
> <mailto:elgabo81 at gmail.com <mailto:elgabo81 at gmail.com>>> wrote:
> >
> > Hi,
> >
> > I basically use the load_balancer module to dispatch to
> > different
> > asterisk servers
> >
> > on the main route block after handling auth,
> > registrations, etc
> >
> > if(db_is_user_in("Request-URI", "ccivr")) {
> > xlog("The call will be redirect to calling card
> > server");
> > route(3);
> > }
> >
> > # route for call handled by calling card servers
> > route[3] {
> > # for INVITEs enable some additional helper
> routes
> > if (is_method("INVITE")) {
> > t_on_branch("2");
> > t_on_reply("2");
> > t_on_failure("1");
> > if(client_nat_test("15")) {
> > nat_keepalive();
> > }
> > }
> >
> > # prepare the message for the IVR
> >
> > # select less loaded IVR
> > if(!load_balance("1", "ccivr")) {
> > xlog("No IVR available !!!");
> > sl_send_reply("503", "Service
> Unavailable");
> > exit;
> > };
> >
> > if(!t_relay()) {
> > sl_reply_error();
> > exit;
> > }
> >
> > exit;
> >
> > }
> >
> >
> > Hope it helps
> >
> > Regards,
> >
> > 2010/6/8 ram <talk2ram at gmail.com
> <mailto:talk2ram at gmail.com> <mailto:talk2ram at gmail.com
> <mailto:talk2ram at gmail.com>>>:
> > > I forgot the link
> > >
> > > i did this work some time back
> > >
> > > Lost the link, google it
> > >
> > > Opensips+asterisk+a2b
> > >
> > > Ram
> > >
> > > On Mon, Jun 7, 2010 at 4:07 PM, Premalatha Kuppan
> > <premalatha at ngintech.com
> <mailto:premalatha at ngintech.com> <mailto:premalatha at ngintech.com
> <mailto:premalatha at ngintech.com>>>
> > > wrote:
> > >>
> > >> Can you pleae guide me how to do this ?
> > >>
> > >> On Mon, Jun 7, 2010 at 4:04 PM, Douglas Lane
> > <doug at wd.co.za <mailto:doug at wd.co.za>
> <mailto:doug at wd.co.za <mailto:doug at wd.co.za>>> wrote:
> > >>>
> > >>> Hi Premalatha,
> > >>>
> > >>> Perhaps have a look at SEMS for this.
> > >>>
> > >>> Thanks
> > >>> Doug
> > >>>
> > >>>
> > >>> On 2010/06/07 12:30 PM, Premalatha Kuppan wrote:
> > >>>
> > >>> Thanks Sebastian.
> > >>>
> > >>> I have followed up this link and tried extending the
> > opensips.cfg file to
> > >>> route call to Asterisk.
> > >>>
> > >>> I doubt/not clear that after IVR (meaning when the
> > user is authenticated
> > >>> through IVR) who will handle all the
> transactions and
> > dialog (OPENSIPS or
> > >>> Asterisk ) ?
> > >>>
> > >>> I want Opensips to handle all the transactions.
> > >>>
> > >>> Any insight on this ?
> > >>>
> > >>> Thanks,
> > >>> Prem
> > >>>
> > >>> On Mon, Jun 7, 2010 at 3:15 PM, Schumann Sebastian
> > >>> <Sebastian.Schumann at t-com.sk
> <mailto:Sebastian.Schumann at t-com.sk>
> > <mailto:Sebastian.Schumann at t-com.sk
> <mailto:Sebastian.Schumann at t-com.sk>>> wrote:
> > >>>>
> > >>>> Hi Prem
> > >>>>
> > >>>> There is a good tutorial at
> > >>>>
> http://www.opensips.org/Resources/DocsTutAsterisk It
> > does exactly what you
> > >>>> need I assume.
> > >>>>
> > >>>> For details in writing and extending basic
> > configuration, you can find
> > >>>> also the linked documentation there.
> > >>>>
> > >>>> Best regards
> > >>>> Sebastian
> > >>>>
> > >>>> > -----Original Message-----
> > >>>> > From: users-bounces at lists.opensips.org
> <mailto:users-bounces at lists.opensips.org>
> > <mailto:users-bounces at lists.opensips.org
> <mailto:users-bounces at lists.opensips.org>> [mailto:users-
> <mailto:users->
> > <mailto:users- <mailto:users->>
> > >>>> > bounces at lists.opensips.org
> <mailto:bounces at lists.opensips.org>
> > <mailto:bounces at lists.opensips.org
> <mailto:bounces at lists.opensips.org>>] On Behalf Of
> > Premalatha Kuppan
> > >>>> > Sent: Monday, 07. June 2010 11:35
> > >>>> > To: OpenSIPS users mailling list
> > >>>> > Subject: [OpenSIPS-Users] OPENSIPS+ASTERISK
> Integration
> > >>>> >
> > >>>> > Hi,
> > >>>> >
> > >>>> > Can anyone guide me in building the Opensips and
> > Asterisk Integration.
> > >>>> >
> > >>>> > I want to Use OpenSIPS as SIP PROXY (i.e all
> > transactions and dialogs
> > >>>> > should be
> > >>>> > handled by Opensips) and Asterisk to do only IVR
> > functionality.
> > >>>> >
> > >>>> > I appreciate if anyone can guide me in writing a
> > routing logic from
> > >>>> > Opensips to
> > >>>> > Asterisk for IVR and futher call flow OPENSIPS to
> > handle.
> > >>>> >
> > >>>> > Thanks,
> > >>>> > Prem
> > >>>> >
> > >>>>
> > >>>>
> > >>>> _______________________________________________
>
--
Bogdan-Andrei Iancu
www.voice-system.ro
More information about the Users
mailing list