diff --git a/lib/NGCP/Panel/Utils/Events.pm b/lib/NGCP/Panel/Utils/Events.pm index f9df3bac49..284b24e285 100644 --- a/lib/NGCP/Panel/Utils/Events.pm +++ b/lib/NGCP/Panel/Utils/Events.pm @@ -548,7 +548,7 @@ sub _get_aliases_sorted_rs { is_primary => 0, },{ #previously in ngcpcfg: #order_by => { -asc => ['is_primary', 'id'] }, - order_by => { -asc => 'is_primary' }, + order_by => { -asc => 'id' }, }); } diff --git a/t/api-rest/api-events.t b/t/api-rest/api-events.t index 84dde51db8..10e6433ed2 100644 --- a/t/api-rest/api-events.t +++ b/t/api-rest/api-events.t @@ -252,10 +252,10 @@ my %customer_map = (); primary_number => { cc => $cc, ac => $ac, sn => $sn }, alias_numbers => $aliases, ); - my $subscriber = _create_subscriber($customer, - primary_number => { cc => 888, ac => '2'.(scalar keys %subscriber_map), sn => $t }, - alias_numbers => $aliases, - ); + #my $subscriber = _create_subscriber($customer, + # primary_number => { cc => 888, ac => '2'.(scalar keys %subscriber_map), sn => $t }, + # alias_numbers => $aliases, + # ); my $destinationset_1 = _create_cfdestinationset($subscriber,"dest1_$t",[{ destination => "1234", timeout => '10', @@ -436,6 +436,7 @@ my %customer_map = (); { cc => $cc, ac => $ac, sn => $sn.'0004' }, #{ cc => $cc, ac => $ac, sn => $sn.'0006' }, ]; + #make sure cloudpbx = 1 my $subscriber = _create_subscriber($customer, pbx_extension => $ext, alias_numbers => $aliases, @@ -731,12 +732,6 @@ my %customer_map = (); non_primary_alias_username => $new_pilot_aliases->[1]->{cc}.$new_pilot_aliases->[1]->{ac}.$new_pilot_aliases->[1]->{sn}, }, - - - - - - ]); }