[freeside-commits] branch master updated. 2fc12e6b5a376fef9b5f5bf0301aab8497c6a412

Mark Wells mark at 420.am
Mon Feb 25 13:31:44 PST 2013


The branch, master has been updated
       via  2fc12e6b5a376fef9b5f5bf0301aab8497c6a412 (commit)
      from  20759b9bc29a5501ddfb62b25ba7a17d80d5832b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2fc12e6b5a376fef9b5f5bf0301aab8497c6a412
Author: Mark Wells <mark at freeside.biz>
Date:   Mon Feb 25 13:31:03 2013 -0800

    send countrycode with phone number

diff --git a/FS/FS/part_export/huawei_hlr.pm b/FS/FS/part_export/huawei_hlr.pm
index 5a6a983..d231567 100644
--- a/FS/FS/part_export/huawei_hlr.pm
+++ b/FS/FS/part_export/huawei_hlr.pm
@@ -38,7 +38,7 @@ sub _export_insert {
   # svc_phone::check should ensure phonenum and sim_imsi are numeric
   my @command = (
     IMSI   => '"'.$svc_phone->sim_imsi.'"',
-    ISDN   => '"'.$svc_phone->phonenum.'"',
+    ISDN   => '"'.$svc_phone->countrycode.$svc_phone->phonenum.'"',
     TPLID  => $self->option('tplid'),
   );
   unshift @command, 'HLRSN', $self->option('hlrsn')
@@ -54,7 +54,7 @@ sub _export_replace  {
   if ( $new->sim_imsi ne $old->sim_imsi ) {
     my @command = (
       'MOD IMSI',
-      ISDN    => '"'.$old->phonenum.'"',
+      ISDN    => '"'.$old->countrycode.$old->phonenum.'"',
       IMSI    => '"'.$old->sim_imsi.'"',
       NEWIMSI => '"'.$new->sim_imsi.'"',
     );
@@ -62,11 +62,12 @@ sub _export_replace  {
     return $err_or_queue unless ref $err_or_queue;
     $depend_jobnum = $err_or_queue->jobnum;
   }
-  if ( $new->phonenum ne $old->phonenum ) {
+  if ( $new->countrycode ne $old->countrycode or 
+       $new->phonenum ne $old->phonenum ) {
     my @command = (
       'MOD ISDN',
-      ISDN    => '"'.$old->phonenum.'"',
-      NEWISDN => '"'.$new->phonenum.'"',
+      ISDN    => '"'.$old->countrycode.$old->phonenum.'"',
+      NEWISDN => '"'.$new->countrycode.$new->phonenum.'"',
     );
     my $err_or_queue = $self->queue_command($new->svcnum, @command);
     return $err_or_queue unless ref $err_or_queue;
@@ -95,7 +96,7 @@ sub _export_lock {
   my @command = (
     'MOD LCK',
     IMSI    => '"'.$svc_phone->sim_imsi.'"',
-    ISDN    => '"'.$svc_phone->phonenum.'"',
+    ISDN    => '"'.$svc_phone->countrycode.$svc_phone->phonenum.'"',
     IC      => $lockstate,
     OC      => $lockstate,
     GPRSLOCK=> $lockstate,
@@ -109,7 +110,7 @@ sub _export_delete {
   my @command = (
     'RMV SUB',
     #IMSI    => '"'.$svc_phone->sim_imsi.'"',
-    ISDN    => '"'.$svc_phone->phonenum.'"',
+    ISDN    => '"'.$svc_phone->countrycode.$svc_phone->phonenum.'"',
   );
   my $err_or_queue = $self->queue_command($svc_phone->svcnum, @command);
   ref($err_or_queue) ? '' : $err_or_queue;

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/part_export/huawei_hlr.pm |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)




More information about the freeside-commits mailing list