From 5149b080c079166b6bdf86c70d8d307142bafd79 Mon Sep 17 00:00:00 2001 From: DanB Date: Tue, 18 Aug 2015 13:05:34 +0200 Subject: [PATCH] New kamailio tutorial in docs, various doc improvements, fixes in local calls --- .../freeswitch/etc/freeswitch_conf.tar.gz | Bin 28299 -> 28291 bytes .../kamailio/etc/kamailio/kamailio.cfg | 2 +- docs/installation.rst | 11 ++-- docs/tut_freeswitch.rst | 5 +- docs/tut_freeswitch_json.rst | 12 ++-- docs/tut_opensips_event.rst | 12 ++-- docs/tut_opensips_installs.rst | 4 +- docs/tutorials.rst | 1 + general_tests/tutorial_fs_calls_test.go | 3 +- general_tests/tutorial_kam_calls_test.go | 53 +++++++++--------- general_tests/tutorial_osips_calls_test.go | 27 +++++---- 11 files changed, 65 insertions(+), 65 deletions(-) diff --git a/data/tutorials/fs_evsock/freeswitch/etc/freeswitch_conf.tar.gz b/data/tutorials/fs_evsock/freeswitch/etc/freeswitch_conf.tar.gz index 777211ea0e1e31f10e6bd3f1b2f19b95ec916108..310388a91667dd05bd8eee2bccef9d42c3c33f3b 100644 GIT binary patch delta 9486 zcmV+pCGpye-2sE$0S6z82moI2(y<51Nq?-}joVi4XZ;H7oTRo>Q+|8e=}bK#(FuIhjn)Zmn~gjwL)UE-o(a8-U&sY{wny zjg%h)+&f!PlE(zNW4pI{JcAj@{#3GN7;&%v;NNfKzxMH8t_Pd8l{PRQQ?>_941X+A zY$^$K5~!_?*|4{r?O?Y)cofb<$`P6+4>~D`$K@O!fQjP?(#T(QEo|;T+L?}acO8ap zX^U0&I;jC&G70^Q(%M=G+B;qsL)@|pMcnHD7mg10*ToUH?7|VZ`oD=IYa(mJ)ZyCa z?QpFFclggcaeF@>Q^==2l_;_+FQ5N=e1!7f;qlAEz1@Q&%KzPe*8e`q zr&0cMH@+tNUGh&X=IM4!?&U3hkxZvDQ)2UcBM?YYczY|nzcZC@mG?IN#ADE$NO&r7 zg7lUeM9CC|fT~@8sg+tN4iPL<*hofLYPj&ppj~M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FLy)R zXytCOu2_cIfgeteN&^@_sl1wOa^*i^B7fDdqUuG*7|-9D14G(o=!QL-Tb5u+7`ExV zjVCHA8`z=XNa#?b2_^>+(02!Yaoe&mkOj08!v>zsGJJypluFR{W8B1OSx#AMEAr=$Mw(aVzo?*GxrOW5|~6RiKde|Yq{{_CgsSefhm3A1}mP6djFGc7@w z%8sV=JKlU{*`$7tu8P;X3=-ZuuXWKL>o(((Jw}Eoi_4i5GJIW|>&*-9&FMgFe8n{5 zBF;durdPPt&o59c&Dd`B=6}V1;)V5vTe!WUKL%A`XUT8KlRXN5*^)r}YgiOE{JU?>Jo zMw9G~d1Ao8*t!XbjOT9x)>6irgDCTt+kx2&D2`rS4?nznck%Y({Q7S6?!)!ja97Za zw2oQ<3f5HH(lE^pPk(w4DxHW>x~fPtJ=#C)Z-(u6Nj9b;55ExY-YV#wr`6d6Dm^(e z&s~jBRxZ*J)hv92Q6ooKg=Vi~Jnr?e_hk5|;obSw==}Ef{q1fesw;F)emZ|;eW%^+HbBv$0mK;#_lWA zbeF;?kyTOoCysCct;_ln!a$jLAlu1qLE|2jaIDz_+yOgYbr1Ug`V6$YyN<>Wy2Y z((S?ipZ5oU`G51i_q)IBJcmkAVaMPaKvkhU{Ojj#s&vtfSFkpdzB%0Q?rRdSxH}s0 z_ZlUNe>ZVSlpFJ`ZKDP#hoS0j#j~3H=g9x%t9c(;#(cj1ceH=9|5^Y06raZZ{|Ils pxSwag|1vl}KKlIr$LG)I&*#tQ&*#tQ&u{km|6KZx+5`YF0st9{hpqqs diff --git a/data/tutorials/kamevapi/kamailio/etc/kamailio/kamailio.cfg b/data/tutorials/kamevapi/kamailio/etc/kamailio/kamailio.cfg index a61eea930..1c962a6aa 100644 --- a/data/tutorials/kamevapi/kamailio/etc/kamailio/kamailio.cfg +++ b/data/tutorials/kamevapi/kamailio/etc/kamailio/kamailio.cfg @@ -60,7 +60,7 @@ loadmodule "jsonrpc-s.so" # ----------------- setting module-specific parameters --------------- # ----- mi_fifo params ----- -modparam("mi_fifo", "fifo_name", "/tmp/cgr_kamevapi/kamailio/run/kamailio_fifo") +modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo") # ----- tm params ----- modparam("tm", "failure_reply_mode", 3) diff --git a/docs/installation.rst b/docs/installation.rst index 9179ed1d0..56d6c0ea3 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -45,18 +45,20 @@ Database setup ~~~~~~~~~~~~~~ For it's operation CGRateS uses more database types, depending on it's nature, install and configuration being further necessary. + At present we support the following databases: -As DataDB types (rating and accounting subsystems): + - Redis_ -As StorDB (persistent storage for CDRs and tariff plan versions). - +Used as DataDb, optimized for real-time information access. Once installed there should be no special requirements in terms of setup since no schema is necessary. + - MySQL_ +Used as StorDb, optimized for CDR archiving and offline Tariff Plan versioning. Once database is installed, CGRateS database needs to be set-up out of provided scripts (example for the paths set-up by debian package) :: @@ -66,12 +68,13 @@ Once database is installed, CGRateS database needs to be set-up out of provided - PostgreSQL_ +Used as StorDb, optimized for CDR archiving and offline Tariff Plan versioning. Once database is installed, CGRateS database needs to be set-up out of provided scripts (example for the paths set-up by debian package) :: cd /usr/share/cgrates/storage/postgres/ - ./setup_cgr_db.sh root CGRateS.org localhost + ./setup_cgr_db.sh .. _Redis: http://redis.io/ .. _MySQL: http://www.mysql.org/ diff --git a/docs/tut_freeswitch.rst b/docs/tut_freeswitch.rst index e03b9c859..dc54b7bdd 100644 --- a/docs/tut_freeswitch.rst +++ b/docs/tut_freeswitch.rst @@ -1,7 +1,7 @@ -sFreeSWITCH Integration Tutorials +FreeSWITCH Integration Tutorials ================================ -In these tutorials we exemplify few cases of integration between FreeSWITCH_ and **CGRateS**. We start with common steps, installation and postinstall processes then we dive into particular configurations, depending on the case we run. +In these tutorials we exemplify few cases of integration between FreeSWITCH_ and **CGRateS**. We start with common steps, installation and postinstall processes then we dive into particular configurations. .. toctree:: @@ -10,7 +10,6 @@ In these tutorials we exemplify few cases of integration between FreeSWITCH_ and tut_freeswitch_installs tut_cgrates_installs tut_jitsi_installs - tut_freeswitch_csv tut_freeswitch_json tut_cgrates_usage diff --git a/docs/tut_freeswitch_json.rst b/docs/tut_freeswitch_json.rst index 0501bcb69..3d9479b9d 100644 --- a/docs/tut_freeswitch_json.rst +++ b/docs/tut_freeswitch_json.rst @@ -4,7 +4,7 @@ FreeSWITCH_ generating *http-json* CDRs Scenario -------- -- FreeSWITCH with *vanilla* configuration, replacing *mod_cdr_csv* with *mod_json_cdr*. +- FreeSWITCH with *vanilla* configuration adding *mod_json_cdr* for CDR generation. - Modified following users (with configs in *etc/freeswitch/directory/default*): 1001-prepaid, 1002-postpaid, 1003-pseudoprepaid, 1004-rated, 1006-prepaid, 1007-rated. - Have added inside default dialplan CGR own extensions just before routing towards users (*etc/freeswitch/dialplan/default.xml*). @@ -13,8 +13,8 @@ Scenario - **CGRateS** with following components: - CGR-SM started as prepaid controller, with debits taking place at 5s intervals. - - CGR-Mediator component attaching costs to the raw CDRs from FreeSWITCH_ inside CGR StorDB. - - CGR-CDRE exporting mediated CDRs from CGR StorDB (export path: */tmp*). + - CGR-CDRS component receiving raw CDRs from FreeSWITCH, storing them and attaching costs inside CGR StorDB. + - CGR-CDRE exporting processed CDRs from CGR StorDB (export path: */tmp*). - CGR-History component keeping the archive of the rates modifications (path browsable with git client at */tmp/cgr_history*). @@ -23,7 +23,7 @@ Starting FreeSWITCH_ with custom configuration :: - /usr/share/cgrates/tutorials/fs_json/freeswitch/etc/init.d/freeswitch start + /usr/share/cgrates/tutorials/fs_evsock/freeswitch/etc/init.d/freeswitch start To verify that FreeSWITCH_ is running we run the console command: @@ -37,7 +37,7 @@ Starting **CGRateS** with custom configuration :: - /usr/share/cgrates/tutorials/fs_json/cgrates/etc/init.d/cgrates start + /usr/share/cgrates/tutorials/fs_evsock/cgrates/etc/init.d/cgrates start Check that cgrates is running @@ -49,7 +49,7 @@ Check that cgrates is running CDR processing -------------- -At the end of each call FreeSWITCH_ will issue a http post with the CDR. This will reach inside **CGRateS** through the *CDRS* component (close to real-time). Once in-there it will be instantly mediated and it is ready to be exported: +At the end of each call FreeSWITCH_ will issue a http post with the CDR. This will reach inside **CGRateS** through the *CDRS* component (close to real-time). Once in-there it will be instantly rated and it is ready to be exported: :: diff --git a/docs/tut_opensips_event.rst b/docs/tut_opensips_event.rst index ca94318fd..9f7473a35 100644 --- a/docs/tut_opensips_event.rst +++ b/docs/tut_opensips_event.rst @@ -12,8 +12,8 @@ Scenario - **CGRateS** with following components: - CGR-SM started as translator between OpenSIPS_ and **cgr-rater** for both authorization events (pseudoprepaid) as well as CDR ones. - - CGR-Mediator component attaching costs to the raw CDRs from OpenSIPS_ inside CGR StorDB. - - CGR-CDRE exporting mediated CDRs from CGR StorDB (export path: */tmp*). + - CGR-CDRS component processing raw CDRs from CGR-SM component and storing them inside CGR StorDB. + - CGR-CDRE exporting rated CDRs from CGR StorDB (export path: */tmp*). - CGR-History component keeping the archive of the rates modifications (path browsable with git client at */tmp/cgr_history*). @@ -22,7 +22,7 @@ Starting OpenSIPS_ with custom configuration :: - /usr/share/cgrates/tutorials/osips_event/opensips/etc/init.d/opensips start + /usr/share/cgrates/tutorials/osips_async/opensips/etc/init.d/opensips start To verify that OpenSIPS_ is running we run the console command: @@ -36,9 +36,9 @@ Starting **CGRateS** with custom configuration :: - /usr/share/cgrates/tutorials/osips_event/cgrates/etc/init.d/cgrates start + /usr/share/cgrates/tutorials/osips_async/cgrates/etc/init.d/cgrates start -Check that cgrates is running +Make sure that cgrates is running :: @@ -48,7 +48,7 @@ Check that cgrates is running CDR processing -------------- -At the end of each call OpenSIPS_ will generate an CDR event and due to automatic handler registration built in **CGRateS-SM** component, this will be directed towards the port configured inside *cgrates.cfg*. This event will reach inside **CGRateS** through the *SM* component (close to real-time). Once in-there it will be instantly mediated and it is ready to be exported. +At the end of each call OpenSIPS_ will generate an CDR event and due to automatic handler registration built in **CGRateS-SM** component, this will be directed towards the port configured inside *cgrates.json*. This event will reach inside **CGRateS** through the *SM* component (close to real-time). Once in-there it will be instantly rated and be ready for export. **CGRateS** Usage diff --git a/docs/tut_opensips_installs.rst b/docs/tut_opensips_installs.rst index 89aa1a6cc..2080e548e 100644 --- a/docs/tut_opensips_installs.rst +++ b/docs/tut_opensips_installs.rst @@ -12,9 +12,9 @@ We got OpenSIPS_ installed via following commands: wget http://apt.opensips.org/key.asc apt-key add key.asc cd /etc/apt/sources.list.d/ - wget http://apt.itsyscom.com/conf/opensips.apt.list + wget http://apt.itsyscom.com/conf/opensips.wheezy.apt.list apt-get update - apt-get install + apt-get install opensips opensips-json-module opensips-restclient-module Once installed we proceed with loading the configuration out of specific tutorial cases bellow. diff --git a/docs/tutorials.rst b/docs/tutorials.rst index ff937c41e..8e5d72b64 100644 --- a/docs/tutorials.rst +++ b/docs/tutorials.rst @@ -5,4 +5,5 @@ :maxdepth: 2 tut_freeswitch + tut_kamailio tut_opensips diff --git a/general_tests/tutorial_fs_calls_test.go b/general_tests/tutorial_fs_calls_test.go index 7183a3f34..54835be23 100644 --- a/general_tests/tutorial_fs_calls_test.go +++ b/general_tests/tutorial_fs_calls_test.go @@ -99,8 +99,7 @@ func TestTutFsCallsRestartFS(t *testing.T) { if !*testCalls { return } - engine.KillProcName("freeswitch", 5000) - if err := engine.CallScript(path.Join(*dataDir, "tutorials", "fs_evsock", "freeswitch", "etc", "init.d", "freeswitch"), "start", 3000); err != nil { + if err := engine.CallScript(path.Join(*dataDir, "tutorials", "fs_evsock", "freeswitch", "etc", "init.d", "freeswitch"), "start", 5000); err != nil { t.Fatal(err) } } diff --git a/general_tests/tutorial_kam_calls_test.go b/general_tests/tutorial_kam_calls_test.go index de34bbff0..12ce0cfb9 100644 --- a/general_tests/tutorial_kam_calls_test.go +++ b/general_tests/tutorial_kam_calls_test.go @@ -44,7 +44,7 @@ func TestTutKamCallsInitCfg(t *testing.T) { } // Init config first var err error - tutKamCallsCfg, err = config.NewCGRConfigFromFolder(path.Join(*dataDir, "tutorials", "fs_evsock", "cgrates", "etc", "cgrates")) + tutKamCallsCfg, err = config.NewCGRConfigFromFolder(path.Join(*dataDir, "tutorials", "kamevapi", "cgrates", "etc", "cgrates")) if err != nil { t.Error(err) } @@ -73,12 +73,12 @@ func TestTutKamCallsResetStorDb(t *testing.T) { } // start FS server -func TestTutKamCallsStartFS(t *testing.T) { +func TestTutKamCallsStartKamailio(t *testing.T) { if !*testCalls { return } - engine.KillProcName("freeswitch", 5000) - if err := engine.CallScript(path.Join(*dataDir, "tutorials", "fs_evsock", "freeswitch", "etc", "init.d", "freeswitch"), "start", 3000); err != nil { + engine.KillProcName("kamailio", 3000) + if err := engine.CallScript(path.Join(*dataDir, "tutorials", "kamevapi", "kamailio", "etc", "init.d", "kamailio"), "start", 2000); err != nil { t.Fatal(err) } } @@ -89,18 +89,17 @@ func TestTutKamCallsStartEngine(t *testing.T) { return } engine.KillProcName("cgr-engine", *waitRater) - if err := engine.CallScript(path.Join(*dataDir, "tutorials", "fs_evsock", "cgrates", "etc", "init.d", "cgrates"), "start", 100); err != nil { + if err := engine.CallScript(path.Join(*dataDir, "tutorials", "kamevapi", "cgrates", "etc", "init.d", "cgrates"), "start", 100); err != nil { t.Fatal(err) } } // Restart FS so we make sure reconnects are working -func TestTutKamCallsRestartFS(t *testing.T) { +func TestTutKamCallsRestartKamailio(t *testing.T) { if !*testCalls { return } - engine.KillProcName("freeswitch", 5000) - if err := engine.CallScript(path.Join(*dataDir, "tutorials", "fs_evsock", "freeswitch", "etc", "init.d", "freeswitch"), "start", 3000); err != nil { + if err := engine.CallScript(path.Join(*dataDir, "tutorials", "kamevapi", "kamailio", "etc", "init.d", "kamailio"), "restart", 3000); err != nil { t.Fatal(err) } } @@ -226,12 +225,12 @@ func TestTutKamCallsStartPjsuaListener(t *testing.T) { } var err error acnts := []*engine.PjsuaAccount{ - &engine.PjsuaAccount{Id: "sip:1001@127.0.0.1", Username: "1001", Password: "1234", Realm: "*", Registrar: "sip:127.0.0.1:5060"}, - &engine.PjsuaAccount{Id: "sip:1002@127.0.0.1", Username: "1002", Password: "1234", Realm: "*", Registrar: "sip:127.0.0.1:5060"}, - &engine.PjsuaAccount{Id: "sip:1003@127.0.0.1", Username: "1003", Password: "1234", Realm: "*", Registrar: "sip:127.0.0.1:5060"}, - &engine.PjsuaAccount{Id: "sip:1004@127.0.0.1", Username: "1004", Password: "1234", Realm: "*", Registrar: "sip:127.0.0.1:5060"}, - &engine.PjsuaAccount{Id: "sip:1006@127.0.0.1", Username: "1006", Password: "1234", Realm: "*", Registrar: "sip:127.0.0.1:5060"}, - &engine.PjsuaAccount{Id: "sip:1007@127.0.0.1", Username: "1007", Password: "1234", Realm: "*", Registrar: "sip:127.0.0.1:5060"}} + &engine.PjsuaAccount{Id: "sip:1001@127.0.0.1", Username: "1001", Password: "CGRateS.org", Realm: "*", Registrar: "sip:127.0.0.1:5060"}, + &engine.PjsuaAccount{Id: "sip:1002@127.0.0.1", Username: "1002", Password: "CGRateS.org", Realm: "*", Registrar: "sip:127.0.0.1:5060"}, + &engine.PjsuaAccount{Id: "sip:1003@127.0.0.1", Username: "1003", Password: "CGRateS.org", Realm: "*", Registrar: "sip:127.0.0.1:5060"}, + &engine.PjsuaAccount{Id: "sip:1004@127.0.0.1", Username: "1004", Password: "CGRateS.org", Realm: "*", Registrar: "sip:127.0.0.1:5060"}, + &engine.PjsuaAccount{Id: "sip:1006@127.0.0.1", Username: "1006", Password: "CGRateS.org", Realm: "*", Registrar: "sip:127.0.0.1:5060"}, + &engine.PjsuaAccount{Id: "sip:1007@127.0.0.1", Username: "1007", Password: "CGRateS.org", Realm: "*", Registrar: "sip:127.0.0.1:5060"}} if tutKamCallsPjSuaListener, err = engine.StartPjsuaListener(acnts, 5070, *waitRater); err != nil { t.Fatal(err) } @@ -242,7 +241,7 @@ func TestTutKamCallsCall1001To1002(t *testing.T) { if !*testCalls { return } - if err := engine.PjsuaCallUri(&engine.PjsuaAccount{Id: "sip:1001@127.0.0.1", Username: "1001", Password: "1234", Realm: "*"}, "sip:1002@127.0.0.1", + if err := engine.PjsuaCallUri(&engine.PjsuaAccount{Id: "sip:1001@127.0.0.1", Username: "1001", Password: "CGRateS.org", Realm: "*"}, "sip:1002@127.0.0.1", "sip:127.0.0.1:5060", time.Duration(67)*time.Second, 5071); err != nil { t.Fatal(err) } @@ -253,7 +252,7 @@ func TestTutKamCallsCall1001To1003(t *testing.T) { if !*testCalls { return } - if err := engine.PjsuaCallUri(&engine.PjsuaAccount{Id: "sip:1001@127.0.0.1", Username: "1001", Password: "1234", Realm: "*"}, "sip:1003@127.0.0.1", + if err := engine.PjsuaCallUri(&engine.PjsuaAccount{Id: "sip:1001@127.0.0.1", Username: "1001", Password: "CGRateS.org", Realm: "*"}, "sip:1003@127.0.0.1", "sip:127.0.0.1:5060", time.Duration(65)*time.Second, 5072); err != nil { t.Fatal(err) } @@ -263,7 +262,7 @@ func TestTutKamCallsCall1002To1001(t *testing.T) { if !*testCalls { return } - if err := engine.PjsuaCallUri(&engine.PjsuaAccount{Id: "sip:1002@127.0.0.1", Username: "1002", Password: "1234", Realm: "*"}, "sip:1001@127.0.0.1", + if err := engine.PjsuaCallUri(&engine.PjsuaAccount{Id: "sip:1002@127.0.0.1", Username: "1002", Password: "CGRateS.org", Realm: "*"}, "sip:1001@127.0.0.1", "sip:127.0.0.1:5060", time.Duration(61)*time.Second, 5073); err != nil { t.Fatal(err) } @@ -273,7 +272,7 @@ func TestTutKamCallsCall1003To1001(t *testing.T) { if !*testCalls { return } - if err := engine.PjsuaCallUri(&engine.PjsuaAccount{Id: "sip:1003@127.0.0.1", Username: "1003", Password: "1234", Realm: "*"}, "sip:1001@127.0.0.1", + if err := engine.PjsuaCallUri(&engine.PjsuaAccount{Id: "sip:1003@127.0.0.1", Username: "1003", Password: "CGRateS.org", Realm: "*"}, "sip:1001@127.0.0.1", "sip:127.0.0.1:5060", time.Duration(63)*time.Second, 5074); err != nil { t.Fatal(err) } @@ -283,7 +282,7 @@ func TestTutKamCallsCall1004To1001(t *testing.T) { if !*testCalls { return } - if err := engine.PjsuaCallUri(&engine.PjsuaAccount{Id: "sip:1004@127.0.0.1", Username: "1004", Password: "1234", Realm: "*"}, "sip:1001@127.0.0.1", + if err := engine.PjsuaCallUri(&engine.PjsuaAccount{Id: "sip:1004@127.0.0.1", Username: "1004", Password: "CGRateS.org", Realm: "*"}, "sip:1001@127.0.0.1", "sip:127.0.0.1:5060", time.Duration(62)*time.Second, 5075); err != nil { t.Fatal(err) } @@ -293,7 +292,7 @@ func TestTutKamCallsCall1006To1002(t *testing.T) { if !*testCalls { return } - if err := engine.PjsuaCallUri(&engine.PjsuaAccount{Id: "sip:1006@127.0.0.1", Username: "1006", Password: "1234", Realm: "*"}, "sip:1002@127.0.0.1", + if err := engine.PjsuaCallUri(&engine.PjsuaAccount{Id: "sip:1006@127.0.0.1", Username: "1006", Password: "CGRateS.org", Realm: "*"}, "sip:1002@127.0.0.1", "sip:127.0.0.1:5060", time.Duration(64)*time.Second, 5076); err != nil { t.Fatal(err) } @@ -303,7 +302,7 @@ func TestTutKamCallsCall1007To1002(t *testing.T) { if !*testCalls { return } - if err := engine.PjsuaCallUri(&engine.PjsuaAccount{Id: "sip:1007@127.0.0.1", Username: "1007", Password: "1234", Realm: "*"}, "sip:1002@127.0.0.1", + if err := engine.PjsuaCallUri(&engine.PjsuaAccount{Id: "sip:1007@127.0.0.1", Username: "1007", Password: "CGRateS.org", Realm: "*"}, "sip:1002@127.0.0.1", "sip:127.0.0.1:5060", time.Duration(66)*time.Second, 5077); err != nil { t.Fatal(err) } @@ -341,7 +340,7 @@ func TestTutKamCalls1001Cdrs(t *testing.T) { t.Error("Unexpected number of CDRs returned: ", len(reply)) } else { cgrId = reply[0].CgrId - if reply[0].CdrSource != "freeswitch_json" { + if reply[0].CdrSource != "KAMAILIO_CGR_CALL_END" { t.Errorf("Unexpected CdrSource for CDR: %+v", reply[0]) } if reply[0].ReqType != utils.META_PREPAID { @@ -415,7 +414,7 @@ func TestTutKamCalls1002Cdrs(t *testing.T) { } else if len(reply) != 1 { t.Error("Unexpected number of CDRs returned: ", len(reply)) } else { - if reply[0].CdrSource != "freeswitch_json" { + if reply[0].CdrSource != "KAMAILIO_CGR_CALL_END" { t.Errorf("Unexpected CdrSource for CDR: %+v", reply[0]) } if reply[0].ReqType != utils.META_POSTPAID { @@ -442,7 +441,7 @@ func TestTutKamCalls1003Cdrs(t *testing.T) { } else if len(reply) != 1 { t.Error("Unexpected number of CDRs returned: ", len(reply)) } else { - if reply[0].CdrSource != "freeswitch_json" { + if reply[0].CdrSource != "KAMAILIO_CGR_CALL_END" { t.Errorf("Unexpected CdrSource for CDR: %+v", reply[0]) } if reply[0].ReqType != utils.META_PSEUDOPREPAID { @@ -470,7 +469,7 @@ func TestTutKamCalls1004Cdrs(t *testing.T) { } else if len(reply) != 1 { t.Error("Unexpected number of CDRs returned: ", len(reply)) } else { - if reply[0].CdrSource != "freeswitch_json" { + if reply[0].CdrSource != "KAMAILIO_CGR_CALL_END" { t.Errorf("Unexpected CdrSource for CDR: %+v", reply[0]) } if reply[0].ReqType != utils.META_RATED { @@ -498,7 +497,7 @@ func TestTutKamCalls1006Cdrs(t *testing.T) { } else if len(reply) != 1 { t.Error("Unexpected number of CDRs returned: ", len(reply)) } else { - if reply[0].CdrSource != "freeswitch_json" { + if reply[0].CdrSource != "KAMAILIO_CGR_CALL_END" { t.Errorf("Unexpected CdrSource for CDR: %+v", reply[0]) } if reply[0].ReqType != utils.META_PREPAID { @@ -528,7 +527,7 @@ func TestTutKamCalls1007Cdrs(t *testing.T) { } else if len(reply) != 1 { t.Error("Unexpected number of CDRs returned: ", len(reply)) } else { - if reply[0].CdrSource != "freeswitch_json" { + if reply[0].CdrSource != "KAMAILIO_CGR_CALL_END" { t.Errorf("Unexpected CdrSource for CDR: %+v", reply[0]) } if reply[0].ReqType != utils.META_PREPAID { diff --git a/general_tests/tutorial_osips_calls_test.go b/general_tests/tutorial_osips_calls_test.go index 7a7fdceae..25fa947de 100644 --- a/general_tests/tutorial_osips_calls_test.go +++ b/general_tests/tutorial_osips_calls_test.go @@ -44,7 +44,7 @@ func TestTutOsipsCallsInitCfg(t *testing.T) { } // Init config first var err error - tutOsipsCallsCfg, err = config.NewCGRConfigFromFolder(path.Join(*dataDir, "tutorials", "fs_evsock", "cgrates", "etc", "cgrates")) + tutOsipsCallsCfg, err = config.NewCGRConfigFromFolder(path.Join(*dataDir, "tutorials", "osips_async", "cgrates", "etc", "cgrates")) if err != nil { t.Error(err) } @@ -73,12 +73,12 @@ func TestTutOsipsCallsResetStorDb(t *testing.T) { } // start FS server -func TestTutOsipsCallsStartFS(t *testing.T) { +func TestTutOsipsCallsStartOsips(t *testing.T) { if !*testCalls { return } - engine.KillProcName("freeswitch", 5000) - if err := engine.CallScript(path.Join(*dataDir, "tutorials", "fs_evsock", "freeswitch", "etc", "init.d", "freeswitch"), "start", 3000); err != nil { + engine.KillProcName("opensips", 3000) + if err := engine.CallScript(path.Join(*dataDir, "tutorials", "osips_async", "opensips", "etc", "init.d", "opensips"), "start", 3000); err != nil { t.Fatal(err) } } @@ -89,18 +89,17 @@ func TestTutOsipsCallsStartEngine(t *testing.T) { return } engine.KillProcName("cgr-engine", *waitRater) - if err := engine.CallScript(path.Join(*dataDir, "tutorials", "fs_evsock", "cgrates", "etc", "init.d", "cgrates"), "start", 100); err != nil { + if err := engine.CallScript(path.Join(*dataDir, "tutorials", "osips_async", "cgrates", "etc", "init.d", "cgrates"), "start", 100); err != nil { t.Fatal(err) } } // Restart FS so we make sure reconnects are working -func TestTutOsipsCallsRestartFS(t *testing.T) { +func TestTutOsipsCallsRestartOsips(t *testing.T) { if !*testCalls { return } - engine.KillProcName("freeswitch", 5000) - if err := engine.CallScript(path.Join(*dataDir, "tutorials", "fs_evsock", "freeswitch", "etc", "init.d", "freeswitch"), "start", 3000); err != nil { + if err := engine.CallScript(path.Join(*dataDir, "tutorials", "osips_async", "opensips", "etc", "init.d", "opensips"), "restart", 3000); err != nil { t.Fatal(err) } } @@ -341,7 +340,7 @@ func TestTutOsipsCalls1001Cdrs(t *testing.T) { t.Error("Unexpected number of CDRs returned: ", len(reply)) } else { cgrId = reply[0].CgrId - if reply[0].CdrSource != "freeswitch_json" { + if reply[0].CdrSource != "OSIPS_E_ACC_EVENT" { t.Errorf("Unexpected CdrSource for CDR: %+v", reply[0]) } if reply[0].ReqType != utils.META_PREPAID { @@ -415,7 +414,7 @@ func TestTutOsipsCalls1002Cdrs(t *testing.T) { } else if len(reply) != 1 { t.Error("Unexpected number of CDRs returned: ", len(reply)) } else { - if reply[0].CdrSource != "freeswitch_json" { + if reply[0].CdrSource != "OSIPS_E_ACC_EVENT" { t.Errorf("Unexpected CdrSource for CDR: %+v", reply[0]) } if reply[0].ReqType != utils.META_POSTPAID { @@ -442,7 +441,7 @@ func TestTutOsipsCalls1003Cdrs(t *testing.T) { } else if len(reply) != 1 { t.Error("Unexpected number of CDRs returned: ", len(reply)) } else { - if reply[0].CdrSource != "freeswitch_json" { + if reply[0].CdrSource != "OSIPS_E_ACC_EVENT" { t.Errorf("Unexpected CdrSource for CDR: %+v", reply[0]) } if reply[0].ReqType != utils.META_PSEUDOPREPAID { @@ -470,7 +469,7 @@ func TestTutOsipsCalls1004Cdrs(t *testing.T) { } else if len(reply) != 1 { t.Error("Unexpected number of CDRs returned: ", len(reply)) } else { - if reply[0].CdrSource != "freeswitch_json" { + if reply[0].CdrSource != "OSIPS_E_ACC_EVENT" { t.Errorf("Unexpected CdrSource for CDR: %+v", reply[0]) } if reply[0].ReqType != utils.META_RATED { @@ -498,7 +497,7 @@ func TestTutOsipsCalls1006Cdrs(t *testing.T) { } else if len(reply) != 1 { t.Error("Unexpected number of CDRs returned: ", len(reply)) } else { - if reply[0].CdrSource != "freeswitch_json" { + if reply[0].CdrSource != "OSIPS_E_ACC_EVENT" { t.Errorf("Unexpected CdrSource for CDR: %+v", reply[0]) } if reply[0].ReqType != utils.META_PREPAID { @@ -528,7 +527,7 @@ func TestTutOsipsCalls1007Cdrs(t *testing.T) { } else if len(reply) != 1 { t.Error("Unexpected number of CDRs returned: ", len(reply)) } else { - if reply[0].CdrSource != "freeswitch_json" { + if reply[0].CdrSource != "OSIPS_E_ACC_EVENT" { t.Errorf("Unexpected CdrSource for CDR: %+v", reply[0]) } if reply[0].ReqType != utils.META_PREPAID {